org.apache.muse.ws.notification.impl
Class SimplePullPoint
java.lang.Object
org.apache.muse.core.AbstractCapability
org.apache.muse.ws.resource.impl.AbstractWsResourceCapability
org.apache.muse.ws.notification.impl.SimplePullPoint
- All Implemented Interfaces:
- Capability, Initialization, InitializationParameters, NotificationMessageListener, PullPoint, Shutdown, WsResourceCapability, org.apache.muse.ws.resource.WsResourceCapabilityProperties
- public class SimplePullPoint
- extends AbstractWsResourceCapability
- implements PullPoint, NotificationMessageListener
SimplePullPoint is Muse's default implementation of the WS-Notification
PullPoint port type and the data store API that augments it. Users that
want to change the way that messages are stored should override the
createDataStore() method to return an alternate implementation of the
PullPointDataStore API. The default
implementation is SimplePullPointDataStore.
- Author:
- Dan Jemiolo (danj)
| Methods inherited from class org.apache.muse.ws.resource.impl.AbstractWsResourceCapability |
createGettersAndSetters, deleteProperty, getGetter, getProperty, getPropertyElements, getPropertyNames, getSetter, getWsResource, insertProperty, invokeMethod, setResource, updateProperty |
| Methods inherited from class org.apache.muse.core.AbstractCapability |
getActions, getCapabilityURI, getEnvironment, getInitializationParameter, getInitializationParameters, getLog, getMessageHandler, getPersistence, getResource, hasBeenInitialized, hasBeenShutdown, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setInitializationParameters, setLog, setMessageHandler, setMessageHandlers, setPersistence |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.muse.core.Capability |
getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setLog, setMessageHandlers, setPersistence, setResource |
SimplePullPoint
public SimplePullPoint()
accepts
public boolean accepts(NotificationMessage message)
- Specified by:
accepts in interface NotificationMessageListener
- Parameters:
message -
- Returns:
- True if the message has a subscription EPR that matches our
subscription's EPR
createDataStore
protected PullPointDataStore createDataStore()
- Users can override this method to provide an alternate implementation
of the PullPointDataStore API.
- Returns:
- An instance of SimplePullPointDataStore
getDataStore
public PullPointDataStore getDataStore()
- Specified by:
getDataStore in interface PullPoint
- Returns:
- The storage API that is used to store the messages received by
the pullpoint from a resource.
getFilter
public Filter getFilter()
- Specified by:
getFilter in interface PullPoint
- Returns:
- An instance of PublishAllMessagesFilter. This allows the pullpoint
to add all messages to its data store.
getMessages
public NotificationMessage[] getMessages(int maxNumber)
throws UnableToGetMessagesFault
- Specified by:
getMessages in interface PullPoint
- Throws:
UnableToGetMessagesFault- See Also:
PullPointDataStore.getMessages(int)
getSubscription
public WsResource getSubscription()
- Specified by:
getSubscription in interface PullPoint
- Returns:
- The subscription resource that the pullpoint set up to receive
its messages.
initialize
public void initialize()
throws SoapFault
- Description copied from class:
AbstractWsResourceCapability
-
AbstractWsResourceCapability continues the initialization process
by inspecting the concrete class to find all of the getters (and,
if applicable, setters) for its resource properties. It then
registers itself with the resource's WSRP collection so that read
and write requests for its properties are delegated to it.
- Specified by:
initialize in interface Initialization- Overrides:
initialize in class AbstractWsResourceCapability
- Throws:
SoapFault
process
public void process(NotificationMessage message)
throws SoapFault
- Description copied from interface:
NotificationMessageListener
- This method is invoked ('fired') by the WS-N implementation whenever
a message is received that matches the criteria (accepts()) of the
listener.
- Specified by:
process in interface NotificationMessageListener
- Parameters:
message -
- Throws:
SoapFault
setSubscription
public void setSubscription(WsResource subscription)
- Specified by:
setSubscription in interface PullPoint
shutdown
public void shutdown()
throws SoapFault
- Specified by:
shutdown in interface Shutdown- Overrides:
shutdown in class AbstractCapability
- Throws:
SoapFault