Package com.logicaldoc.web.websockets
Class EventEndpoint
java.lang.Object
com.logicaldoc.web.websockets.EventEndpoint
- All Implemented Interfaces:
- EventListener
Websockets end-point to distribute events.
- Since:
- 8.1.1
- Author:
- Marco Meschieri - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<T extends History>
 intcountQueueSize(Class<T> historyClass) Returns the number of canched events of the given typestatic voiddistributeMessage(WebsocketMessage message) Distributes a message to all the connected clientsvoidvoidCalled when a new event arrivesvoidonBinaryMessage(byte[] data, jakarta.websocket.Session session) voidonClose(jakarta.websocket.Session session) voidvoidonOpen(jakarta.websocket.Session session) 
- 
Constructor Details- 
EventEndpointpublic EventEndpoint()
 
- 
- 
Method Details- 
countQueueSizeReturns the number of canched events of the given type- Parameters:
- historyClass- a class of History
- Returns:
- number of cached events
 
- 
onOpenpublic void onOpen(jakarta.websocket.Session session) 
- 
onClosepublic void onClose(jakarta.websocket.Session session) 
- 
onMessage
- 
onBinaryMessagepublic void onBinaryMessage(byte[] data, jakarta.websocket.Session session) 
- 
newEventDescription copied from interface:EventListenerCalled when a new event arrives- Specified by:
- newEventin interface- EventListener
- Parameters:
- event- the event to process
 
- 
error
- 
distributeMessageDistributes a message to all the connected clients- Parameters:
- message- The message to be sent
 
 
-