public class EhCacheBasedTicketCache extends java.lang.Object implements StatelessTicketCache, org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
EhCacheBasedTicketCache() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
CasAuthenticationToken |
getByTicketId(java.lang.String serviceTicket)
Retrieves the
CasAuthenticationToken associated with the specified
ticket. |
net.sf.ehcache.Ehcache |
getCache() |
void |
putTicketInCache(CasAuthenticationToken token)
Adds the specified
CasAuthenticationToken to the cache. |
void |
removeTicketFromCache(CasAuthenticationToken token)
Removes the specified ticket from the cache, as per
StatelessTicketCache.removeTicketFromCache(String) . |
void |
removeTicketFromCache(java.lang.String serviceTicket)
Removes the specified ticket from the cache, meaning that future calls will require
a new service ticket.
|
void |
setCache(net.sf.ehcache.Ehcache cache) |
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public CasAuthenticationToken getByTicketId(java.lang.String serviceTicket)
StatelessTicketCache
CasAuthenticationToken
associated with the specified
ticket.
If not found, returns a null
CasAuthenticationToken
.
getByTicketId
in interface StatelessTicketCache
public net.sf.ehcache.Ehcache getCache()
public void putTicketInCache(CasAuthenticationToken token)
StatelessTicketCache
CasAuthenticationToken
to the cache.
The CasAuthenticationToken.getCredentials()
method is used to retrieve the
service ticket number.
putTicketInCache
in interface StatelessTicketCache
token
- to be added to the cachepublic void removeTicketFromCache(CasAuthenticationToken token)
StatelessTicketCache
StatelessTicketCache.removeTicketFromCache(String)
.
Implementations should use CasAuthenticationToken.getCredentials()
to
obtain the ticket and then delegate to the
StatelessTicketCache.removeTicketFromCache(String)
method.
removeTicketFromCache
in interface StatelessTicketCache
token
- to be removedpublic void removeTicketFromCache(java.lang.String serviceTicket)
StatelessTicketCache
This is in case applications wish to provide a session termination capability for their stateless clients.
removeTicketFromCache
in interface StatelessTicketCache
serviceTicket
- to be removedpublic void setCache(net.sf.ehcache.Ehcache cache)