|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jasig.cas.ticket.registry.DefaultTicketRegistry
Implementation of the TicketRegistry that is backed by a HashMap.
The underlying HashMap is not threadsafe. Each method is synchronized but care should be taken that if multiple methods will be called, the code should be placed in a synchronize block.
Constructor Summary | |
DefaultTicketRegistry()
|
Method Summary | |
void |
addTicket(Ticket ticket)
Add a ticket to the registry. |
boolean |
deleteTicket(java.lang.String ticketId)
Remove a specific ticket from the registry. |
Ticket |
getTicket(java.lang.String ticketId)
Retrieve a ticket from the registry. |
Ticket |
getTicket(java.lang.String ticketId,
java.lang.Class clazz)
Retrieve a ticket from the registry. |
java.util.Collection |
getTickets()
Retrieve all tickets from the registry. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultTicketRegistry()
Method Detail |
public void addTicket(Ticket ticket)
TicketRegistry
addTicket
in interface TicketRegistry
ticket
- The ticket we wish to add to the cache.
java.lang.IllegalArgumentException
- if the Ticket is null.public Ticket getTicket(java.lang.String ticketId, java.lang.Class clazz)
TicketRegistry
getTicket
in interface TicketRegistry
ticketId
- the id of the ticket we wish to retrieve.clazz
- The expected class of the ticket we wish to retrieve.
java.lang.IllegalArgumentException
- if class is null.
java.lang.ClassCastException
- if class does not match requested ticket
class.public Ticket getTicket(java.lang.String ticketId)
TicketRegistry
getTicket
in interface TicketRegistry
ticketId
- the id of the ticket we wish to retrieve
public boolean deleteTicket(java.lang.String ticketId)
TicketRegistry
deleteTicket
in interface TicketRegistry
ticketId
- The id of the ticket to delete.
public java.util.Collection getTickets()
TicketRegistry
getTickets
in interface TicketRegistry
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |