|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.nucleus.TimedOperationService
atg.servlet.pipeline.PipelineableServletImpl
atg.servlet.pipeline.InsertableServletImpl
atg.projects.store.servlet.pipeline.ProtocolSwitchServlet
public class ProtocolSwitchServlet
This pipeline servlet performs switching between a secure sever and a non-secure server. A list of secure paths and the enable property controls the switching. The servlet is configured with a list of URL mappings; if the URL being accessed is in the URL mapping, the request is passed off to the secure server. The nonSecureHostName and secureHostname are default taken from atg/dynamo/Configuration. These can be overwridden at the component level.
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string. |
protected boolean |
mEnabled
Enabled property. |
protected java.lang.String |
mHostName
Host name. |
protected int |
mHttpPort
Http port. |
protected int |
mHttpsPort
Https port. |
protected java.lang.String[] |
mIgnoreList
List of paths to ignore. |
protected java.lang.String |
mSecureHostName
Secure host name. |
protected java.lang.String[] |
mSecureList
List of secure paths to protect. |
static java.lang.String |
NONSECURE_PROTOCOL
Nonsecure protocol constant. |
static java.lang.String |
SECURE_PROTOCOL
Secure protocol constant. |
| Fields inherited from class atg.nucleus.GenericService |
|---|
SERVICE_INFO_KEY |
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
|---|
DEFAULT_LOG_TRACE_STATUS |
| Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
|---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
| Constructor Summary | |
|---|---|
ProtocolSwitchServlet()
|
|
| Method Summary | |
|---|---|
void |
doStartService()
Called after the service has been created, placed into the naming hierarchy, and initialized with its configured property values. |
java.lang.String |
getHostName()
|
int |
getHttpPort()
|
int |
getHttpsPort()
|
java.lang.String[] |
getIgnoreList()
|
protected java.lang.String |
getNonSecureUrl(java.lang.String pUrl)
Build a nonSecure url. |
java.lang.String |
getSecureHostName()
|
java.lang.String[] |
getSecureList()
|
protected java.lang.String |
getSecureUrl(java.lang.String pUrl)
Build a Secure url. |
protected boolean |
isCurrentPathInIgnoreList(java.lang.String pPath)
Method used check if the requested URI is part of the ignored list. |
protected boolean |
isCurrentPathInSecureList(java.lang.String pPath)
Method used check if the requested URI is part of the secure list. |
boolean |
isEnabled()
|
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Called in the pipeline when a request needs to be processed. |
void |
setEnabled(boolean pEnabled)
|
void |
setHostName(java.lang.String pHostName)
|
void |
setHttpPort(int pHttpPort)
|
void |
setHttpsPort(int pHttpsPort)
|
void |
setIgnoreList(java.lang.String[] pIgnoreList)
|
void |
setSecureHostName(java.lang.String pSecureHostName)
|
void |
setSecureList(java.lang.String[] pSecureList)
Set the secure list. |
| Methods inherited from class atg.servlet.pipeline.InsertableServletImpl |
|---|
getInsertAfterServlet, setInsertAfterServlet |
| Methods inherited from class atg.servlet.pipeline.PipelineableServletImpl |
|---|
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo |
| Methods inherited from class atg.nucleus.TimedOperationService |
|---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
| Methods inherited from class atg.nucleus.GenericService |
|---|
addLogListener, doStopService, getAbsoluteName, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
|---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface atg.servlet.pipeline.PipelineableServlet |
|---|
getNextServlet, passRequest, setNextServlet |
| Methods inherited from interface javax.servlet.Servlet |
|---|
destroy, getServletConfig, getServletInfo, init, service |
| Field Detail |
|---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String SECURE_PROTOCOL
public static final java.lang.String NONSECURE_PROTOCOL
protected java.lang.String[] mSecureList
protected java.lang.String[] mIgnoreList
protected java.lang.String mHostName
protected int mHttpPort
protected int mHttpsPort
protected java.lang.String mSecureHostName
protected boolean mEnabled
| Constructor Detail |
|---|
public ProtocolSwitchServlet()
| Method Detail |
|---|
public java.lang.String[] getIgnoreList()
public void setIgnoreList(java.lang.String[] pIgnoreList)
pIgnoreList - - the ignore list to set.public java.lang.String getSecureHostName()
public void setSecureHostName(java.lang.String pSecureHostName)
pSecureHostName - - secure host name.public int getHttpsPort()
public void setHttpsPort(int pHttpsPort)
pHttpsPort - - https port.public int getHttpPort()
public void setHttpPort(int pHttpPort)
pHttpPort - - http port.public java.lang.String getHostName()
public void setHostName(java.lang.String pHostName)
pHostName - - host name.public void setSecureList(java.lang.String[] pSecureList)
pSecureList - - array of protected urlspublic java.lang.String[] getSecureList()
public boolean isEnabled()
public void setEnabled(boolean pEnabled)
pEnabled - - the enabled status to set.
public void service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
throws java.io.IOException,
javax.servlet.ServletException
service in class atg.servlet.pipeline.PipelineableServletImplpRequest - The servlet's requestpResponse - The servlet's response
javax.servlet.ServletException - if an error occurred while processing the servlet request
java.io.IOException - if an error occurred while reading or writing the servlet
requestprotected boolean isCurrentPathInSecureList(java.lang.String pPath)
pPath - The requested URI without query parameters
protected boolean isCurrentPathInIgnoreList(java.lang.String pPath)
pPath - The requested URI without query parameters
protected java.lang.String getNonSecureUrl(java.lang.String pUrl)
pUrl - - url to build full url for
protected java.lang.String getSecureUrl(java.lang.String pUrl)
pUrl - - url to build full url for
public void doStartService()
throws atg.nucleus.ServiceException
doStartService in class atg.servlet.pipeline.InsertableServletImplatg.nucleus.ServiceException - if the service had a problem starting up
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||