Package com.adobe.granite.socketio
Interface SocketIONamespace
-
- All Superinterfaces:
SocketIOEmitter
@ProviderType public interface SocketIONamespace extends SocketIOEmitter
Socket.IO namespace. Each namespace can have a number of connected sockets.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_NAME
Name of the default namespace.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<java.lang.String,SocketIOSocket>
getConnected()
Returns a map of all connected sockets.java.lang.String
getName()
Returns the name of this namespace.SocketIOSocket
getSocket(java.lang.String id)
Returns the socket with the given id ornull
if it does not exist.-
Methods inherited from interface com.adobe.granite.socketio.SocketIOEmitter
emit, emit, to
-
-
-
-
Field Detail
-
DEFAULT_NAME
static final java.lang.String DEFAULT_NAME
Name of the default namespace.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
@Nonnull java.lang.String getName()
Returns the name of this namespace.- Returns:
- the name
-
getConnected
@Nonnull java.util.Map<java.lang.String,SocketIOSocket> getConnected()
Returns a map of all connected sockets. The key of the map corresponds to the socket ids.- Returns:
- the map of connected sockets.
-
getSocket
@CheckForNull SocketIOSocket getSocket(@Nonnull java.lang.String id)
Returns the socket with the given id ornull
if it does not exist.- Parameters:
id
- the socket id.- Returns:
- a socket or
null
.
-
-