@MappedSuperclass public abstract class AbstractTicket extends Object implements Ticket, TicketState
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTicket() |
|
AbstractTicket(String id,
TicketGrantingTicketImpl ticket,
ExpirationPolicy expirationPolicy)
Constructs a new Ticket with a unique id, a possible parent Ticket (can
be null) and a specified Expiration Policy.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCountOfUses()
Returns the number of times this ticket was used.
|
long |
getCreationTime()
Method to return the time the Ticket was created.
|
TicketGrantingTicket |
getGrantingTicket()
Method to retrive the TicketGrantingTicket that granted this ticket.
|
String |
getId()
Method to retrieve the id.
|
long |
getLastTimeUsed()
Returns the last time the ticket was used.
|
long |
getPreviousTimeUsed()
Get the second to last time used.
|
int |
hashCode() |
boolean |
isExpired()
Determines if the ticket is expired.
|
protected boolean |
isExpiredInternal() |
String |
toString() |
protected void |
updateState() |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitgetAuthenticationprotected AbstractTicket()
public AbstractTicket(String id, TicketGrantingTicketImpl ticket, ExpirationPolicy expirationPolicy)
id - the unique identifier for the ticketticket - the parent TicketGrantingTicketexpirationPolicy - the expiration policy for the ticket.IllegalArgumentException - if the id or expiration policy is null.public final String getId()
Ticketprotected final void updateState()
public final int getCountOfUses()
TicketgetCountOfUses in interface TicketgetCountOfUses in interface TicketStatepublic final long getCreationTime()
TicketgetCreationTime in interface TicketgetCreationTime in interface TicketStatepublic final TicketGrantingTicket getGrantingTicket()
TicketgetGrantingTicket in interface Ticketpublic final long getLastTimeUsed()
TicketStategetLastTimeUsed in interface TicketStatepublic final long getPreviousTimeUsed()
TicketStategetPreviousTimeUsed in interface TicketStatepublic final boolean isExpired()
TicketisExpired in interface TicketExpirationPolicyprotected boolean isExpiredInternal()
Copyright © 2004-2012 Jasig. All Rights Reserved.