Class EventListener
- java.lang.Object
-
- com.logicaldoc.gui.common.client.websockets.EventListener
-
- All Implemented Interfaces:
com.sksamuel.gwt.websockets.WebsocketListener
public class EventListener extends Object implements com.sksamuel.gwt.websockets.WebsocketListener
Listens to events coming from websockets- Since:
- 8.1.1
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description EventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventMessage
deserializeMessae(String data)
void
onClose()
void
onMessage(String msg)
void
onOpen()
String
serializeMessage(EventMessage message)
Here there is the trick, the Async Service that is usual return by the deferred binding is also an instance of a SerializationStreamFactory.
-
-
-
Method Detail
-
serializeMessage
public String serializeMessage(EventMessage message)
Here there is the trick, the Async Service that is usual return by the deferred binding is also an instance of a SerializationStreamFactory. That can be used for serialize and deserialize objects- Parameters:
message
- the message to serialize- Returns:
- the message serialized in a string
-
deserializeMessae
public EventMessage deserializeMessae(String data)
-
onClose
public void onClose()
- Specified by:
onClose
in interfacecom.sksamuel.gwt.websockets.WebsocketListener
-
onMessage
public void onMessage(String msg)
- Specified by:
onMessage
in interfacecom.sksamuel.gwt.websockets.WebsocketListener
-
onOpen
public void onOpen()
- Specified by:
onOpen
in interfacecom.sksamuel.gwt.websockets.WebsocketListener
-
-