Package marauroa.server.net.web
Class WebSocketConnectionManager
java.lang.Object
marauroa.server.net.web.WebSocketConnectionManager
- All Implemented Interfaces:
ConnectionManager
a network manager implementation that uses a websocket server for web based clients.
- Author:
- hendrik
-
Method Summary
Modifier and TypeMethodDescriptionvoidcloses a channelvoidfinish()shuts the server downbooleanwas the server shutdown?voidonDisconnect(WebSocketChannel webSocketChannel)a client disconnectedvoidonMessage(WebSocketChannel webSocketChannel, String message)a client sent a messagevoidsends a message
-
Method Details
-
onDisconnect
a client disconnected- Parameters:
webSocketChannel- channel to the client
-
onMessage
a client sent a message- Parameters:
webSocketChannel- channel to the clientmessage- message
-
finish
public void finish()Description copied from interface:ConnectionManagershuts the server down- Specified by:
finishin interfaceConnectionManager
-
isFinished
public boolean isFinished()Description copied from interface:ConnectionManagerwas the server shutdown?- Specified by:
isFinishedin interfaceConnectionManager- Returns:
- true, if the server was shut down; false otherwise
-
send
Description copied from interface:ConnectionManagersends a message- Specified by:
sendin interfaceConnectionManager- Parameters:
internalChannel- channel to send the message tomsg- message to sendisPerceptionRequired- is the next perception unskipable?
-
close
Description copied from interface:ConnectionManagercloses a channel- Specified by:
closein interfaceConnectionManager- Parameters:
internalChannel- channel to close
-