org.apache.muse.ws.notification
Interface SubscriptionManager
- All Superinterfaces:
- Capability, Initialization, InitializationParameters, Shutdown, WsResourceCapability, org.apache.muse.ws.resource.WsResourceCapabilityProperties, 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)
Methods inherited from interface org.apache.muse.core.Capability |
getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setLog, setMessageHandlers, setPersistence, setResource |
PROPERTIES
public static final QName[] PROPERTIES
getConsumerReference
public EndpointReference getConsumerReference()
- Returns:
- The EPR of the resource that is receiving the notifications.
getCreationTime
public java.util.Date getCreationTime()
- Returns:
- The time that the subscription resource was created.
getFilter
public Filter getFilter()
- Returns:
- The filter that provided when the subscription was created.
getProducerReference
public EndpointReference getProducerReference()
- Returns:
- The EPR of the resource that created the subscription (when
subscribe() was called).
getSubscriptionPolicy
public Policy getSubscriptionPolicy()
- Returns:
- The policy that provided when the subscription was created.
isPaused
public boolean isPaused()
- Returns:
- True if the subscription is paused and not publishing messages
to its consumer.
pauseSubscription
public 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
public void publish(NotificationMessage message)
throws SoapFault
- Sends the given message to the subscription's consumer resource.
- Parameters:
message
-
- Throws:
SoapFault
resumeSubscription
public 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
public void setConsumerReference(EndpointReference consumer)
setFilter
public void setFilter(Filter filter)
setProducerReference
public void setProducerReference(EndpointReference producer)
setSubscriptionPolicy
public void setSubscriptionPolicy(Policy policy)