Interface WebsocketConnectionListener
- All Known Subinterfaces:
WebsocketClientListener
- All Known Implementing Classes:
WebsocketRouter
public interface WebsocketConnectionListener
Interface to receive websocket connection events.
- Since:
- 1.0
- Version:
- 2022-08-30
-
Method Summary
Modifier and TypeMethodDescriptionvoidonConnect(WebsocketConnection conn) Called when a client connects to the server.voidCalled when a client disconnects from the server.default voidonError(WebsocketConnection conn) Called when a client has an error.
-
Method Details
-
onConnect
Called when a client connects to the server.- Parameters:
conn- the new connection- Throws:
Exception
-
onDisconnect
Called when a client disconnects from the server.- Parameters:
conn- the connection that closed- Throws:
Exception
-
onError
Called when a client has an error. This may precede a close event for an open weboscket or may occur in isolation if the websocket never opened (such as server doesn't exit).- Parameters:
conn- the connection that had an error- Throws:
Exception
-