org.ws4d.java.service
Class ServiceSubscription

java.lang.Object
  extended by org.ws4d.java.service.ServiceSubscription

public class ServiceSubscription
extends java.lang.Object

Instances of this class hold essential information about an event subscription as seen from the server-side. These include the endpoint reference to which events are to be delivered, the actions the subscription addresses, its expiration time and the optional endpoint to which the server-initiated end of the subscription should be announced.


Constructor Summary
ServiceSubscription(ProtocolInfo pInfo)
           
 
Method Summary
 java.lang.String getCommunicationManagerID()
          Returns the ID of the protocol to communicate over with the client (aka.
 EprInfo getEndTo()
          Returns the (optional) EprInfo to which a server-side cancellation of the subscription should be announced.
 long getExpirationTime()
          Returns the expiration time of this subscription in milliseconds from the epoch.
 Iterator getFilterActions()
          Returns a read-only iterator over the set of action URIs to which this subscription refers.
 EprInfo getNotifyTo()
          Returns the EprInfo to which notifications matching this subscription shall be sent.
 ProtocolInfo getProtocolInfo()
           
 EndpointReference getSubscriptionManager()
          Returns the EPR of the subscription manager governing the state of this service subscription.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceSubscription

public ServiceSubscription(ProtocolInfo pInfo)
Method Detail

getExpirationTime

public long getExpirationTime()
Returns the expiration time of this subscription in milliseconds from the epoch.

Returns:
the expiration time

getNotifyTo

public EprInfo getNotifyTo()
Returns the EprInfo to which notifications matching this subscription shall be sent.

Be aware that the xAddress of the returned EprInfo may be null if the endpoint reference is not a transport address

Returns:
the EprInfo to which to send notifications

getEndTo

public EprInfo getEndTo()
Returns the (optional) EprInfo to which a server-side cancellation of the subscription should be announced.

Be aware that the xAddress of the returned EprInfo may be null if the endpoint reference is not a transport address

Returns:
the EprInfo to which to send a subscription-end announcement

getCommunicationManagerID

public java.lang.String getCommunicationManagerID()
Returns the ID of the protocol to communicate over with the client (aka. event sink) for this subscription. In other words, this is the same protocol to use when sending messages to either one of the notify-to or end-to addresses.

Returns:
the ID of the protocol to use for communication with the subscriber of this subscription

getFilterActions

public Iterator getFilterActions()
Returns a read-only iterator over the set of action URIs to which this subscription refers. This method never returns null, it will instead return an empty iterator in the case where no filter actions are available.

Returns:
an iterator over URI instances representing the actions to which this subscription refers

getSubscriptionManager

public EndpointReference getSubscriptionManager()
Returns the EPR of the subscription manager governing the state of this service subscription. Usually, this EPR includes - in addition to the manager's address - a server-side identifier (e.g. wse:Identifier from WS-Eventing) for this subscription instance.

Returns:
the endpoint reference of the subscription manager for this subscription

getProtocolInfo

public ProtocolInfo getProtocolInfo()