Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.acegisecurity.providers.cas.cache
Class EhCacheBasedTicketCache

    java.lang.Object
      org.acegisecurity.providers.cas.cache.EhCacheBasedTicketCache

All Implemented Interfaces:
  StatelessTicketCache, InitializingBean

    public class EhCacheBasedTicketCache

extends Object
implements StatelessTicketCache, InitializingBean

Caches tickets using a Spring IoC defined EHCACHE.

Version:
  $Id: EhCacheBasedTicketCache.java,v 1.8 2005/11/17 00:55:48 benalex Exp $
Author:
  Ben Alex

Constructor Summary
`EhCacheBasedTicketCache()`

Method Summary
`void` | `afterPropertiesSet()`
`CasAuthenticationToken` | `getByTicketId(String serviceTicket)` Retrieves the `CasAuthenticationToken` associated with the specified ticket.
`net.sf.ehcache.Cache` | `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(String serviceTicket)` Removes the specified ticket from the cache, meaning that future calls will require a new service ticket.
`void` | `setCache(net.sf.ehcache.Cache cache)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EhCacheBasedTicketCache

    public EhCacheBasedTicketCache()

Method Detail

### getByTicketId

    public CasAuthenticationToken getByTicketId(String serviceTicket)

  Description copied from interface: `StatelessTicketCache`
  Retrieves the `CasAuthenticationToken` associated with the specified ticket.

  If not found, returns a `null` `CasAuthenticationToken`.

  Specified by:
    `getByTicketId` in interface `StatelessTicketCache`
  Returns:
    the fully populated authentication token

### setCache

    public void setCache(net.sf.ehcache.Cache cache)

### getCache

    public net.sf.ehcache.Cache getCache()

### afterPropertiesSet

    public void afterPropertiesSet()
                            throws Exception

  Specified by:
    `afterPropertiesSet` in interface `InitializingBean`
  Throws:
    `Exception`

### putTicketInCache

    public void putTicketInCache(CasAuthenticationToken token)

  Description copied from interface: `StatelessTicketCache`
  Adds the specified `CasAuthenticationToken` to the cache.

  The `CasAuthenticationToken.getCredentials()` method is used to retrieve the service ticket number.

  Specified by:
    `putTicketInCache` in interface `StatelessTicketCache`
  Parameters:
    `token` - to be added to the cache

### removeTicketFromCache

    public void removeTicketFromCache(CasAuthenticationToken token)

  Description copied from interface: `StatelessTicketCache`
  Removes the specified ticket from the cache, as per `StatelessTicketCache.removeTicketFromCache(String)`.

  Implementations should use `CasAuthenticationToken.getCredentials()` to obtain the ticket and then delegate to to the `StatelessTicketCache.removeTicketFromCache(String)` method.

  Specified by:
    `removeTicketFromCache` in interface `StatelessTicketCache`
  Parameters:
    `token` - to be removed

### removeTicketFromCache

    public void removeTicketFromCache(String serviceTicket)

  Description copied from interface: `StatelessTicketCache`
  Removes the specified ticket from the cache, meaning that future calls will require a new service ticket.

  This is in case applications wish to provide a session termination capability for their stateless clients.

  Specified by:
    `removeTicketFromCache` in interface `StatelessTicketCache`
  Parameters:
    `serviceTicket` - to be removed

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.