public interface Server extends io.cettia.platform.action.Action<ServerTransport>
Server
consumes ServerTransport
and produces
ServerSocket
following the Cettia protocol.
Instances may be accessed by multiple threads.
Modifier and Type | Method and Description |
---|---|
Sentence |
all()
Returns a sentence that every socket in this server have to follow.
|
Server |
all(io.cettia.platform.action.Action<ServerSocket> action)
Executes the given action retrieving every socket in this server.
|
Sentence |
byTag(String... names)
Returns a sentence that the socket tagged with the given tags in this
server have to follow.
|
Server |
byTag(String[] names,
io.cettia.platform.action.Action<ServerSocket> action)
Executes the given action retrieving the socket tagged with the given
tags in this server.
|
Server |
byTag(String name,
io.cettia.platform.action.Action<ServerSocket> action)
Executes the given action retrieving the socket tagged with the given tag
in this server.
|
Server |
onsocket(io.cettia.platform.action.Action<ServerSocket> action)
Registers an action to be called when the socket has been opened in this
server.
|
Sentence all()
Server all(io.cettia.platform.action.Action<ServerSocket> action)
Sentence byTag(String... names)
Server byTag(String name, io.cettia.platform.action.Action<ServerSocket> action)
Server byTag(String[] names, io.cettia.platform.action.Action<ServerSocket> action)
Server onsocket(io.cettia.platform.action.Action<ServerSocket> action)
Copyright 2015, The Cettia Project