class WebSocketsServiceImpl extends Object implements WebSocketsService
| Modifier and Type | Class and Description |
|---|---|
private static class |
WebSocketsServiceImpl.QueuedMessage |
private class |
WebSocketsServiceImpl.SendMessageWorker |
private class |
WebSocketsServiceImpl.WebSocketsServer |
| Modifier and Type | Field and Description |
|---|---|
private CoreService |
dmx |
private Logger |
logger |
private WebSocketConnectionPool |
pool |
private WebSocketsServiceImpl.WebSocketsServer |
server |
private static int |
WEBSOCKETS_PORT |
private static String |
WEBSOCKETS_URL |
private WebSocketsServiceImpl.SendMessageWorker |
worker |
| Constructor and Description |
|---|
WebSocketsServiceImpl(CoreService dmx) |
| Modifier and Type | Method and Description |
|---|---|
private void |
broadcast(String pluginUri,
String message,
WebSocketConnection exclude) |
private WebSocketConnection |
getConnection(javax.servlet.http.HttpServletRequest request,
String pluginUri) |
String |
getWebSocketsURL() |
private void |
init() |
void |
messageToAll(String pluginUri,
String message) |
void |
messageToAllButOne(javax.servlet.http.HttpServletRequest request,
String pluginUri,
String message) |
void |
messageToOne(javax.servlet.http.HttpServletRequest request,
String pluginUri,
String message) |
private void |
queueMessage(WebSocketConnection connection,
String message) |
(package private) void |
shutdown() |
private static final int WEBSOCKETS_PORT
private static final String WEBSOCKETS_URL
private WebSocketsServiceImpl.WebSocketsServer server
private WebSocketConnectionPool pool
private WebSocketsServiceImpl.SendMessageWorker worker
private CoreService dmx
WebSocketsServiceImpl(CoreService dmx)
public void messageToAll(String pluginUri, String message)
messageToAll in interface WebSocketsServicepublic void messageToAllButOne(javax.servlet.http.HttpServletRequest request, String pluginUri, String message)
messageToAllButOne in interface WebSocketsServicepublic void messageToOne(javax.servlet.http.HttpServletRequest request, String pluginUri, String message)
messageToOne in interface WebSocketsServicepublic String getWebSocketsURL()
getWebSocketsURL in interface WebSocketsServiceprivate void init()
void shutdown()
private WebSocketConnection getConnection(javax.servlet.http.HttpServletRequest request, String pluginUri)
RuntimeException - if no valid session is associated with the request.private void broadcast(String pluginUri, String message, WebSocketConnection exclude)
private void queueMessage(WebSocketConnection connection, String message)
Copyright © 2018. All Rights Reserved.