org.springframework.security.web.savedrequest
Class NullRequestCache

java.lang.Object
  extended by org.springframework.security.web.savedrequest.NullRequestCache
All Implemented Interfaces:
RequestCache

public class NullRequestCache
extends Object
implements RequestCache

Null implementation of RequestCache. Typically used when creation of a session is not desired.

Since:
3.0
Version:
$Id$
Author:
Luke Taylor

Constructor Summary
NullRequestCache()
           
 
Method Summary
 HttpServletRequest getMatchingRequest(HttpServletRequest request, HttpServletResponse response)
          Returns a wrapper around the saved request, if it matches the current request.
 SavedRequest getRequest(HttpServletRequest request, HttpServletResponse response)
          Returns the saved request, leaving it cached.
 void removeRequest(HttpServletRequest request, HttpServletResponse response)
          Removes the cached request
 void saveRequest(HttpServletRequest request, HttpServletResponse response)
          Caches the current request for later retrieval, once authentication has taken place.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullRequestCache

public NullRequestCache()
Method Detail

getRequest

public SavedRequest getRequest(HttpServletRequest request,
                               HttpServletResponse response)
Description copied from interface: RequestCache
Returns the saved request, leaving it cached.

Specified by:
getRequest in interface RequestCache
Returns:
the saved request which was previously cached, or null if there is none.

removeRequest

public void removeRequest(HttpServletRequest request,
                          HttpServletResponse response)
Description copied from interface: RequestCache
Removes the cached request

Specified by:
removeRequest in interface RequestCache

saveRequest

public void saveRequest(HttpServletRequest request,
                        HttpServletResponse response)
Description copied from interface: RequestCache
Caches the current request for later retrieval, once authentication has taken place. Used by ExceptionTranslationFilter.

Specified by:
saveRequest in interface RequestCache
Parameters:
request - the request to be stored

getMatchingRequest

public HttpServletRequest getMatchingRequest(HttpServletRequest request,
                                             HttpServletResponse response)
Description copied from interface: RequestCache
Returns a wrapper around the saved request, if it matches the current request. The saved request should be removed from the cache.

Specified by:
getMatchingRequest in interface RequestCache
Returns:
the wrapped save request, if it matches the original, or null if there is no cached request or it doesn't match.


Copyright © 2004-2009 SpringSource, Inc. All Rights Reserved.