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 Type
    Method
    Description
    Returns all active subscription ids with their SubscriptionManager.
    void
    sendNotification(String action, Object payload)
    Sends a notification to all event sinks.
    protected void
     
    protected void
     
    void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.common.util.concurrent.Service

    addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
  • Method Details

    • sendNotification

      public void sendNotification(String action, Object payload)
      Description copied from interface: EventSource
      Sends a notification to all event sinks.
      Specified by:
      sendNotification in interface EventSource
      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: EventSource
      Sends a subscription end to all event sinks.
      Specified by:
      subscriptionEndToAll in interface EventSource
      Parameters:
      status - the subscription end reason.
    • getActiveSubscriptions

      public Map<String,SubscriptionManager> getActiveSubscriptions()
      Description copied from interface: EventSource
      Returns all active subscription ids with their SubscriptionManager.
      Specified by:
      getActiveSubscriptions in interface EventSource
      Returns:
      Map of subscription ids and SubscriptionManagers.
    • startUp

      protected void startUp()
      Specified by:
      startUp in class com.google.common.util.concurrent.AbstractIdleService
    • shutDown

      protected void shutDown()
      Specified by:
      shutDown in class com.google.common.util.concurrent.AbstractIdleService