Class EventSourceInterceptor
- java.lang.Object
-
- com.google.common.util.concurrent.AbstractIdleService
-
- org.somda.sdc.dpws.soap.wseventing.EventSourceInterceptor
-
- All Implemented Interfaces:
com.google.common.util.concurrent.Service,Interceptor,EventSource
public class EventSourceInterceptor extends com.google.common.util.concurrent.AbstractIdleService implements EventSource
Interceptor that handles an event source's incoming subscription requests and facilitates sending notifications.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,SubscriptionManager>getActiveSubscriptions()Returns all active subscription ids with their SubscriptionManager.voidsendNotification(String action, Object payload)Sends a notification to all event sinks.protected voidshutDown()protected voidstartUp()voidsubscriptionEndToAll(WsEventingStatus status)Sends a subscription end to all event sinks.-
Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, startAsync, state, stopAsync, toString
-
-
-
-
Method Detail
-
sendNotification
public void sendNotification(String action, Object payload)
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
public void subscriptionEndToAll(WsEventingStatus status)
Description copied from interface:EventSourceSends a subscription end to all event sinks.- Specified by:
subscriptionEndToAllin interfaceEventSource- Parameters:
status- the subscription end reason.
-
getActiveSubscriptions
public Map<String,SubscriptionManager> getActiveSubscriptions()
Description copied from interface:EventSourceReturns all active subscription ids with their SubscriptionManager.- Specified by:
getActiveSubscriptionsin interfaceEventSource- Returns:
- Map of subscription ids and SubscriptionManagers.
-
startUp
protected void startUp()
- Specified by:
startUpin classcom.google.common.util.concurrent.AbstractIdleService
-
shutDown
protected void shutDown()
- Specified by:
shutDownin classcom.google.common.util.concurrent.AbstractIdleService
-
-