Package org.oddjob.websocket
Class NotifierClient
java.lang.Object
org.oddjob.websocket.NotifierClient
- All Implemented Interfaces:
AutoCloseable,RemoteNotifier
An Oddjob style service that provides a Web Socket
RemoteNotifier.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<T> voidaddNotificationListener(long remoteId, NotificationType<T> notificationType, NotificationListener<T> notificationListener) voidclose()static NotifierClientcreate(URI uri, ScheduledExecutorService executor, com.google.gson.Gson gson) <T> voidremoveNotificationListener(long remoteId, NotificationType<T> notificationType, NotificationListener<T> notificationListener)
-
Field Details
-
session
public final javax.websocket.Session session
-
-
Method Details
-
create
public static NotifierClient create(URI uri, ScheduledExecutorService executor, com.google.gson.Gson gson) throws RemoteException - Throws:
RemoteException
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
RemoteException
-
getSessionId
-
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
-