Package org.oddjob.websocket
Class NotifierClientEndpoint
java.lang.Object
org.oddjob.websocket.NotifierClientEndpoint
- All Implemented Interfaces:
RemoteNotifier
Web Socket client endpoint for a Remote Notifier.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionNotifierClientEndpoint(ScheduledExecutorService executor, com.google.gson.Gson gson) NotifierClientEndpoint(ScheduledExecutorService executor, Clock clock, com.google.gson.Gson gson) -
Method Summary
Modifier and TypeMethodDescription<T> voidaddNotificationListener(long remoteId, NotificationType<T> notificationType, NotificationListener<T> notificationListener) voidclose(javax.websocket.Session session) voidvoidvoidopen(javax.websocket.Session session, javax.websocket.EndpointConfig config) <T> voidremoveNotificationListener(long remoteId, NotificationType<T> notificationType, NotificationListener<T> notificationListener)
-
Field Details
-
HEARTBEAT_SECONDS
public static final long HEARTBEAT_SECONDS- See Also:
-
TIMEOUT_SECONDS
public static final long TIMEOUT_SECONDS- See Also:
-
-
Constructor Details
-
NotifierClientEndpoint
-
NotifierClientEndpoint
public NotifierClientEndpoint(ScheduledExecutorService executor, Clock clock, com.google.gson.Gson gson)
-
-
Method Details
-
open
public void open(javax.websocket.Session session, javax.websocket.EndpointConfig config) -
onMessage
-
close
public void close(javax.websocket.Session session) -
error
-
addNotificationListener
public <T> void addNotificationListener(long remoteId, NotificationType<T> notificationType, NotificationListener<T> notificationListener) throws RemoteException - Specified by:
addNotificationListenerin interfaceRemoteNotifier- Throws:
RemoteException
-
removeNotificationListener
public <T> void removeNotificationListener(long remoteId, NotificationType<T> notificationType, NotificationListener<T> notificationListener) throws RemoteException - Specified by:
removeNotificationListenerin interfaceRemoteNotifier- Throws:
RemoteException
-