public interface Server
Server is a server-side wes application which provides and manages
Socket
processing HTTP request and WebSocket so that it can run on
any framework wes supports. See wes
documentation for how to install and what frameworks are supported.
If you are using dependency injection framework like Spring, you can create Server as component of singleton scope and inject it where you need to communicate with client in real time.
Server may be accessed by multiple threads.
Modifier and Type | Method and Description |
---|---|
Server |
all(Action<Socket> action)
Executes the given action retrieving all of the socket in this server.
|
Server |
byId(String id,
Action<Socket> action)
Executes the given action retrieving the socket of the given id.
|
Server |
byTag(String[] names,
Action<Socket> action)
Executes the given action retrieving the socket tagged with all of the
given names.
|
Server |
byTag(String name,
Action<Socket> action)
Executes the given action retrieving the socket tagged with the given
name.
|
Action<ServerHttpExchange> |
httpAction()
ServerHttpExchange action to install in wes
|
Server |
socketAction(Action<Socket> action)
Registers an action to be called when the socket has been opened.
|
Action<ServerWebSocket> |
websocketAction()
ServerWebSocket action to install in wes
|
Server all(Action<Socket> action)
Server byId(String id, Action<Socket> action)
Server byTag(String name, Action<Socket> action)
Server byTag(String[] names, Action<Socket> action)
Server socketAction(Action<Socket> action)
Action<ServerHttpExchange> httpAction()
Action<ServerWebSocket> websocketAction()
Copyright 2012-2014, Donghwan Kim