Apache CXF API

org.apache.cxf.ws.eventing.backend.database
Class SubscriptionDatabaseImpl

java.lang.Object
  extended by 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.


Constructor Summary
SubscriptionDatabaseImpl()
           
 
Method Summary
 void addTicket(SubscriptionTicket ticket)
           
 SubscriptionTicket findById(UUID id)
          Searches the database for a ticket with the specified UUID
 List<SubscriptionTicket> getTickets()
           
 void removeTicketByUUID(UUID id)
          Removes a ticket by UUID from the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionDatabaseImpl

public SubscriptionDatabaseImpl()
Method Detail

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 API

Apache CXF