edu.yale.its.tp.cas.ticket
Class GrantorCache

java.lang.Object
  |
  +--edu.yale.its.tp.cas.ticket.ActiveTicketCache
        |
        +--edu.yale.its.tp.cas.ticket.GrantorCache
All Implemented Interfaces:
TicketCache

public class GrantorCache
extends ActiveTicketCache

Represents a generic cache of granting tickets. Can be used as a store for TGCs or PGTs.


Constructor Summary
GrantorCache(java.lang.Class ticketType, int tolerance)
          Constructs a new GrantorCache that is intended to store cookies of the given specific ticket type.
 
Method Summary
 void deleteTicket(java.lang.String ticketId)
          Removes the ticket from the cache, and expires the ticket itself.
protected  java.lang.String newTicketId()
          Generates and returns a new, unique ticket ID
protected  edu.yale.its.tp.cas.ticket.Ticket retrieveTicket(java.lang.String ticketId)
          Retrieves the ticket with the given identifier.
protected  void storeTicket(java.lang.String ticketId, edu.yale.its.tp.cas.ticket.Ticket t)
          Stores the given ticket, associating it with the given identifier.
 
Methods inherited from class edu.yale.its.tp.cas.ticket.ActiveTicketCache
addTicket, getTicket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrantorCache

public GrantorCache(java.lang.Class ticketType,
                    int tolerance)
Constructs a new GrantorCache that is intended to store cookies of the given specific ticket type.

Method Detail

newTicketId

protected java.lang.String newTicketId()
Generates and returns a new, unique ticket ID

Specified by:
newTicketId in class ActiveTicketCache

storeTicket

protected void storeTicket(java.lang.String ticketId,
                           edu.yale.its.tp.cas.ticket.Ticket t)
                    throws TicketException
Stores the given ticket, associating it with the given identifier.

Specified by:
storeTicket in class ActiveTicketCache
TicketException

retrieveTicket

protected edu.yale.its.tp.cas.ticket.Ticket retrieveTicket(java.lang.String ticketId)
Retrieves the ticket with the given identifier.

Specified by:
retrieveTicket in class ActiveTicketCache

deleteTicket

public void deleteTicket(java.lang.String ticketId)
Removes the ticket from the cache, and expires the ticket itself.