public interface EventSink extends Bindable
To receive events/ solicit responses, the event sink needs to have at least one CommunicationBinding. A communication binding can be added by Bindable.addBinding(CommunicationBinding) to the event sink. Afterwards the event sink must be opened by
#open(), so that all bindings are bound to their CommunicationManagers.
Important Subscribing to events is done via Service.subscribe(EventSink,
String, org.ws4d.java.types.URISet, long, CredentialInfo) .
| Modifier and Type | Method and Description |
|---|---|
void |
addSubscription(java.lang.String clientSubId,
ClientSubscription subscription)
Internal method used within the subscription process.
Subscribing to an event is done by Service.subscribe(EventSink, String,
org.ws4d.java.types.URISet, long, CredentialInfo) . |
URI |
chooseNotifyToAddress(ConnectionInfo connectionInfo,
Delivery delivery,
boolean useReferenceParameterMode) |
void |
close()
Closes event receiving for this event endpoint.
|
CommunicationStructureListener |
getCommunicationStructureListener() |
EventListener |
getEventListener()
Get associated event listener of this event sink.
|
ClientSubscription |
getSubscription(java.lang.String clientSubId) |
boolean |
isOpen()
Returns if event sink is open to receive notifications/ solicit responses.
|
void |
open(CredentialInfo credentialInfo)
Opens event receiving for this event endpoint.
|
ParameterValue |
receiveLocalEvent(java.lang.String clientSubscriptionId,
URI actionUri,
ParameterValue outputParameter,
CredentialInfo credentialInfo)
Callback method for receiving local notifications/ solicit responses.
|
ClientSubscription |
removeSubscription(java.lang.String clientSubId) |
addBinding, addBinding, clearBindings, getCommunicationAutoBindings, getCommunicationBindings, hasCommunicationAutoBindings, hasCommunicationBindings, removeBinding, removeBindingEventListener getEventListener()
CommunicationStructureListener getCommunicationStructureListener()
ParameterValue receiveLocalEvent(java.lang.String clientSubscriptionId, URI actionUri, ParameterValue outputParameter, CredentialInfo credentialInfo)
clientSubscriptionId - Subscription id the client sent to the service for subscription.actionUri - Action of event fired.outputParameter - The parameter value the service transmitted with the event message.nullboolean isOpen()
true - if event sink is open to receive events/ solicit responses, else false.void open(CredentialInfo credentialInfo) throws java.io.IOException
credentialInfo - EventingException - in case opening this event sink fails for any reason (e.g. binding to a specified local address fails)java.io.IOExceptionvoid close()
void addSubscription(java.lang.String clientSubId,
ClientSubscription subscription)
Service.subscribe(EventSink, String,
org.ws4d.java.types.URISet, long, CredentialInfo) .clientSubId - client subscription idsubscription - client subscriptionClientSubscription getSubscription(java.lang.String clientSubId)
clientSubId - ClientSubscription removeSubscription(java.lang.String clientSubId)
clientSubId - URI chooseNotifyToAddress(ConnectionInfo connectionInfo, Delivery delivery, boolean useReferenceParameterMode)
connectionInfo - delivery - useReferenceParameterMode -