public interface EventSource extends OperationDescription
The JMEDS 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.
| Modifier and Type | Method and Description |
|---|---|
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,
CredentialInfo credentialInfo)
Allows a client to subscribe to this event source.
|
ClientSubscription |
subscribe(EventListener eventListener,
long duration,
DataStructure bindings,
CredentialInfo credentialInfo)
Allows a listener to subscribe to this event source.
|
createFaultValue, createInputValue, createOutputValue, getFault, getFaultCount, getFaults, getInput, getInputAction, getInputName, getName, getOutput, getOutputAction, getOutputName, getPortType, getService, getTypeboolean 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 sourceClientSubscription subscribe(EventListener client, long duration, CredentialInfo credentialInfo) throws EventingException, java.io.IOException, CommunicationException
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 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 expiresCommunicationException - if this event source belongs to a remote service and sending the subscription to it timed outEventingException - if an error occurs during subscriptionjava.io.IOExceptionClientSubscription subscribe(EventListener eventListener, long duration, DataStructure bindings, CredentialInfo credentialInfo) throws EventingException, java.io.IOException, CommunicationException
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 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
serviceCommunicationException - if this event source belongs to a remote service and sending the subscription to it timed outEventingException - if an error occurs during subscriptionjava.io.IOException