org.ws4d.java.eventing
Interface EventListener

All Known Implementing Classes:
DefaultClient

public interface EventListener

The primary callback interface for handling events and other WS-Eventing related notifications.


Method Summary
 ParameterValue eventReceived(ClientSubscription subscription, URI actionURI, ParameterValue parameterValue)
          Callback method to receive events.
 EventSink getEventSink(DataStructure bindings)
          Gets an event sink, which can be used when registering for event notifications from a service.
 void subscriptionEndReceived(ClientSubscription subscription, URI reason)
          Callback method to receive unexpected subscription ends from event sources.
 void subscriptionTimeoutReceived(ClientSubscription subscription)
          Callback method to receive timeouts of subscriptions.
 

Method Detail

getEventSink

EventSink getEventSink(DataStructure bindings)
Gets an event sink, which can be used when registering for event notifications from a service. The supplied data structure bindings is supposed to contain at least one CommunicationBinding instance denoting a local transport address, at which incoming notifications shall be delivered to. The EventSink is associated with the EventListener.

Parameters:
bindings - a data structure of CommunicationBinding instances to expose the created event sink over
Returns:
the event sink

eventReceived

ParameterValue eventReceived(ClientSubscription subscription,
                             URI actionURI,
                             ParameterValue parameterValue)
Callback method to receive events. Override this to receive and handle events.

In case the received event corresponds to a WSDLOperation.TYPE_SOLICIT_RESPONSE operation, the response to send back to the event source is taken from the return value of this method.

Parameters:
subscription - this is the subscription because of which the event was received
actionURI - URI of the subscribed action
parameterValue - parameter value of notification message containing the user data
Returns:
if not null, solicit response message: parameter values will be sent as response to notification sender

subscriptionEndReceived

void subscriptionEndReceived(ClientSubscription subscription,
                             URI reason)
Callback method to receive unexpected subscription ends from event sources. If this method is called, the subscription has been removed from the event sink. Override this to receive and handle subscription ends.

Parameters:
subscription - subscription ended.
reason - Reason why the subscription ends unexpectedly

subscriptionTimeoutReceived

void subscriptionTimeoutReceived(ClientSubscription subscription)
Callback method to receive timeouts of subscriptions. Override this to receive and handle timeouts of subscriptions.

Parameters:
subscription - Ending subscription.