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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State -
Method Summary
Modifier and TypeMethodDescriptionReturns 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.common.util.concurrent.Service
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
-
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.
-
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
-