org.apache.ws.notification.base.impl
Class AbstractSubscription

java.lang.Object
  extended byorg.apache.ws.notification.base.impl.AbstractSubscription
All Implemented Interfaces:
org.apache.ws.resource.PropertiesResource, org.apache.ws.resource.Resource, org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource, Subscription, Subscription
Direct Known Subclasses:
Subscription, SubscriptionResource

public abstract class AbstractSubscription
extends java.lang.Object
implements Subscription, org.apache.ws.resource.PropertiesResource

TODO


Field Summary
protected  org.apache.ws.addressing.EndpointReference m_consumerReference
           
protected  java.util.Calendar m_creationTime
           
protected  org.apache.ws.addressing.EndpointReference m_epr
           
protected  java.lang.String m_id
           
protected  boolean m_isPaused
           
protected  java.lang.Object m_policy
           
protected  org.apache.ws.resource.properties.query.QueryExpression m_precondition
           
protected  java.lang.String m_producerHomeLocation
           
protected  org.apache.ws.resource.ResourceKey m_producerKey
           
protected  org.apache.ws.addressing.EndpointReference m_producerReference
           
protected  org.apache.ws.resource.properties.ResourcePropertySet m_propSet
           
protected  org.apache.ws.resource.properties.query.QueryExpression m_selector
           
protected  java.util.Calendar m_terminationTime
           
protected  TopicExpression m_topicExpression
           
protected  boolean m_useNotify
           
 
Constructor Summary
AbstractSubscription()
           
AbstractSubscription(org.apache.ws.addressing.EndpointReference consumerReference, org.apache.ws.addressing.EndpointReference producerReference, org.apache.ws.resource.ResourceKey producerKey, java.lang.String producerHomeLocation, TopicExpression topicExpression)
          Construct a new subscription resource.
 
Method Summary
 void addTerminationListener(org.apache.ws.resource.lifetime.ResourceTerminationListener resourceTerminationListener)
           
 void destroy()
           
 org.apache.ws.addressing.EndpointReference getConsumerReference()
          Gets the consumer EPR associated with this subscription.
 java.util.Calendar getCreationTime()
          Returns the time at which this subscription was created.
 java.util.Calendar getCurrentTime()
           
 java.net.URI getDeliveryMode()
           
 org.apache.ws.addressing.EndpointReference getEndpointReference()
           
 Filter getFilters()
          Returns a list of any notification filters that are associated with this subscription.
 java.lang.Object getID()
           
 NotificationConsumer getNotificationConsumer()
          Get the notification consumer associated with this subscription.
 NotificationProducer getNotificationProducer()
          Get the notification producer associated with this subscription.
 java.lang.Object getPolicy()
           
 org.apache.ws.resource.properties.query.QueryExpression getPrecondition()
          Gets the precondition associated with this subscription.
 org.apache.ws.addressing.EndpointReference getProducerReference()
           
 NotificationProducerResource getProducerResource()
          Gets the producer resource associated with this subscription.
 org.apache.ws.resource.properties.ResourcePropertySet getResourcePropertySet()
           
 org.apache.ws.resource.properties.query.QueryExpression getSelector()
          Gets the selector associated with this subscription.
 java.util.Calendar getTerminationTime()
          Gets the termination time for this subscription (i.e.
 TopicExpression getTopicExpression()
          Gets the topic expression associated with this subscription.
 boolean getUseNotify()
          Wrap notification messages in the notify element?
 boolean isPaused()
          Returns true if this subscription is currently paused, or false otherwise.
 void pause()
          Temporarily suspends the delivery of notification messages for this subscription.
 void resume()
          Resumes the delivery of notification messages for this subscription.
 void setEndpointReference(org.apache.ws.addressing.EndpointReference epr)
           
 void setID(java.lang.Object o)
           
 void setNotificationConsumer(NotificationConsumer notificationConsumer)
           
 void setNotificationProducer(NotificationProducer notificationProducer)
           
 void setPolicy(java.lang.Object policy)
           
 void setPrecondition(org.apache.ws.resource.properties.query.QueryExpression precondition)
           
 void setSelector(org.apache.ws.resource.properties.query.QueryExpression selector)
           
 void setTerminationTime(java.util.Calendar time)
          Sets the termination time for this subscription (i.e.
 void setUseNotify(boolean useNotify)
           
 void unsubscribe()
          Cancel this subscription.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.ws.resource.PropertiesResource
setResourcePropertySet
 
Methods inherited from interface org.apache.ws.resource.Resource
init
 
Methods inherited from interface org.apache.ws.pubsub.Subscription
getSubscriptionEndConsumer
 

Field Detail

m_consumerReference

protected org.apache.ws.addressing.EndpointReference m_consumerReference

m_producerReference

protected org.apache.ws.addressing.EndpointReference m_producerReference

m_policy

protected java.lang.Object m_policy

m_precondition

protected org.apache.ws.resource.properties.query.QueryExpression m_precondition

m_selector

protected org.apache.ws.resource.properties.query.QueryExpression m_selector

m_producerKey

protected org.apache.ws.resource.ResourceKey m_producerKey

m_producerHomeLocation

protected java.lang.String m_producerHomeLocation

m_topicExpression

protected TopicExpression m_topicExpression

m_isPaused

protected boolean m_isPaused

m_useNotify

protected boolean m_useNotify

m_terminationTime

protected java.util.Calendar m_terminationTime

m_creationTime

protected java.util.Calendar m_creationTime

m_id

protected java.lang.String m_id

m_epr

protected org.apache.ws.addressing.EndpointReference m_epr

m_propSet

protected transient org.apache.ws.resource.properties.ResourcePropertySet m_propSet
Constructor Detail

AbstractSubscription

public AbstractSubscription(org.apache.ws.addressing.EndpointReference consumerReference,
                            org.apache.ws.addressing.EndpointReference producerReference,
                            org.apache.ws.resource.ResourceKey producerKey,
                            java.lang.String producerHomeLocation,
                            TopicExpression topicExpression)
Construct a new subscription resource.

Parameters:
consumerReference - The WS-Addressing endpoint reference of the consumer
producerReference - The WS-Addressing endpoint reference of the producer
producerKey - The key of the producer resource
producerHomeLocation - The JNDI location of the home of the producer resource
topicExpression - The topic expression for this subscription

AbstractSubscription

public AbstractSubscription()
Method Detail

getResourcePropertySet

public org.apache.ws.resource.properties.ResourcePropertySet getResourcePropertySet()
Specified by:
getResourcePropertySet in interface org.apache.ws.resource.PropertiesResource

setTerminationTime

public void setTerminationTime(java.util.Calendar time)
Description copied from interface: Subscription
Sets the termination time for this subscription (i.e. the time at which it expires).

Specified by:
setTerminationTime in interface Subscription
Parameters:
time - the termination time

getTerminationTime

public java.util.Calendar getTerminationTime()
Description copied from interface: Subscription
Gets the termination time for this subscription (i.e. the time at which it expires).

Specified by:
getTerminationTime in interface Subscription
Returns:
the termination time

getCurrentTime

public java.util.Calendar getCurrentTime()
Specified by:
getCurrentTime in interface org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource

getCreationTime

public java.util.Calendar getCreationTime()
Description copied from interface: Subscription
Returns the time at which this subscription was created.

Specified by:
getCreationTime in interface Subscription
Returns:
the time at which this subscription was created

getConsumerReference

public org.apache.ws.addressing.EndpointReference getConsumerReference()
Description copied from interface: Subscription
Gets the consumer EPR associated with this subscription.

Specified by:
getConsumerReference in interface Subscription
Returns:
the consumer EPR associated with this subscription

getPolicy

public java.lang.Object getPolicy()

getPrecondition

public org.apache.ws.resource.properties.query.QueryExpression getPrecondition()
Description copied from interface: Subscription
Gets the precondition associated with this subscription.

Specified by:
getPrecondition in interface Subscription
Returns:
the precondition, or null if no precondition was specified in the subscribe request

getProducerReference

public org.apache.ws.addressing.EndpointReference getProducerReference()

getProducerResource

public NotificationProducerResource getProducerResource()
Description copied from interface: Subscription
Gets the producer resource associated with this subscription.

Specified by:
getProducerResource in interface Subscription
Returns:
the producer resource

getSelector

public org.apache.ws.resource.properties.query.QueryExpression getSelector()
Description copied from interface: Subscription
Gets the selector associated with this subscription.

Specified by:
getSelector in interface Subscription
Returns:
the selector, or null if no selector was specified in the subscribe request

getTopicExpression

public TopicExpression getTopicExpression()
Description copied from interface: Subscription
Gets the topic expression associated with this subscription.

Specified by:
getTopicExpression in interface Subscription
Returns:
the topic expression

isPaused

public boolean isPaused()
Description copied from interface: Subscription
Returns true if this subscription is currently paused, or false otherwise.

Specified by:
isPaused in interface Subscription
Returns:
true if this subscription is currently paused, or false otherwise

pause

public void pause()
           throws java.lang.Exception
Description copied from interface: Subscription
Temporarily suspends the delivery of notification messages for this subscription.

Specified by:
pause in interface Subscription
Throws:
java.lang.Exception - if unable to suspend message delivery

resume

public void resume()
            throws java.lang.Exception
Description copied from interface: Subscription
Resumes the delivery of notification messages for this subscription.

Specified by:
resume in interface Subscription
Throws:
java.lang.Exception - if unable to resume message delivery

getUseNotify

public boolean getUseNotify()
Description copied from interface: Subscription
Wrap notification messages in the notify element?

Specified by:
getUseNotify in interface Subscription
Returns:
true (default) if notify should be used, or false if not

getID

public java.lang.Object getID()
Specified by:
getID in interface org.apache.ws.resource.Resource

setID

public void setID(java.lang.Object o)
Specified by:
setID in interface org.apache.ws.resource.Resource

destroy

public void destroy()
Specified by:
destroy in interface org.apache.ws.resource.Resource

unsubscribe

public void unsubscribe()
Description copied from interface: Subscription
Cancel this subscription.

Specified by:
unsubscribe in interface Subscription

getFilters

public Filter getFilters()
Description copied from interface: Subscription
Returns a list of any notification filters that are associated with this subscription. The filters are ordered in the order in which they will be applied to notifications.

Specified by:
getFilters in interface Subscription
Returns:
a list of any notification filters that are associated with this subscription

getDeliveryMode

public java.net.URI getDeliveryMode()

getNotificationConsumer

public NotificationConsumer getNotificationConsumer()
Description copied from interface: Subscription
Get the notification consumer associated with this subscription.

Specified by:
getNotificationConsumer in interface Subscription
Returns:
the notification consumer

getNotificationProducer

public NotificationProducer getNotificationProducer()
Description copied from interface: Subscription
Get the notification producer associated with this subscription.

Specified by:
getNotificationProducer in interface Subscription
Returns:
the notification producer

getEndpointReference

public org.apache.ws.addressing.EndpointReference getEndpointReference()
Specified by:
getEndpointReference in interface org.apache.ws.resource.Resource

setEndpointReference

public void setEndpointReference(org.apache.ws.addressing.EndpointReference epr)
Specified by:
setEndpointReference in interface Subscription

setNotificationConsumer

public void setNotificationConsumer(NotificationConsumer notificationConsumer)
Specified by:
setNotificationConsumer in interface Subscription

setNotificationProducer

public void setNotificationProducer(NotificationProducer notificationProducer)
Specified by:
setNotificationProducer in interface Subscription

addTerminationListener

public void addTerminationListener(org.apache.ws.resource.lifetime.ResourceTerminationListener resourceTerminationListener)
Specified by:
addTerminationListener in interface org.apache.ws.resource.Resource

setPolicy

public void setPolicy(java.lang.Object policy)
Specified by:
setPolicy in interface Subscription

setPrecondition

public void setPrecondition(org.apache.ws.resource.properties.query.QueryExpression precondition)
Specified by:
setPrecondition in interface Subscription

setSelector

public void setSelector(org.apache.ws.resource.properties.query.QueryExpression selector)
Specified by:
setSelector in interface Subscription

setUseNotify

public void setUseNotify(boolean useNotify)
Specified by:
setUseNotify in interface Subscription


Copyright © 2004-2005 Apache Software Foundation. All Rights Reserved.