public interface WebSocketService
WebServer
, then requests to that server
that match the relative path set by the setRelativePath(URI)
method of this interface will be delegated to that actor or attribute.
Modifier and Type | Method and Description |
---|---|
java.net.URI |
getRelativePath()
Returns the relative path that this WebSocketService is mapped to,
which is the value set previously by a call to
setRelativePath(URI) . |
void |
onMessage(WebSocketEndpoint sender,
java.lang.String message)
Notify service of a WebSocket message event.
|
void |
setConnection(org.eclipse.jetty.websocket.WebSocket.Connection connection)
Set the websocket connection that the service should use.
|
void |
setRelativePath(java.net.URI relativePath)
Set the relative path that this WebSocketService is mapped to.
|
java.net.URI getRelativePath()
setRelativePath(URI)
.setRelativePath(URI)
void onMessage(WebSocketEndpoint sender, java.lang.String message)
sender
- The PtolemyWebSocketEndpoint that sent the messagemessage
- The message that was receivedvoid setConnection(org.eclipse.jetty.websocket.WebSocket.Connection connection)
The
- connection that the service should use.void setRelativePath(java.net.URI relativePath)
relativePath
- The relative path that this HttpService is mapped to.getRelativePath()