Class GenericEventSource
java.lang.Object
org.somda.sdc.dpws.soap.wseventing.GenericEventSource
- All Implemented Interfaces:
Interceptor,EventSource,EventSourceDialectHandler
Interceptor that handles an event source's incoming subscription requests and facilitates sending notifications.
-
Method Summary
Modifier and TypeMethodDescriptionvoidendSubscriptionFor(String subscriptionId) Additional method to send out a subscription end to a single subscription.Returns all active subscription ids with their SubscriptionManager.This function shall return the handled filter dialect.voidinit(Subscriptions subscriptions) Called once for a filter dialect handler when the EventSourceInterceptorDispatcher service starts.voidsendNotification(String action, Object payload) Sends a notification to all event sinks.voidsendNotificationFor(String subscriptionId, String action, Object payload) Additional method to send out a notification to a single subscription.voidsetStale(SourceSubscriptionManager subscriptionManager) Called when a subscription has expired.voidsubscribe(SourceSubscriptionManager subscriptionManager) Called on an incoming subscribe request.voidsubscriptionEndToAll(WsEventingStatus status) Sends a subscription end to all event sinks.voidunsubscribe(SourceSubscriptionManager subscriptionManager) Called on an incoming unsubscribe request.
-
Method Details
-
sendNotification
Description copied from interface:EventSourceSends a notification to all event sinks.- Specified by:
sendNotificationin interfaceEventSource- Parameters:
action- the action URI used for dispatching to event sinks.payload- a JAXB element or JAXB generated class object to transport.
-
subscriptionEndToAll
Description copied from interface:EventSourceSends a subscription end to all event sinks.- Specified by:
subscriptionEndToAllin interfaceEventSource- Parameters:
status- the subscription end reason.
-
sendNotificationFor
Additional method to send out a notification to a single subscription.- Parameters:
subscriptionId- the subscription id for which a notification will be sent.action- the WS-Addressing action header URI.payload- the notification payload asJAXBElementor an object that can be marshalled.
-
endSubscriptionFor
Additional method to send out a subscription end to a single subscription.- Parameters:
subscriptionId- the subscription id for which the end will be announced.
-
getActiveSubscriptions
Description copied from interface:EventSourceReturns all active subscription ids with their SubscriptionManager.- Specified by:
getActiveSubscriptionsin interfaceEventSource- Returns:
- Map of subscription ids and SubscriptionManagers.
-
init
Description copied from interface:EventSourceDialectHandlerCalled once for a filter dialect handler when the EventSourceInterceptorDispatcher service starts.This function is guaranteed to be called before any other callback of this interface is called.
The subscriptions are managed by the
EventSourceInterceptorDispatcher!- Specified by:
initin interfaceEventSourceDialectHandler- Parameters:
subscriptions- the subscription registry that handles all subscriptions for the filter dialect
-
subscribe
Description copied from interface:EventSourceDialectHandlerCalled on an incoming subscribe request.- Specified by:
subscribein interfaceEventSourceDialectHandler- Parameters:
subscriptionManager- the subscription manager for this subscription.
-
unsubscribe
Description copied from interface:EventSourceDialectHandlerCalled on an incoming unsubscribe request.- Specified by:
unsubscribein interfaceEventSourceDialectHandler- Parameters:
subscriptionManager- the subscription manager for this subscription.
-
setStale
Description copied from interface:EventSourceDialectHandlerCalled when a subscription has expired.- Specified by:
setStalein interfaceEventSourceDialectHandler- Parameters:
subscriptionManager- the subscription manager for this subscription.
-
getDialect
Description copied from interface:EventSourceDialectHandlerThis function shall return the handled filter dialect.It is used by the dispatcher helping to assign subscription activity.
- Specified by:
getDialectin interfaceEventSourceDialectHandler- Returns:
- the filter dialect handled by this instance.
-