Package com.adobe.granite.socketio
Interface SocketIOListener
-
@ConsumerType public interface SocketIOListener
Socket.IO listener.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhandleNamespace(java.lang.String name)Checks whether this listener wants to handle events for the given namespace.voidonConnect(SocketIOSocket socket)Called when a socket connects.voidonDisconnect(SocketIOSocket socket, java.lang.String reason)Called when a socket disconnects.
-
-
-
Method Detail
-
handleNamespace
boolean handleNamespace(@Nonnull java.lang.String name)Checks whether this listener wants to handle events for the given namespace.- Parameters:
name- name of the namespace to check.- Returns:
trueif this listener will handle events for this namespace.
-
onConnect
void onConnect(@Nonnull SocketIOSocket socket)Called when a socket connects.- Parameters:
socket- the socket.
-
onDisconnect
void onDisconnect(@Nonnull SocketIOSocket socket, @Nullable java.lang.String reason)Called when a socket disconnects. Note that prior to this, the socket listener on the socket is called.- Parameters:
socket- the socket that disconnected.reason- informative reason
-
-