org.apache.ws.notification.base
Interface Subscription

All Superinterfaces:
org.apache.ws.resource.PropertiesResource, org.apache.ws.resource.Resource, org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource, Subscription
All Known Implementing Classes:
org.apache.ws.notification.base.impl.AbstractSubscription

public interface Subscription
extends org.apache.ws.resource.PropertiesResource, Subscription, org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource

A WSN subscription resources. Exposes a subscription's properties, as well as resource lifetime-related state.


Method Summary
 org.apache.ws.addressing.EndpointReference getConsumerReference()
          Gets the consumer EPR associated with this subscription.
 java.lang.Object getPolicy()
          Gets the policy for this subscription.
 org.apache.ws.resource.properties.query.QueryExpression getPrecondition()
          Gets the precondition associated with this subscription.
 org.apache.ws.addressing.EndpointReference getProducerReference()
          Gets the producer EPR associated with this subscription.
 NotificationProducerResource getProducerResource()
          Gets the producer resource associated with this subscription.
 org.apache.ws.resource.properties.query.QueryExpression getSelector()
          Gets the selector associated with this subscription.
 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 setConsumerReference(org.apache.ws.addressing.EndpointReference consumerRef)
          Sets the consumer EPR associated with this subscription.
 void setNotificationConsumer(NotificationConsumer notificationConsumer)
          This method exists for the Pubsub abstraction layer.
 void setNotificationProducer(NotificationProducer notificationProducer)
          This method exists for the Pubsub abstraction layer.
 void setPolicy(java.lang.Object policy)
          Sets the policy for the subscription
 void setPrecondition(org.apache.ws.resource.properties.query.QueryExpression precondition)
          Sets the precondition for the subscription.
 void setSelector(org.apache.ws.resource.properties.query.QueryExpression selector)
          Sets the selector for the subscription
 void setTopicExpression(TopicExpression topicExpr)
          Sets the topic expression associated with this subscription.
 void setUseNotify(boolean useNotify)
          Sets the boolean useNotify flag on the subscription to determine if the notification is wrapped in a Notify element.
 
Methods inherited from interface org.apache.ws.resource.PropertiesResource
getResourcePropertySet, setResourcePropertySet
 
Methods inherited from interface org.apache.ws.resource.Resource
addTerminationListener, destroy, getEndpointReference, getID, getNamespaceSet, init, setEndpointReference, setID
 
Methods inherited from interface org.apache.ws.pubsub.Subscription
getCreationTime, getFilters, getNotificationConsumer, getNotificationProducer, getSubscriptionEndConsumer, getTerminationTime, setTerminationTime, unsubscribe
 
Methods inherited from interface org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource
getCurrentTime, getTerminationTime, setTerminationTime
 

Method Detail

setConsumerReference

public void setConsumerReference(org.apache.ws.addressing.EndpointReference consumerRef)
Sets the consumer EPR associated with this subscription.

Parameters:
consumerRef - the consumer EPR to be associated with this subscription

getConsumerReference

public org.apache.ws.addressing.EndpointReference getConsumerReference()
Gets the consumer EPR associated with this subscription.

Returns:
the consumer EPR associated with this subscription

setNotificationConsumer

public void setNotificationConsumer(NotificationConsumer notificationConsumer)
This method exists for the Pubsub abstraction layer.

Parameters:
notificationConsumer -

setNotificationProducer

public void setNotificationProducer(NotificationProducer notificationProducer)
This method exists for the Pubsub abstraction layer.

Parameters:
notificationProducer -

isPaused

public boolean isPaused()
Returns true if this subscription is currently paused, or false otherwise.

Returns:
true if this subscription is currently paused, or false otherwise

setPolicy

public void setPolicy(java.lang.Object policy)
Sets the policy for the subscription

Parameters:
policy -

getPolicy

public java.lang.Object getPolicy()
Gets the policy for this subscription.

Returns:
the policy for the subscription, or null if no policy is defined

setPrecondition

public void setPrecondition(org.apache.ws.resource.properties.query.QueryExpression precondition)
Sets the precondition for the subscription.

Parameters:
precondition -

getPrecondition

public org.apache.ws.resource.properties.query.QueryExpression getPrecondition()
Gets the precondition associated with this subscription.

Returns:
the precondition, or null if no precondition was specified in the subscribe request

getProducerReference

public org.apache.ws.addressing.EndpointReference getProducerReference()
Gets the producer EPR associated with this subscription. Note, the producer EPR property is read-only.

Returns:
the producer EPR associated with this subscription

getProducerResource

public NotificationProducerResource getProducerResource()
Gets the producer resource associated with this subscription.

Returns:
the producer resource

setSelector

public void setSelector(org.apache.ws.resource.properties.query.QueryExpression selector)
Sets the selector for the subscription

Parameters:
selector -

getSelector

public org.apache.ws.resource.properties.query.QueryExpression getSelector()
Gets the selector associated with this subscription.

Returns:
the selector, or null if no selector was specified in the subscribe request

setTopicExpression

public void setTopicExpression(TopicExpression topicExpr)
Sets the topic expression associated with this subscription.

Parameters:
topicExpr - the topic expression to be associated with this subscription

getTopicExpression

public TopicExpression getTopicExpression()
Gets the topic expression associated with this subscription.

Returns:
the topic expression associated with this subscription

setUseNotify

public void setUseNotify(boolean useNotify)
Sets the boolean useNotify flag on the subscription to determine if the notification is wrapped in a Notify element.

Parameters:
useNotify -

getUseNotify

public boolean getUseNotify()
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

pause

public void pause()
           throws PauseFailedException
Temporarily suspends the delivery of notification messages for this subscription.

Throws:
PauseFailedException - if unable to suspend message delivery

resume

public void resume()
            throws ResumeFailedException
Resumes the delivery of notification messages for this subscription.

Throws:
ResumeFailedException - if unable to resume message delivery


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