Package adaptlil.websocket
Class VisualizationWebsocket
java.lang.Object
org.glassfish.grizzly.websockets.WebSocketAdapter
org.glassfish.grizzly.websockets.WebSocketApplication
adaptlil.websocket.VisualizationWebsocket
- All Implemented Interfaces:
Component
,org.glassfish.grizzly.websockets.WebSocketListener
public class VisualizationWebsocket
extends org.glassfish.grizzly.websockets.WebSocketApplication
implements Component
The composer handles analyzing and processing of gaze data and invocating adaptive changes. It keeps track
of current adaptovis.adaptations, classification results, and so on.
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
private AdaptationMediator
private final com.fasterxml.jackson.databind.ObjectMapper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSet<org.glassfish.grizzly.websockets.WebSocket>
void
invoke
(InvokeRequestModelWs invokeRequest) Use this to send adaptovis.adaptations to the frontend Send an Invoke Adaptation Request model to the frontend.void
onClose
(org.glassfish.grizzly.websockets.WebSocket socket, org.glassfish.grizzly.websockets.DataFrame frame) void
onConnect
(org.glassfish.grizzly.websockets.WebSocket socket) Calls parent method onConnectvoid
Listener/method invoked when socket receives a message.void
Sends a message to all connected websockets.void
setMediator
(Mediator mediator) Methods inherited from class org.glassfish.grizzly.websockets.WebSocketApplication
add, createSocket, createSocket, getSupportedExtensions, getSupportedProtocols, handshake, isApplicationRequest, onError, onExtensionNegotiation, remove, upgrade
Methods inherited from class org.glassfish.grizzly.websockets.WebSocketAdapter
onFragment, onFragment, onMessage, onPing, onPong
-
Field Details
-
objectMapper
private final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
hasResponded
protected boolean hasResponded -
mediator
-
-
Constructor Details
-
VisualizationWebsocket
public VisualizationWebsocket()Constructs websocket object.
-
-
Method Details
-
onConnect
public void onConnect(org.glassfish.grizzly.websockets.WebSocket socket) Calls parent method onConnect- Specified by:
onConnect
in interfaceorg.glassfish.grizzly.websockets.WebSocketListener
- Overrides:
onConnect
in classorg.glassfish.grizzly.websockets.WebSocketApplication
- Parameters:
socket
- the newWebSocket
connection.
-
onMessage
Listener/method invoked when socket receives a message. When frontend sends a message over the socket, this method is invoked- Specified by:
onMessage
in interfaceorg.glassfish.grizzly.websockets.WebSocketListener
- Overrides:
onMessage
in classorg.glassfish.grizzly.websockets.WebSocketAdapter
- Parameters:
socket
-msg
-
-
invoke
Use this to send adaptovis.adaptations to the frontend Send an Invoke Adaptation Request model to the frontend.- Parameters:
invokeRequest
-
-
send
Sends a message to all connected websockets.- Parameters:
msg
-
-
onClose
public void onClose(org.glassfish.grizzly.websockets.WebSocket socket, org.glassfish.grizzly.websockets.DataFrame frame) - Specified by:
onClose
in interfaceorg.glassfish.grizzly.websockets.WebSocketListener
- Overrides:
onClose
in classorg.glassfish.grizzly.websockets.WebSocketApplication
-
getWebSockets
- Overrides:
getWebSockets
in classorg.glassfish.grizzly.websockets.WebSocketApplication
-
setMediator
- Specified by:
setMediator
in interfaceComponent
-