org.riotfamily.cachius.support
Class SessionIdEncoder

java.lang.Object
  extended by org.riotfamily.cachius.support.SessionIdEncoder

public class SessionIdEncoder
extends Object

Utility class for working with URL-based session tracking.


Constructor Summary
SessionIdEncoder(HttpServletRequest request)
           
 
Method Summary
 Writer createIdInsertingWriter(Writer out)
           
 Writer createIdRemovingWriter(Writer out)
           
 String encodeRedirectURL(String url)
          Encode the session identifier associated with this response into the specified redirect URL, if necessary.
 String encodeURL(String url)
          Encode the session identifier associated with this response into the specified URL, if necessary.
 String getSessionId()
           
 boolean urlsNeedEncoding()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionIdEncoder

public SessionIdEncoder(HttpServletRequest request)
Method Detail

getSessionId

public String getSessionId()

urlsNeedEncoding

public boolean urlsNeedEncoding()

encodeURL

public String encodeURL(String url)
Encode the session identifier associated with this response into the specified URL, if necessary.

Parameters:
url - URL to be encoded

encodeRedirectURL

public String encodeRedirectURL(String url)
Encode the session identifier associated with this response into the specified redirect URL, if necessary.

Parameters:
url - URL to be encoded

createIdRemovingWriter

public Writer createIdRemovingWriter(Writer out)

createIdInsertingWriter

public Writer createIdInsertingWriter(Writer out)