public abstract class WebSocketRegistry
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock |
readLock |
protected java.util.HashMap<java.lang.String,services.moleculer.web.WebSocketRegistry.EndpointSet> |
registry |
protected java.util.concurrent.ScheduledFuture<?> |
timer |
protected WebSocketFilter |
webSocketFilter |
protected java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock |
writeLock |
| Constructor and Description |
|---|
WebSocketRegistry(services.moleculer.ServiceBroker broker,
long cleanupSeconds) |
| Modifier and Type | Method and Description |
|---|---|
void |
deregister(java.lang.String path,
Endpoint endpoint) |
void |
register(java.lang.String path,
Endpoint endpoint) |
void |
run() |
void |
send(java.lang.String path,
java.lang.String message) |
void |
setWebSocketFilter(WebSocketFilter webSocketFilter) |
void |
stopped() |
protected WebSocketFilter webSocketFilter
protected java.util.HashMap<java.lang.String,services.moleculer.web.WebSocketRegistry.EndpointSet> registry
protected final java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock readLock
protected final java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock writeLock
protected final java.util.concurrent.ScheduledFuture<?> timer
public WebSocketRegistry(services.moleculer.ServiceBroker broker,
long cleanupSeconds)
public void stopped()
public void register(java.lang.String path,
Endpoint endpoint)
public void deregister(java.lang.String path,
Endpoint endpoint)
public void send(java.lang.String path,
java.lang.String message)
public void run()
run in interface java.lang.Runnablepublic void setWebSocketFilter(WebSocketFilter webSocketFilter)