|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NotificationProducer
NotificationProducer is an interface that represents the WS-Notification
NotificationProducer port type; it is based on WS-N 1.3. It provides support
for the NotificationProducer properties (all topic-related) as well as its
two operations: GetCurrentMessage and Subscribe. It also has methods for
managing the resource's topic set using Muse's Topic API.
Perhaps the most significant API for users of WS-N is the publish() method;
this method allows users to send message content to subscribers without
having to know anything about the maintenance of subscriptions and how to
determine which messages are sent to which subscribers. The publish() method
allows user code to focus on generating event content and then let the WS-N
implementation determine how and where to put it on the wire.
Field Summary | |
---|---|
static QName[] |
PROPERTIES
|
Method Summary | |
---|---|
void |
addSubscription(WsResource subscription)
This method is for internal (service-side) code that wishes to add a subscription that has already been created (perhaps from data residing in a persistent data store) and does not require a call to subscribe(). |
Topic |
addTopic(QName topicName)
Creates a topic in the resource's topic set and adds it to the appropriate topic namespace. |
TopicNamespace |
addTopicNamespace(String namespace)
Creates a topic namespace in the resource's topic set using the given URI. |
void |
deleteProperty(QName property)
|
NotificationMessage |
getCurrentMessage(QName topicPath)
Retrieves the last message published for a given topic. |
boolean |
getFixedTopicSet()
|
Element[] |
getProperty(QName property)
|
QName[] |
getPropertyNames()
Concrete capability classes that define properties MUST override this method and provide the names of the properties. |
Topic |
getTopic(QName topicName)
|
QName[] |
getTopicExpression()
|
String[] |
getTopicExpressionDialect()
|
TopicNamespace |
getTopicNamespace(String namespace)
|
TopicSet |
getTopicSet()
|
boolean |
hasTopic(QName topicName)
|
void |
insertProperty(QName property,
Element[] values)
|
void |
publish(QName topicName,
Element content)
Creates a WS-N notification message with the given topic and message content and sends it to the appropriate subscribers. |
void |
publish(QName topicName,
Element[] content)
|
void |
publish(QName topicName,
QName[] contentName,
Object[] content)
|
void |
publish(QName topicName,
QName contentName,
Object content)
This is a convenience method that calls publish(QName, Element) after the given content object has been serialized to XML using the Muse serializer framework. |
void |
publish(QName topicName,
XmlSerializable content)
This is a convenience method that calls publish(QName, Element) after the XmlSerializable object has been serialized to XML. |
void |
publish(QName topicName,
XmlSerializable[] content)
|
void |
removeSubscription(EndpointReference subscriptionEPR)
This method is for internal (service-side) code that wishes to remove a subscription so that messages are no longer published to its subscriber. |
WsResource |
subscribe(EndpointReference consumer,
Filter filter,
Date terminationTime,
Policy policy)
Registers a consumer resource to receive events that are published to a certain topic (along with other filtering rules). |
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 |
Field Detail |
---|
static final QName[] PROPERTIES
Method Detail |
---|
void addSubscription(WsResource subscription)
subscription
- Topic addTopic(QName topicName) throws BaseFault
topicName
- The name of the topic, where the namespace matches the topic
namespace the topic belongs to and the local part is a path
that defines the topic's hierarchy (the path may also be a
simple name, no slashes).
BaseFault
TopicNamespace addTopicNamespace(String namespace) throws BaseFault
BaseFault
NotificationMessage getCurrentMessage(QName topicPath) throws TopicExpressionDialectUnknownFault, InvalidTopicExpressionFault, TopicNotSupportedFault, MultipleTopicsSpecifiedFault, NoCurrentMessageOnTopicFault
topicPath
- The name of the Topic whose last message you wish to retrieve.
TopicExpressionDialectUnknownFault
InvalidTopicExpressionFault
TopicNotSupportedFault
MultipleTopicsSpecifiedFault
NoCurrentMessageOnTopicFault
boolean getFixedTopicSet() throws BaseFault
BaseFault
Topic getTopic(QName topicName)
topicName
-
QName[] getTopicExpression() throws BaseFault
BaseFault
String[] getTopicExpressionDialect() throws BaseFault
BaseFault
TopicNamespace getTopicNamespace(String namespace)
namespace
-
TopicSet getTopicSet()
boolean hasTopic(QName topicName)
topicName
-
void publish(QName topicName, Element content) throws SoapFault
topicName
- The WS-N topic associated with the message. This is optional (it
can be null).content
- The XML fragment that will be put under the wsnt:Message section
of the notification message. This is also called the 'payload'.
SoapFault
void publish(QName topicName, Element[] content) throws SoapFault
SoapFault
void publish(QName topicName, XmlSerializable content) throws SoapFault
SoapFault
void publish(QName topicName, XmlSerializable[] content) throws SoapFault
SoapFault
void publish(QName topicName, QName contentName, Object content) throws SoapFault
topicName
- The WS-N topic associated with the message. This is optional (it
can be null).contentName
- The name of the root element of the payload. This will be
passed to Serializer.toXML() when converting the content
value to XML.content
- The value that will be converted to XML and then put under the
wsnt:Message section of the notification message. This is also
called the 'payload'.
SoapFault
void publish(QName topicName, QName[] contentName, Object[] content) throws SoapFault
SoapFault
void removeSubscription(EndpointReference subscriptionEPR)
subscription
- WsResource subscribe(EndpointReference consumer, Filter filter, Date terminationTime, Policy policy) throws InvalidFilterFault, TopicExpressionDialectUnknownFault, InvalidTopicExpressionFault, TopicNotSupportedFault, InvalidProducerPropertiesExpressionFault, InvalidMessageContentExpressionFault, UnacceptableInitialTerminationTimeFault, UnrecognizedPolicyRequestFault, UnsupportedPolicyRequestFault, NotifyMessageNotSupportedFault, SubscribeCreationFailedFault
consumer
- The EPR of the resource that will receive the notifications
from the producing resource. This does not have to
be the same component that is making the subscribe() request.
An orchestrating service may be subscribing for the consumer.filter
- Optional filter that allows for messages to be published if
they meet a certain criteria. Filter types include topic names,
message patterns (XPath), and current state (WSRP doc).policy
- Optional filter that allows for more complex analysis on the
conditions needed to send a message. The implementation must
provide one or more policy languages (dialects) that clients
can use to express how and when a message that is published
to a topic should be sent. If this parameter is null, no
policy is applied.terminationTime
- Because subscriptions are WS-resources, they may be terminated
with scheduled termination (specifically, the WS-RL TerminationTime
property). If this parameter is null, no termination time is set.
InvalidFilterFault
TopicExpressionDialectUnknownFault
InvalidTopicExpressionFault
TopicNotSupportedFault
InvalidProducerPropertiesExpressionFault
InvalidMessageContentExpressionFault
UnacceptableInitialTerminationTimeFault
UnrecognizedPolicyRequestFault
UnsupportedPolicyRequestFault
NotifyMessageNotSupportedFault
SubscribeCreationFailedFault
void deleteProperty(QName property) throws BaseFault
BaseFault
Element[] getProperty(QName property) throws BaseFault
BaseFault
QName[] getPropertyNames()
void insertProperty(QName property, Element[] values) throws BaseFault
BaseFault
void updateProperty(QName property, Element[] values) throws BaseFault
BaseFault
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |