Class SourceSubscriptionManagerImpl
- java.lang.Object
-
- com.google.common.util.concurrent.AbstractExecutionThreadService
-
- org.somda.sdc.dpws.soap.wseventing.SourceSubscriptionManagerImpl
-
- All Implemented Interfaces:
com.google.common.util.concurrent.Service,SourceSubscriptionManager,SubscriptionManager
public class SourceSubscriptionManagerImpl extends com.google.common.util.concurrent.AbstractExecutionThreadService implements SourceSubscriptionManager
Default implementation ofSourceSubscriptionManager.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>getCallerId()Returns a string identifying the certificate of the consumer that started the subscription.Optional<org.somda.sdc.dpws.soap.wsaddressing.model.EndpointReferenceType>getEndTo()DurationgetExpires()InstantgetExpiresTimeout()StringgetFilterDialect()List<Object>getFilters()org.somda.sdc.dpws.soap.wsaddressing.model.EndpointReferenceTypegetNotifyTo()StringgetSubscriptionId()org.somda.sdc.dpws.soap.wsaddressing.model.EndpointReferenceTypegetSubscriptionManagerEpr()voidofferEndTo(SoapMessage endToMessage)Tries to send a custom end-to message to the event sink.voidofferEndTo(WsEventingStatus status)Tries to send an end-to message to the event sink of the given status.voidofferNotification(Notification notification)Inserts the notification into the subscription manager's queue.voidrenew(Duration expires)Resets the expires duration.protected voidrun()protected voidstartUp()protected voidtriggerShutdown()-
Methods inherited from class com.google.common.util.concurrent.AbstractExecutionThreadService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, shutDown, startAsync, state, stopAsync, toString
-
-
-
-
Method Detail
-
getSubscriptionId
public String getSubscriptionId()
- Specified by:
getSubscriptionIdin interfaceSubscriptionManager
-
getExpiresTimeout
public Instant getExpiresTimeout()
- Specified by:
getExpiresTimeoutin interfaceSubscriptionManager
-
getNotifyTo
public org.somda.sdc.dpws.soap.wsaddressing.model.EndpointReferenceType getNotifyTo()
- Specified by:
getNotifyToin interfaceSubscriptionManager
-
getEndTo
public Optional<org.somda.sdc.dpws.soap.wsaddressing.model.EndpointReferenceType> getEndTo()
- Specified by:
getEndToin interfaceSubscriptionManager
-
getExpires
public Duration getExpires()
- Specified by:
getExpiresin interfaceSubscriptionManager
-
getSubscriptionManagerEpr
public org.somda.sdc.dpws.soap.wsaddressing.model.EndpointReferenceType getSubscriptionManagerEpr()
- Specified by:
getSubscriptionManagerEprin interfaceSubscriptionManager
-
getFilters
public List<Object> getFilters()
- Specified by:
getFiltersin interfaceSubscriptionManager
-
getFilterDialect
public String getFilterDialect()
- Specified by:
getFilterDialectin interfaceSubscriptionManager
-
renew
public void renew(Duration expires)
Description copied from interface:SourceSubscriptionManagerResets the expires duration.This will also affect
SubscriptionManager.getExpiresTimeout().- Specified by:
renewin interfaceSourceSubscriptionManager- Parameters:
expires- the duration to reset.
-
getCallerId
public Optional<String> getCallerId()
Description copied from interface:SourceSubscriptionManagerReturns a string identifying the certificate of the consumer that started the subscription.- Specified by:
getCallerIdin interfaceSourceSubscriptionManager- Returns:
- an identifying string, or empty, if no such string exists.
-
offerNotification
public void offerNotification(Notification notification)
Description copied from interface:SourceSubscriptionManagerInserts the notification into the subscription manager's queue.The manager is shut down
- on first delivery failure or
- in case there is queue overflow or a delivery failure.
- Specified by:
offerNotificationin interfaceSourceSubscriptionManager- Parameters:
notification- the notification to add.
-
offerEndTo
public void offerEndTo(SoapMessage endToMessage)
Description copied from interface:SourceSubscriptionManagerTries to send a custom end-to message to the event sink.This is a non-blocking call that silently ignores failed delivery. This method ends the SourceSubscriptionManager once the message has been delivered.
- Specified by:
offerEndToin interfaceSourceSubscriptionManager- Parameters:
endToMessage- the message to send. This message is supposed to be a valid end-to message.
-
offerEndTo
public void offerEndTo(WsEventingStatus status)
Description copied from interface:SourceSubscriptionManagerTries to send an end-to message to the event sink of the given status.This is a non-blocking call that silently ignores failed delivery. This method ends the SourceSubscriptionManager once the status has been delivered.
- Specified by:
offerEndToin interfaceSourceSubscriptionManager- Parameters:
status- the status for which a SubscriptionEnd message will be sent.
-
startUp
protected void startUp()
- Overrides:
startUpin classcom.google.common.util.concurrent.AbstractExecutionThreadService
-
run
protected void run()
- Specified by:
runin classcom.google.common.util.concurrent.AbstractExecutionThreadService
-
triggerShutdown
protected void triggerShutdown()
- Overrides:
triggerShutdownin classcom.google.common.util.concurrent.AbstractExecutionThreadService
-
-