Apache CXF API

org.apache.cxf.ws.eventing.backend.manager
Class SubscriptionManagerImpl

java.lang.Object
  extended by 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
protected  SubscriptionDatabase database
           
protected static Logger LOG
           
 
Constructor Summary
SubscriptionManagerImpl(String url)
           
SubscriptionManagerImpl(String url, String namespace, String elementName)
           
 
Method Summary
 SubscriptionTicket findTicket(UUID uuid)
           
protected  SubscriptionDatabase getDatabase()
           
 AttributedURIType getSubscriptionManagerAddress()
           
 List<SubscriptionTicket> getTickets()
          READ ONLY.
 XMLGregorianCalendar grantExpiration()
          Decide what expiration time to grant to the subscription, if the client did not specify any particular wish for subscription length.
 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.
 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.
protected  void grantSubscriptionManagerReference(SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
           
protected  void processDelivery(DeliveryType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
           
protected  void processEndTo(EndpointReferenceType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
           
protected  void processExpiration(ExpirationType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
          process the stuff concerning expiration request (wse:Expires)
protected  void processFilters(FilterType request, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
           
protected  void processFormat(FormatType format, SubscriptionTicket ticket, SubscriptionTicketGrantingResponse response)
           
 void registerNotificator(NotificatorService service)
           
 ExpirationType renew(UUID uuid, ExpirationType requestedExpiration)
           
 SubscriptionTicketGrantingResponse subscribe(DeliveryType delivery, EndpointReferenceType endTo, ExpirationType expires, FilterType filter, FormatType format)
           
 void subscriptionEnd(UUID subscriptionId, String reason, SubscriptionEndStatus status)
           
 void unsubscribeTicket(UUID uuid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final Logger LOG

database

protected final SubscriptionDatabase database
Constructor Detail

SubscriptionManagerImpl

public SubscriptionManagerImpl(String url)

SubscriptionManagerImpl

public SubscriptionManagerImpl(String url,
                               String namespace,
                               String elementName)
Method Detail

subscribe

public SubscriptionTicketGrantingResponse subscribe(DeliveryType delivery,
                                                    EndpointReferenceType endTo,
                                                    ExpirationType expires,
                                                    FilterType filter,
                                                    FormatType format)
Specified by:
subscribe in interface SubscriptionManagerInterfaceForEventSources

getTickets

public List<SubscriptionTicket> getTickets()
Description copied from interface: SubscriptionManagerInterfaceForEventSources
READ ONLY. Returns an unmodifiable list of the subscriptions in database.

Specified by:
getTickets in interface SubscriptionManagerInterfaceForEventSources
Specified by:
getTickets in interface SubscriptionManagerInterfaceForNotificators

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(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 AttributedURIType getSubscriptionManagerAddress()

unsubscribeTicket

public void unsubscribeTicket(UUID uuid)
Specified by:
unsubscribeTicket in interface SubscriptionManagerInterfaceForManagers

findTicket

public SubscriptionTicket findTicket(UUID uuid)
Specified by:
findTicket in interface SubscriptionManagerInterfaceForManagers

renew

public ExpirationType renew(UUID uuid,
                            ExpirationType requestedExpiration)
Specified by:
renew in interface SubscriptionManagerInterfaceForManagers

subscriptionEnd

public void subscriptionEnd(UUID subscriptionId,
                            String reason,
                            SubscriptionEndStatus status)
Specified by:
subscriptionEnd in interface SubscriptionManager

registerNotificator

public void registerNotificator(NotificatorService service)
Specified by:
registerNotificator in interface SubscriptionManagerInterfaceForNotificators

Apache CXF API

Apache CXF