|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface EventSource
Events sources are the source of server-side notifications, which interested clients may subscribe to.
The DPWS framework supports two types of WSDL 1.1 and WS-Eventing compliant events: notifications and solicit-response operations. While the first ones represent one-way messages sent from the event source to its subscribers, the later additionally includes response messages sent back from the subscribers to the source.
Clients willing to receive notifications from this event source may simply
subscribe to it. A
subscription can be defined to expire after a certain amount of time (
duration) or it may last "forever", i.e. until either the
event source or the subscriber explicitly cancels it or it terminates due to
shutdown or missing network reachability.
| Method Summary | |
|---|---|
boolean |
isNotification()
Returns true, if the transmission type of this event source
is WSDLOperation.TYPE_NOTIFICATION. |
boolean |
isSolicitResponse()
Returns true, if the transmission type of this event source
is WSDLOperation.TYPE_SOLICIT_RESPONSE. |
ClientSubscription |
subscribe(EventListener client,
long duration)
Allows a client to subscribe to this event source. |
ClientSubscription |
subscribe(EventListener eventListener,
long duration,
DataStructure bindings)
Allows a listener to subscribe to this event source. |
| Methods inherited from interface org.ws4d.java.service.OperationDescription |
|---|
createFaultValue, createInputValue, createOutputValue, getFault, getFaultCount, getFaults, getInput, getInputAction, getInputName, getName, getOutput, getOutputAction, getOutputName, getPortType, getService, getType |
| Method Detail |
|---|
boolean isNotification()
true, if the transmission type of this event source
is WSDLOperation.TYPE_NOTIFICATION. Returns false in
any other case.
notification event sourceboolean isSolicitResponse()
true, if the transmission type of this event source
is WSDLOperation.TYPE_SOLICIT_RESPONSE. Returns
false in any other case.
solicit-response
event source
ClientSubscription subscribe(EventListener client,
long duration)
throws EventingException,
TimeoutException
duration milliseconds or it will not expire at all
when the value of duration is 0.
This method will generate auto-bindings when subscribing to an event
source which belongs to a remotely deployed DPWS service.
This/These binding(s) will be used to open a local event
sink and listen for incoming notifications.
This method returns a ClientSubscription instance, which can be
used to explore and manage the state of the subscription (e.g. renew or
unsubscribe, etc.).
client - the client to which notification messages from this event
source are to be sentduration - time until subscription expires in milliseconds;
0 means subscription never expires
TimeoutException - if this event source belongs to a remote service
and sending the subscription to it timed out
EventingException - if an error occurs during subscription
ClientSubscription subscribe(EventListener eventListener,
long duration,
DataStructure bindings)
throws EventingException,
TimeoutException
duration milliseconds or it will not expire at
all, in case the value of duration is 0.
When subscribing to an event source, which belongs to a remotely
deployed DPWS service, it is important to include at least one
CommunicationBinding within the argument bindings.
This/These binding(s) will be used to open a local event
sink and listen for incoming notifications.
This method returns a ClientSubscription instance, which can be
used to explore and manage the state of the subscription (e.g. renew or
unsubscribe, etc.).
eventListener - the listener to which notification messages from
this event source are to be sentduration - time until subscription expires in milliseconds;
0 means subscription never expiresbindings - a data structure consisting of one or more
CommunicationBinding instances; those are used to bind
a local event sink to and allow it to listen
for event notifications from a remote service
TimeoutException - if this event source belongs to a remote service
and sending the subscription to it timed out
EventingException - if an error occurs during subscription
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||