Package org.cyclos.impl.utils
Interface PushNotificationHandler
-
- All Known Implementing Classes:
AbstractPushNotificationHandlerImpl,NoClusterPushNotificationHandlerImpl
public interface PushNotificationHandlerHandler for using push notifications
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose(String id)Closes a subscription.<T> booleanpublish(PushNotificationEventContext<T> context, Supplier<T> dataSupplier)Publishes aPushNotificationEventto a specific user session, calling the supplier and returning if the event is really publishedStringsubscribe(String clientId, String lastEventId, PushNotificationEventFilter filter, Consumer<PushNotificationEvent<?>> listener)Subscribes a newPushNotificationListenerfor listening events of the given types, for the user expressed in the currentSessionData.voidtimeout(String id)Marks a subscription as timed-out.
-
-
-
Method Detail
-
close
void close(String id)
Closes a subscription.- See Also:
ServiceFacade.closeSubscription(String)
-
publish
<T> boolean publish(PushNotificationEventContext<T> context, Supplier<T> dataSupplier)
Publishes aPushNotificationEventto a specific user session, calling the supplier and returning if the event is really published
-
subscribe
String subscribe(String clientId, String lastEventId, PushNotificationEventFilter filter, Consumer<PushNotificationEvent<?>> listener)
Subscribes a newPushNotificationListenerfor listening events of the given types, for the user expressed in the currentSessionData.
-
timeout
void timeout(String id)
Marks a subscription as timed-out.
-
-