org.apache.ws.notification.base
Interface NotificationProducerResource

All Superinterfaces:
org.apache.ws.resource.PropertiesResource, org.apache.ws.resource.Resource

public interface NotificationProducerResource
extends org.apache.ws.resource.PropertiesResource

A resource that implements the WS-BaseNotification NotificationProducer portType. Provides access to the resource's TopicSet and ResourcePropertySet.


Method Summary
 java.lang.Object getCurrentMessage(TopicExpression topicExpr)
          Returns the current message for the specified topic (i.e.
 TopicSet getTopicSet()
          Returns the set of topics supported by this NotificationProducer.
 void publish(TopicExpression topic, java.lang.Object msg)
          Publishes the given message to the topic identified by the given topic expression.
 org.apache.ws.addressing.EndpointReference subscribe(org.apache.ws.addressing.EndpointReference consumerEPR, TopicExpression topicExpr, java.lang.Boolean useNotify, org.apache.ws.resource.properties.query.QueryExpression precondition, org.apache.ws.resource.properties.query.QueryExpression selector, java.lang.Object subscriptionPolicy, java.util.Calendar initialTerminationtime)
          Subscribe to the topic(s) indicated by the specified topic expression.
 
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
 

Method Detail

getCurrentMessage

public java.lang.Object getCurrentMessage(TopicExpression topicExpr)
                                   throws InvalidTopicExpressionException,
                                          org.apache.ws.notification.base.impl.TopicNotSupportedException,
                                          org.apache.ws.notification.base.impl.NoCurrentMessageOnTopicException
Returns the current message for the specified topic (i.e. the last message that was published to the topic).

Parameters:
topicExpr - a topic expression describing EXACTLY ONE topic
Returns:
Throws:
InvalidTopicExpressionException
org.apache.ws.notification.base.impl.TopicNotSupportedException
org.apache.ws.notification.base.impl.NoCurrentMessageOnTopicException

getTopicSet

public TopicSet getTopicSet()
Returns the set of topics supported by this NotificationProducer.

Returns:
the set of topics supported by this NotificationProducer

publish

public void publish(TopicExpression topic,
                    java.lang.Object msg)
             throws org.apache.ws.notification.base.impl.TopicNotSupportedException,
                    InvalidTopicExpressionException,
                    org.apache.ws.notification.base.impl.MessageTypeNotSupportedException
Publishes the given message to the topic identified by the given topic expression.

Parameters:
topic - a topic expression describing EXACTLY ONE topic
msg - the notification message to be published - may be a Node or an XmlObject
Throws:
org.apache.ws.notification.base.impl.TopicNotSupportedException
InvalidTopicExpressionException
org.apache.ws.notification.base.impl.MessageTypeNotSupportedException

subscribe

public org.apache.ws.addressing.EndpointReference subscribe(org.apache.ws.addressing.EndpointReference consumerEPR,
                                                            TopicExpression topicExpr,
                                                            java.lang.Boolean useNotify,
                                                            org.apache.ws.resource.properties.query.QueryExpression precondition,
                                                            org.apache.ws.resource.properties.query.QueryExpression selector,
                                                            java.lang.Object subscriptionPolicy,
                                                            java.util.Calendar initialTerminationtime)
                                                     throws org.apache.ws.notification.base.impl.SubscribeCreationFailedException,
                                                            InvalidTopicExpressionException,
                                                            TopicPathDialectUnknownException
Subscribe to the topic(s) indicated by the specified topic expression. Notifications for the subscription will be sent to the specified consumer EPR. Other optional parameters may also be specified.

Parameters:
consumerEPR -
topicExpr -
useNotify -
precondition -
selector -
subscriptionPolicy -
initialTerminationtime -
Returns:
Throws:
org.apache.ws.notification.base.impl.SubscribeCreationFailedException
InvalidTopicExpressionException
TopicPathDialectUnknownException


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