m.c.m.proxyma.rewrite
Class CookieRewriteEngine

java.lang.Object
  extended by m.c.m.proxyma.rewrite.CookieRewriteEngine

public class CookieRewriteEngine
extends java.lang.Object

This Class implements the logic of the Cookies rewriter engine.
It is used by the plugins that performs Cookie rewriting stuff.

NOTE: this software is released under GPL License. See the LICENSE of this distribution for more informations.

Version:
$Id: CookieRewriteEngine.java 176 2010-07-03 09:02:14Z marcolinuz $
Author:
Marco Casavecchia Morganti (marcolinuz) [marcolinuz-at-gmail.com];

Field Summary
static java.lang.String PROXYMA_REWRITTEN_HEADER
          The header added to the rewritten cookies that can be recognized by the preprocessor to restore the original values.
 
Constructor Summary
CookieRewriteEngine(ProxymaContext context)
           
 
Method Summary
 void masqueradeCookie(javax.servlet.http.Cookie cookie, ProxymaResource aResource)
          Masquerade to the client a cookie that comes froma a remote host by setting its domain to the domain of proxyma and the path to the path of the current proxy-folder.
 void unmasqueradeCookie(javax.servlet.http.Cookie cookie)
          Rebuilds the original cookie from a masqueraded one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROXYMA_REWRITTEN_HEADER

public static final java.lang.String PROXYMA_REWRITTEN_HEADER
The header added to the rewritten cookies that can be recognized by the preprocessor to restore the original values.

See Also:
Constant Field Values
Constructor Detail

CookieRewriteEngine

public CookieRewriteEngine(ProxymaContext context)
Method Detail

masqueradeCookie

public void masqueradeCookie(javax.servlet.http.Cookie cookie,
                             ProxymaResource aResource)
Masquerade to the client a cookie that comes froma a remote host by setting its domain to the domain of proxyma and the path to the path of the current proxy-folder.

Parameters:
cookie - the cookie to masquerade
aResource - the resource that owns the Cookie

unmasqueradeCookie

public void unmasqueradeCookie(javax.servlet.http.Cookie cookie)
Rebuilds the original cookie from a masqueraded one.

Parameters:
cookie - the cookie to unmasquerade


Copyright © 2010. All Rights Reserved.