Package | Description |
---|---|
io.cettia |
Modifier and Type | Method and Description |
---|---|
<T> ServerSocket |
ServerSocket.off(String event,
Action<T> action)
Removes a given event handler for a given event.
|
<T> ServerSocket |
ServerSocket.on(String event,
Action<T> action)
Adds a given event handler for a given event.
|
ServerSocket |
ServerSocket.oncache(Action<Object[]> action)
Adds a cache event handler to be called if one of
send methods is called when
there is no connection. |
ServerSocket |
ServerSocket.onclose(Action<Void> action)
Adds a close event handler to be called when the underlying transport is closed for any reason.
|
ServerSocket |
ServerSocket.ondelete(Action<Void> action)
Adds a delete event handler to be called when the socket is in the closed state for a long
time i.e.
|
ServerSocket |
ServerSocket.onerror(Action<Throwable> action)
Adds an error event handler to be called if there was any error on the socket.
|
ServerSocket |
ServerSocket.onopen(Action<Void> action)
Adds an open event handler to be called when the handshake is performed successfully and
communication is possible.
|
<T> ServerSocket |
ServerSocket.send(String event,
Object data,
Action<T> resolved)
Sends a given event with data attaching resolved callback.
|
<T,U> ServerSocket |
ServerSocket.send(String event,
Object data,
Action<T> resolved,
Action<U> rejected)
Sends a given event with data attaching resolved callback and rejected callback.
|
Modifier and Type | Method and Description |
---|---|
Server |
Server.all(Action<ServerSocket> action)
Executes the given action retrieving every socket in this server.
|
Server |
DefaultServer.all(Action<ServerSocket> action) |
Server |
ClusteredServer.all(Action<ServerSocket> action) |
Server |
Server.byTag(String[] names,
Action<ServerSocket> action)
Executes the given action retrieving the socket tagged with the given tags in this server.
|
Server |
DefaultServer.byTag(String[] names,
Action<ServerSocket> action) |
Server |
ClusteredServer.byTag(String[] names,
Action<ServerSocket> action) |
Server |
Server.byTag(String name,
Action<ServerSocket> action)
Executes the given action retrieving the socket tagged with the given tag in this server.
|
Server |
DefaultServer.byTag(String name,
Action<ServerSocket> action) |
Server |
Server.onsocket(Action<ServerSocket> action)
Adds a socket event handler to be called when the socket has been created in this server.
|
Server |
DefaultServer.onsocket(Action<ServerSocket> action) |
Copyright 2015, The Cettia Project