public class DefaultSubscriptionManager extends java.lang.Object implements SubscriptionManager
| Constructor and Description |
|---|
DefaultSubscriptionManager(LocalService service,
OutgoingDiscoveryInfosProvider provider) |
| Modifier and Type | Method and Description |
|---|---|
long |
getStatus(ClientSubscription subscription)
This method should be called each time a service receives a request to obtain the status of a
subscription from a client.
|
GetStatusResponseMessage |
getStatus(GetStatusMessage msg,
ConnectionInfo connectionInfo)
This method should be called each time a local service receives a request to obtain the status
of a subscription from a client.
|
boolean |
isRemote() |
long |
renew(ClientSubscription subscription,
long duration)
Renews an existing subscription with new duration.
|
RenewResponseMessage |
renew(RenewMessage msg,
ConnectionInfo connectionInfo)
This method should be called each time a local service receives a request to renew a
subscription from a client.
|
void |
sendSubscriptionEnd()
Notifies each subscribed event sink / event listener that the service has terminated the
subscription.
|
ClientSubscription |
subscribe(EventSink sink,
java.lang.String clientSubscriptionId,
URISet eventActionURIs,
long duration,
CredentialInfo credentialInfo,
java.lang.String comManId)
Subscribe to subscription for local client.
|
SubscribeResponseMessage |
subscribe(SubscribeMessage msg,
boolean useReferenceParameterMode,
ConnectionInfo connectionInfo)
This method should be called each time a local service receives a subscription request from a
remote client.
|
void |
unsubscribe(ClientSubscription subscription)
This method should be called each time a service receives a request to cancel a subscription
from a local client.
|
UnsubscribeResponseMessage |
unsubscribe(UnsubscribeMessage msg,
ConnectionInfo connectionInfo)
This method should be called each time a local service receives a request to cancel a
subscription from a remote client.
|
public DefaultSubscriptionManager(LocalService service, OutgoingDiscoveryInfosProvider provider)
public SubscribeResponseMessage subscribe(SubscribeMessage msg, boolean useReferenceParameterMode, ConnectionInfo connectionInfo) throws SOAPException
SubscriptionManagersubscribe in interface SubscriptionManagermsg - the subscribe message describing the requestSOAPException - in case the subscription failed for any reason, a fault message with further details can be obtained from
this SOAPException (see SOAPException.getFault())public ClientSubscription subscribe(EventSink sink, java.lang.String clientSubscriptionId, URISet eventActionURIs, long duration, CredentialInfo credentialInfo, java.lang.String comManId) throws EventingException
SubscriptionManagersubscribe in interface SubscriptionManagerEventingExceptionpublic UnsubscribeResponseMessage unsubscribe(UnsubscribeMessage msg, ConnectionInfo connectionInfo) throws SOAPException
SubscriptionManagerunsubscribe in interface SubscriptionManagermsg - the unsubscribe message describing the requestSOAPException - in case the cancellation failed for any reason, a fault message with further details can be obtained from
this SOAPException (see SOAPException.getFault())public void unsubscribe(ClientSubscription subscription) throws EventingException
SubscriptionManagerunsubscribe in interface SubscriptionManagersubscription - Client subscription.EventingExceptionpublic RenewResponseMessage renew(RenewMessage msg, ConnectionInfo connectionInfo) throws SOAPException
SubscriptionManagerrenew in interface SubscriptionManagermsg - the renew message describing the requestSOAPException - in case the renewal failed for any reason, a fault message with further details can be obtained from this
SOAPException (see SOAPException.getFault())public long renew(ClientSubscription subscription, long duration) throws EventingException
SubscriptionManagerrenew in interface SubscriptionManagerEventingExceptionpublic GetStatusResponseMessage getStatus(GetStatusMessage msg, ConnectionInfo connectionInfo) throws SOAPException
SubscriptionManagergetStatus in interface SubscriptionManagermsg - the get status message describing the requestSOAPException - in case the status query failed for any reason, a fault message with further details can be obtained from
this SOAPException (see SOAPException.getFault())public long getStatus(ClientSubscription subscription) throws EventingException, CommunicationException
SubscriptionManagergetStatus in interface SubscriptionManagerEventingExceptionCommunicationExceptionpublic void sendSubscriptionEnd()
SubscriptionManagersendSubscriptionEnd in interface SubscriptionManagerpublic boolean isRemote()
isRemote in interface SubscriptionManager