Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.muse.ws.notification
Interface NotificationConsumer

All Superinterfaces:
  Capability, Initialization, InitializationParameters, Shutdown

All Known Implementing Classes:
  SimpleNotificationConsumer

public interface NotificationConsumer
extends Capability

NotificationConsumer is an interface that represents the WS-Notification NotificationConsumer port type; it is based on WS-N 1.3.
This interface adds a observer-style API to the port type operation (wsnt:Notify) so that consumers can respond to incoming messages without having to rewrite the NotificationConsumer implementation code.

Author:
  Dan Jemiolo (danj)

Method Summary
`void` | `addMessageListener(NotificationMessageListener listener)` Adds the listener to the list of listeners that will be notified whenever a message is received by the resource.
`void` | `addTopicListener(TopicListener listener)` Adds the listener to the list of listeners that will be notified whenever a message is received that has the given WSN Topic.
`java.util.Collection` | `getMessageListeners()`
`java.util.Collection` | `getTopicListeners(QName topic)`
`void` | `notify(NotificationMessage[] messages)` Informs the resource of WS-N notification messages that have been received.
`void` | `removeMessageListener(NotificationMessageListener listener)`
`void` | `removeTopicListener(TopicListener listener)`

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`

Method Detail

### addMessageListener

    public void addMessageListener(NotificationMessageListener listener)

  Adds the listener to the list of listeners that will be notified whenever a message is received by the resource.

  Parameters:
    `listener` -

### addTopicListener

    public void addTopicListener(TopicListener listener)

  Adds the listener to the list of listeners that will be notified whenever a message is received that has the given WSN Topic. These listeners will be fired whenever a message is received that has the listener's topic, regardless of what is returned by accepts().

  Parameters:
    `listener` -

### getMessageListeners

    public java.util.Collection getMessageListeners()

  Returns:
    The listeners that are currently receiving notifications.

### getTopicListeners

    public java.util.Collection getTopicListeners(QName topic)

  Returns:
    The listeners that are currently receiving notifications for the given WSN Topic.

### notify

    public void notify(NotificationMessage[] messages)

  Informs the resource of WS-N notification messages that have been received. How the messages are processed by the resource is an implementation detail.

  Parameters:
    `messages` -

### removeMessageListener

    public void removeMessageListener(NotificationMessageListener listener)

### removeTopicListener

    public void removeTopicListener(TopicListener listener)

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD