net.databinder
Class CookieRequestCycle

java.lang.Object
  extended by org.apache.wicket.RequestCycle
      extended by org.apache.wicket.protocol.http.WebRequestCycle
          extended by net.databinder.ExceptionFilteringRequestCycle
              extended by net.databinder.CookieRequestCycle
Direct Known Subclasses:
DataRequestCycle, DataRequestCycle

public class CookieRequestCycle
extends ExceptionFilteringRequestCycle

Request cycle with cookie convenience methods that reflects removal immediately.


Field Summary
 
Fields inherited from class org.apache.wicket.RequestCycle
application, processor, request, response
 
Constructor Summary
CookieRequestCycle(org.apache.wicket.protocol.http.WebApplication application, org.apache.wicket.protocol.http.WebRequest request, org.apache.wicket.Response response)
           
 
Method Summary
 void applyScope(javax.servlet.http.Cookie cookie)
          Applies scope to cookies set by this application.
 void clearCookie(java.lang.String name)
          Sets a new a cookie with an expiration time of zero to an clear an old one from the browser, and removes any copy from this request's cookie cache.
 javax.servlet.http.Cookie getCookie(java.lang.String name)
          Retrieve cookie from request, so long as it hasn't been cleared.
protected  java.util.Map<java.lang.String,javax.servlet.http.Cookie> getCookies()
          Return or build cache of cookies cookies from request.
 
Methods inherited from class net.databinder.ExceptionFilteringRequestCycle
logRuntimeException, setWarnOnlySource
 
Methods inherited from class org.apache.wicket.protocol.http.WebRequestCycle
getProcessor, getWebRequest, getWebResponse, getWebSession, isRedirect, newClientInfo, redirectTo
 
Methods inherited from class org.apache.wicket.RequestCycle
detach, get, getApplication, getClientInfo, getMetaData, getOriginalResponse, getPageParameters, getRedirect, getRequest, getRequestTarget, getResponse, getResponsePage, getResponsePageClass, getSession, getStartTime, isUrlForNewWindowEncoding, onBeginRequest, onEndRequest, onRuntimeException, request, request, request, set, setAutomaticallyClearFeedbackMessages, setMetaData, setRedirect, setRequest, setRequestTarget, setResponse, setResponsePage, setResponsePage, setResponsePage, setResponsePage, setUrlForNewWindowEncoding, toString, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, wasHandled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CookieRequestCycle

public CookieRequestCycle(org.apache.wicket.protocol.http.WebApplication application,
                          org.apache.wicket.protocol.http.WebRequest request,
                          org.apache.wicket.Response response)
Method Detail

getCookies

protected java.util.Map<java.lang.String,javax.servlet.http.Cookie> getCookies()
Return or build cache of cookies cookies from request.


getCookie

public javax.servlet.http.Cookie getCookie(java.lang.String name)
Retrieve cookie from request, so long as it hasn't been cleared. Cookies cleared by clearCookie() are still contained in the current request's cookie array, but this method will not return them.

Parameters:
name - cookie name
Returns:
cookie requested, or null if unavailable

applyScope

public void applyScope(javax.servlet.http.Cookie cookie)
Applies scope to cookies set by this application. Base implementation sets the path to / . Override if limiting scope to a path, or expanding it to a broader domain.

Parameters:
cookie - to have its scope set

clearCookie

public void clearCookie(java.lang.String name)
Sets a new a cookie with an expiration time of zero to an clear an old one from the browser, and removes any copy from this request's cookie cache. Subsequent calls to getCookie(String name) during this request will not return a cookie of that name.

Parameters:
name - cookie name


Copyright © 2005-2008 Nathan Hamblen. All Rights Reserved.