org.apache.cxf.ws.eventing.backend.database
Class SubscriptionDatabaseImpl
java.lang.Object
org.apache.cxf.ws.eventing.backend.database.SubscriptionDatabaseImpl
- All Implemented Interfaces:
- SubscriptionDatabase
public class SubscriptionDatabaseImpl
- extends Object
- implements SubscriptionDatabase
Default implementation of a Subscription Database. Basically it is simply a wrapper
around a List with some convenience methods. The underlying List
is a thread-safe CopyOnWriteArrayList.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubscriptionDatabaseImpl
public SubscriptionDatabaseImpl()
addTicket
public void addTicket(SubscriptionTicket ticket)
- Specified by:
addTicket
in interface SubscriptionDatabase
getTickets
public List<SubscriptionTicket> getTickets()
- Specified by:
getTickets
in interface SubscriptionDatabase
findById
public SubscriptionTicket findById(UUID id)
- Searches the database for a ticket with the specified UUID
- Specified by:
findById
in interface SubscriptionDatabase
- Parameters:
id
- the UUID which will be searched for
- Returns:
- the ticket, or null of no ticket with this UUID exists
removeTicketByUUID
public void removeTicketByUUID(UUID id)
- Removes a ticket by UUID from the database.
- Specified by:
removeTicketByUUID
in interface SubscriptionDatabase
- Parameters:
id
- the UUID of the ticket to remove
- Throws:
UnknownSubscription
- if unknown UUID is supplied
Apache CXF