Class SubscriptionManagerImpl
- java.lang.Object
-
- org.apache.cxf.ws.eventing.backend.manager.SubscriptionManagerImpl
-
- All Implemented Interfaces:
SubscriptionManager,SubscriptionManagerInterfaceForEventSources,SubscriptionManagerInterfaceForManagers,SubscriptionManagerInterfaceForNotificators
public class SubscriptionManagerImpl extends Object implements SubscriptionManager
The core class representing WS-Eventing backend. It holds an instance of a database and acts as a layer for communicating with it.
-
-
Field Summary
Fields Modifier and Type Field Description protected SubscriptionDatabasedatabaseprotected static LoggerLOG
-
Constructor Summary
Constructors Constructor Description SubscriptionManagerImpl(String url)SubscriptionManagerImpl(String url, String namespace, String elementName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubscriptionTicketfindTicket(UUID uuid)protected SubscriptionDatabasegetDatabase()org.apache.cxf.ws.addressing.AttributedURITypegetSubscriptionManagerAddress()List<SubscriptionTicket>getTickets()READ ONLY.XMLGregorianCalendargrantExpiration()Decide what expiration time to grant to the subscription, if the client did not specify any particular wish for subscription length.XMLGregorianCalendargrantExpirationFor(Duration requested)Decide what expiration time to grant to the subscription, if the client specified a duration in the request and did specify BestEffort=true.XMLGregorianCalendargrantExpirationFor(XMLGregorianCalendar requested)Decide what expiration time to grant to the subscription, if the client specified a calendar time in the request and did specify BestEffort=true.protected voidgrantSubscriptionManagerReference(SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)protected voidprocessDelivery(DeliveryType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)protected voidprocessEndTo(org.apache.cxf.ws.addressing.EndpointReferenceType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)protected voidprocessExpiration(ExpirationType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)process the stuff concerning expiration request (wse:Expires)protected voidprocessFilters(FilterType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)protected voidprocessFormat(FormatType format, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)voidregisterNotificator(NotificatorService service)ExpirationTyperenew(UUID uuid, ExpirationType requestedExpiration)SubscriptionTicketGrantingResponsesubscribe(DeliveryType delivery, org.apache.cxf.ws.addressing.EndpointReferenceType endTo, ExpirationType expires, FilterType filter, FormatType format)voidsubscriptionEnd(UUID subscriptionId, String reason, SubscriptionEndStatus status)voidunsubscribeTicket(UUID uuid)
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
database
protected final SubscriptionDatabase database
-
-
Method Detail
-
subscribe
public SubscriptionTicketGrantingResponse subscribe(DeliveryType delivery, org.apache.cxf.ws.addressing.EndpointReferenceType endTo, ExpirationType expires, FilterType filter, FormatType format)
- Specified by:
subscribein interfaceSubscriptionManagerInterfaceForEventSources
-
getTickets
public List<SubscriptionTicket> getTickets()
Description copied from interface:SubscriptionManagerInterfaceForEventSourcesREAD ONLY. Returns an unmodifiable list of the subscriptions in database.- Specified by:
getTicketsin interfaceSubscriptionManagerInterfaceForEventSources- Specified by:
getTicketsin interfaceSubscriptionManagerInterfaceForNotificators
-
getDatabase
protected SubscriptionDatabase getDatabase()
-
processFormat
protected void processFormat(FormatType format, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
-
processFilters
protected void processFilters(FilterType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
-
processExpiration
protected void processExpiration(ExpirationType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
process the stuff concerning expiration request (wse:Expires)
-
processEndTo
protected void processEndTo(org.apache.cxf.ws.addressing.EndpointReferenceType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
-
processDelivery
protected void processDelivery(DeliveryType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
-
grantSubscriptionManagerReference
protected void grantSubscriptionManagerReference(SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
-
grantExpirationFor
public XMLGregorianCalendar grantExpirationFor(XMLGregorianCalendar requested)
Decide what expiration time to grant to the subscription, if the client specified a calendar time in the request and did specify BestEffort=true.
-
grantExpirationFor
public XMLGregorianCalendar grantExpirationFor(Duration requested)
Decide what expiration time to grant to the subscription, if the client specified a duration in the request and did specify BestEffort=true.
-
grantExpiration
public XMLGregorianCalendar grantExpiration()
Decide what expiration time to grant to the subscription, if the client did not specify any particular wish for subscription length.
-
getSubscriptionManagerAddress
public org.apache.cxf.ws.addressing.AttributedURIType getSubscriptionManagerAddress()
-
unsubscribeTicket
public void unsubscribeTicket(UUID uuid)
- Specified by:
unsubscribeTicketin interfaceSubscriptionManagerInterfaceForManagers
-
findTicket
public SubscriptionTicket findTicket(UUID uuid)
- Specified by:
findTicketin interfaceSubscriptionManagerInterfaceForManagers
-
renew
public ExpirationType renew(UUID uuid, ExpirationType requestedExpiration)
- Specified by:
renewin interfaceSubscriptionManagerInterfaceForManagers
-
subscriptionEnd
public void subscriptionEnd(UUID subscriptionId, String reason, SubscriptionEndStatus status)
- Specified by:
subscriptionEndin interfaceSubscriptionManager
-
registerNotificator
public void registerNotificator(NotificatorService service)
- Specified by:
registerNotificatorin interfaceSubscriptionManagerInterfaceForNotificators
-
-