public class WebSocketTransportServer extends Object implements TransportServer<io.cettia.platform.websocket.ServerWebSocket>
TransportServer
.
It processes transport whose URI whose protocol is either ws
or
wss
like ws://localhost:8080/cettia
. Because WebSocket protocol
itself meets transport's requirements, a produced transport is actually a
thread-safe version of ServerWebSocket
.
Constructor and Description |
---|
WebSocketTransportServer() |
Modifier and Type | Method and Description |
---|---|
void |
on(io.cettia.platform.websocket.ServerWebSocket ws) |
WebSocketTransportServer |
ontransport(io.cettia.platform.action.Action<ServerTransport> action)
Registers an action to be called when the transport has been opened.
|
public void on(io.cettia.platform.websocket.ServerWebSocket ws)
on
in interface io.cettia.platform.action.Action<io.cettia.platform.websocket.ServerWebSocket>
public WebSocketTransportServer ontransport(io.cettia.platform.action.Action<ServerTransport> action)
TransportServer
ontransport
in interface TransportServer<io.cettia.platform.websocket.ServerWebSocket>
Copyright 2015, The Cettia Project