|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectDefaultServletContainerAdapter
public abstract class DefaultServletContainerAdapter
Default implementation of a Servlet container adapter.
| Constructor Summary | |
|---|---|
protected |
DefaultServletContainerAdapter()
|
| Method Summary | |
|---|---|
void |
beginRequest(HttpServletRequest request,
HttpServletResponse response)
Called at the beginning of each processed request. |
Object |
createControlBeanContext(HttpServletRequest request,
HttpServletResponse response)
Get a context object to support Beehive Controls. |
protected PageFlowEventReporter |
createEventReporter()
|
boolean |
doSecurityRedirect(String path,
HttpServletRequest request,
HttpServletResponse response)
Cause the server to do a security check for the given path. |
void |
endRequest(HttpServletRequest request,
HttpServletResponse response)
Called at the end of each processed request. |
void |
ensureFailover(String attrName,
Object attrVal,
HttpServletRequest request)
Ensure that the given session attribute is replicated in a cluster for session failover. |
PageFlowEventReporter |
getEventReporter()
Get an event reporter, which will be notified of events like "page flow created", "action raised", etc. |
Factory |
getFactory(Class factoryType,
String id,
FactoryConfig config)
Generic method to get a Factory class that may be container dependent. |
String |
getFullContextPath(HttpServletRequest request)
Return the webapp context path for the given request. |
int |
getListenPort(HttpServletRequest request)
Get the port on which the server is listening for unsecure connections. |
String |
getPlatformName()
Get the name of the platform, which may be used to find platform-specific configuration files. |
int |
getSecureListenPort(HttpServletRequest request)
Get the port on which the server is listening for secure connections. |
SecurityProtocol |
getSecurityProtocol(String path,
HttpServletRequest request)
Tell whether a web application resource requires a secure transport protocol. |
protected ServletContext |
getServletContext()
Get the current ServletContext. |
boolean |
isInProductionMode()
Tell whether the system is in production mode. |
void |
login(String username,
String password,
HttpServletRequest request,
HttpServletResponse response)
Log in the user, using "weak" username/password authentication. |
void |
logout(boolean invalidateSessions,
HttpServletRequest request,
HttpServletResponse response)
Log out the user. |
void |
setContext(AdapterContext context)
Set the AdapterContext. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface Adapter |
|---|
accept |
| Constructor Detail |
|---|
protected DefaultServletContainerAdapter()
| Method Detail |
|---|
public boolean isInProductionMode()
isInProductionMode in interface ServletContainerAdaptertrue if the system property "beehive.productionmode" is set to "true", or if asserts are
disabled for this class in the case where the system property has no value; false if the
system property is set to "false", or if asserts are enabled for this class in the case where the
system property has no value.
public SecurityProtocol getSecurityProtocol(String path,
HttpServletRequest request)
SecurityProtocol.UNSPECIFIED for all paths.
getSecurityProtocol in interface ServletContainerAdapterpath - a webapp-relative path for a resource.request - the current HttpServletRequest.
SecurityProtocol.UNSPECIFIED.
public boolean doSecurityRedirect(String path,
HttpServletRequest request,
HttpServletResponse response)
doSecurityRedirect in interface ServletContainerAdapterpath - the webapp-relative path on which to run security checks.request - the current HttpServletRequest.response - the current HttpServletResponse.
falsepublic int getListenPort(HttpServletRequest request)
-1.
getListenPort in interface ServletContainerAdapterrequest - the current HttpServletRequest.
-1.public int getSecureListenPort(HttpServletRequest request)
-1.
getSecureListenPort in interface ServletContainerAdapterrequest - the current HttpServletRequest.
-1.
public void login(String username,
String password,
HttpServletRequest request,
HttpServletResponse response)
throws LoginException
UnsupportedOperationException.
login in interface ServletContainerAdapterusername - the user's login name.password - the user's password.request - the current HttpServletRequest.response - the current HttpServletResponse.
UnsupportedOperationException - in all cases.
LoginException - if the authentication failed
public void logout(boolean invalidateSessions,
HttpServletRequest request,
HttpServletResponse response)
UnsupportedOperationException.
logout in interface ServletContainerAdapterinvalidateSessions - if true, the session is invalidated (on all single-signon webapps);
otherwise the session and its data are left intact. To invalidate the session in only the
current webapp, set this parameter to false and call invalidate() on the HttpSession.request - the current HttpServletRequest.response - the current HttpServletResponse.
UnsupportedOperationException - in all cases.public String getFullContextPath(HttpServletRequest request)
getContextPath() on the request.
getFullContextPath in interface ServletContainerAdapterrequest - the current HttpServletRequest.
getContextPath() on the current request.
public void ensureFailover(String attrName,
Object attrVal,
HttpServletRequest request)
ensureFailover in interface ServletContainerAdapterattrName - the name of the session attribute for which failover should be ensured.attrVal - the value of the given session attribute.request - the current HttpServletRequest.
public void beginRequest(HttpServletRequest request,
HttpServletResponse response)
beginRequest in interface ServletContainerAdapterrequest - the current HttpServletRequest.response - the current HttpServletResponse.
public void endRequest(HttpServletRequest request,
HttpServletResponse response)
endRequest in interface ServletContainerAdapterrequest - the current HttpServletRequest.response - the current HttpServletResponse.
public Object createControlBeanContext(HttpServletRequest request,
HttpServletResponse response)
PageFlowBeanContext.
createControlBeanContext in interface ServletContainerAdapterrequest - the current HttpServletRequest.response - the current HttpServletResponse.
protected ServletContext getServletContext()
public void setContext(AdapterContext context)
setContext in interface Adaptercontext - the AdapterContext to set.public String getPlatformName()
getPlatformName in interface ServletContainerAdapterpublic PageFlowEventReporter getEventReporter()
DefaultPageFlowEventReporter.
getEventReporter in interface ServletContainerAdapterPageFlowEventReporter.protected PageFlowEventReporter createEventReporter()
public Factory getFactory(Class factoryType,
String id,
FactoryConfig config)
This method is called to get the following Factory implementations:
getFactory in interface ServletContainerAdapterfactoryType - the class type that the factory should extend or implementid - can be used for the case where there is more than one possible Factory
that extends or implaments the class type.config - a configuration object passed to a Factory
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||