org.apache.muse.ws.notification
Interface SubscriptionManager

All Superinterfaces:
Capability, Initialization, InitializationParameters, Shutdown, WsResourceCapability, XmlSerializable
All Known Implementing Classes:
SimpleSubscriptionManager

public interface SubscriptionManager
extends WsResourceCapability, XmlSerializable

SubscriptionManager is an interface that represents the WS-Notification SubscriptionManager port type; it is based on WS-N v1.3. Resources that use this capability represent an agreement between a resource and the consumers that are listening to its notifications. Destroying a subscription resource ends the relationship and the consumer will no longer receive messages from the producer resource.

Muse represents all WS-N subscriptions at WS-RF implied resources. They are accessible through a unique endpoint and can be destroyed via WS-RL if the WS-RL capabilities are used. Adding this capability to a resource type gives it all of the required features of a WS-N subscription resource.

Author:
Dan Jemiolo (danj)

Field Summary
static QName[] PROPERTIES
           
 
Method Summary
 void deleteProperty(QName property)
           
 EndpointReference getConsumerReference()
           
 Date getCreationTime()
           
 Filter getFilter()
           
 EndpointReference getProducerReference()
           
 Element[] getProperty(QName property)
           
 QName[] getPropertyNames()
          Concrete capability classes that define properties MUST override this method and provide the names of the properties.
 Policy getSubscriptionPolicy()
           
 void insertProperty(QName property, Element[] values)
           
 boolean isPaused()
           
 void pauseSubscription()
          Temporarily stops the producer resource from sending messages that are published to consumer.
 void publish(NotificationMessage message)
          Sends the given message to the subscription's consumer resource.
 void resumeSubscription()
          If the subscription is paused, it is unpaused, so that messages published to the topic will once again be sent to the consumer.
 void setConsumerReference(EndpointReference consumer)
           
 void setFilter(Filter filter)
           
 void setProducerReference(EndpointReference producer)
           
 void setSubscriptionPolicy(Policy policy)
           
 void updateProperty(QName property, Element[] values)
           
 
Methods inherited from interface org.apache.muse.ws.resource.WsResourceCapability
getWsResource
 
Methods inherited from interface org.apache.muse.core.Capability
getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setLog, setMessageHandlers, setPersistence, setResource
 
Methods inherited from interface org.apache.muse.core.Initialization
hasBeenInitialized, initialize
 
Methods inherited from interface org.apache.muse.core.InitializationParameters
getInitializationParameter, getInitializationParameters, setInitializationParameters
 
Methods inherited from interface org.apache.muse.core.Shutdown
hasBeenShutdown, shutdown
 
Methods inherited from interface org.apache.muse.util.xml.XmlSerializable
toXML, toXML
 

Field Detail

PROPERTIES

static final QName[] PROPERTIES
Method Detail

getConsumerReference

EndpointReference getConsumerReference()
Returns:
The EPR of the resource that is receiving the notifications.

getCreationTime

Date getCreationTime()
Returns:
The time that the subscription resource was created.

getFilter

Filter getFilter()
Returns:
The filter that provided when the subscription was created.

getProducerReference

EndpointReference getProducerReference()
Returns:
The EPR of the resource that created the subscription (when subscribe() was called).

getSubscriptionPolicy

Policy getSubscriptionPolicy()
Returns:
The policy that provided when the subscription was created.

isPaused

boolean isPaused()
Returns:
True if the subscription is paused and not publishing messages to its consumer.

pauseSubscription

void pauseSubscription()
                       throws PauseFailedFault
Temporarily stops the producer resource from sending messages that are published to consumer. This does not involved terminating the subscription with WS-RL - the subscription resource will remain intact through the pause. Messages will only be sent again if the resumeSubscription() operation is invoked on the subscription.

If the subscription is already paused, the result is a no-op (the operation is idempotent).

Throws:
PauseFailedFault

publish

void publish(NotificationMessage message)
             throws SoapFault
Sends the given message to the subscription's consumer resource.

Parameters:
message -
Throws:
SoapFault

resumeSubscription

void resumeSubscription()
                        throws ResumeFailedFault
If the subscription is paused, it is unpaused, so that messages published to the topic will once again be sent to the consumer. If the subscription was not paused, the result is a no-op (the operation is idempotent).

Throws:
ResumeFailedFault

setConsumerReference

void setConsumerReference(EndpointReference consumer)

setFilter

void setFilter(Filter filter)

setProducerReference

void setProducerReference(EndpointReference producer)

setSubscriptionPolicy

void setSubscriptionPolicy(Policy policy)

deleteProperty

void deleteProperty(QName property)
                    throws BaseFault
Throws:
BaseFault

getProperty

Element[] getProperty(QName property)
                      throws BaseFault
Throws:
BaseFault

getPropertyNames

QName[] getPropertyNames()
Concrete capability classes that define properties MUST override this method and provide the names of the properties.

Returns:
The names of the resource properties defined by this capability.

insertProperty

void insertProperty(QName property,
                    Element[] values)
                    throws BaseFault
Throws:
BaseFault

updateProperty

void updateProperty(QName property,
                    Element[] values)
                    throws BaseFault
Throws:
BaseFault


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.