@MappedSuperclass public abstract class AbstractTicket extends java.lang.Object implements Ticket, TicketState
AbstractTicket does not provide a logger instance to avoid instantiating many such Loggers at runtime (there will be many instances of subclasses of AbstractTicket in a typical running CAS server). Instead subclasses should use static Logger instances.
Constructor and Description |
---|
AbstractTicket(java.lang.String id,
ExpirationPolicy expirationPolicy) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Ticket o) |
Authentication |
getAuthentication()
Authentication information from the ticket.
|
TicketGrantingTicket |
getTicketGrantingTicket()
Method to retrieve the TicketGrantingTicket that granted this ticket.
|
boolean |
isExpired()
Determines if the ticket is expired.
|
protected boolean |
isExpiredInternal() |
void |
markTicketExpired()
Mark a ticket as expired.
|
java.lang.String |
toString() |
void |
update()
Records the previous last time this ticket was used as well as
the last usage time.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCountOfUses, getCreationTime, getExpirationPolicy, getId, getPrefix
getCountOfUses, getCreationTime, getLastTimeUsed, getPreviousTimeUsed
public AbstractTicket(@NonNull java.lang.String id, @NonNull ExpirationPolicy expirationPolicy)
public void update()
TicketState
Tickets themselves are solely responsible to maintain their state. The determination of ticket usage is left up to the implementation and the specific ticket type.
update
in interface TicketState
ExpirationPolicy
public boolean isExpired()
Ticket
isExpired
in interface Ticket
ExpirationPolicy
protected boolean isExpiredInternal()
public int compareTo(Ticket o)
compareTo
in interface java.lang.Comparable<Ticket>
public java.lang.String toString()
toString
in class java.lang.Object
public Authentication getAuthentication()
TicketState
getAuthentication
in interface TicketState
public TicketGrantingTicket getTicketGrantingTicket()
Ticket
getTicketGrantingTicket
in interface Ticket
getTicketGrantingTicket
in interface TicketState
public void markTicketExpired()
Ticket
markTicketExpired
in interface Ticket