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 TypeMethodDescriptionvoid
closes a channelvoid
finish()
shuts the server downboolean
was the server shutdown?void
onDisconnect(WebSocketChannel webSocketChannel)
a client disconnectedvoid
onMessage(WebSocketChannel webSocketChannel, String message)
a client sent a messagevoid
sends 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:ConnectionManager
shuts the server down- Specified by:
finish
in interfaceConnectionManager
-
isFinished
public boolean isFinished()Description copied from interface:ConnectionManager
was the server shutdown?- Specified by:
isFinished
in interfaceConnectionManager
- Returns:
- true, if the server was shut down; false otherwise
-
send
Description copied from interface:ConnectionManager
sends a message- Specified by:
send
in interfaceConnectionManager
- Parameters:
internalChannel
- channel to send the message tomsg
- message to sendisPerceptionRequired
- is the next perception unskipable?
-
close
Description copied from interface:ConnectionManager
closes a channel- Specified by:
close
in interfaceConnectionManager
- Parameters:
internalChannel
- channel to close
-