|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServletContainerAdapter
Adapter interface for plugging into various Servlet containers. An implementor of this interface is "discovered" at runtime. The discovery process is as follows:
accept
method is called.
accept
returns true
, then that implementation class is chosen as the current
adapter; otherwise, the next one in the list is tried.
DefaultServletContainerAdapter
is used.
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. |
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 classType,
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. |
boolean |
isInProductionMode()
Tell whether the server is running 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 current user. |
Methods inherited from interface Adapter |
---|
accept, setContext |
Method Detail |
---|
boolean isInProductionMode()
true
if the server is running in production mode.SecurityProtocol getSecurityProtocol(String path, HttpServletRequest request)
<security-constraint> <web-resource-collection> <web-resource-name>Secure PageFlow - begin</web-resource-name> <url-pattern>/login/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>
path
- a webapp-relative path for a resource.request
- the current HttpServletRequest.
Boolean.TRUE
if a transport-guarantee of CONFIDENTIAL
or
INTEGRAL
is associated with the given resource; Boolean.FALSE
a transport-guarantee of NONE
is associated with the given resource; or
null
if there is no transport-guarantee associated with the given resource.boolean doSecurityRedirect(String path, HttpServletRequest request, HttpServletResponse response)
path
- the webapp-relative path on which to run security checks.request
- the current HttpServletRequest.response
- the current HttpServletResponse.
true
if a redirect occurred.int getListenPort(HttpServletRequest request)
request
- the current HttpServletRequest.
int getSecureListenPort(HttpServletRequest request)
request
- the current HttpServletRequest.
void login(String username, String password, HttpServletRequest request, HttpServletResponse response) throws LoginException
username
- the user's login name.password
- the user's password.request
- the current HttpServletRequest.response
- the current HttpServletResponse.
LoginException
- if the authentication failedvoid logout(boolean invalidateSessions, HttpServletRequest request, HttpServletResponse response)
invalidateSessions
- 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.String getFullContextPath(HttpServletRequest request)
request
- the current HttpServletRequest.void ensureFailover(String attrName, Object attrVal, HttpServletRequest request)
attrName
- the name of the session attribute for which failover should be ensured.attrVal
- the value of the given session attribute.request
- the current HttpServletRequest.void beginRequest(HttpServletRequest request, HttpServletResponse response)
request
- the current HttpServletRequest.response
- the current HttpServletResponse.void endRequest(HttpServletRequest request, HttpServletResponse response)
request
- the current HttpServletRequest.response
- the current HttpServletResponse.Object createControlBeanContext(HttpServletRequest request, HttpServletResponse response)
request
- the current HttpServletRequest.response
- the current HttpServletResponse.
String getPlatformName()
PageFlowEventReporter getEventReporter()
Factory getFactory(Class classType, String id, FactoryConfig config)
This method is called to get the following Factory implementations:
classType
- the class type that the factory should extend or implement.id
- 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 |