|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDefaultServerAdapter
public class DefaultServerAdapter
Constructor Summary | |
---|---|
DefaultServerAdapter()
|
Method Summary | |
---|---|
void |
beginRequest(HttpServletRequest request,
HttpServletResponse response)
Called at the beginning of each processed request. |
boolean |
checkSecurity(String uri,
HttpServletRequest request,
HttpServletResponse response)
Cause the server to do a security check for the given URI. |
ControlBeanContext |
createControlBeanContext(HttpServletRequest request,
HttpServletResponse response)
Get a context object to support Java Controls. |
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. |
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. |
File[] |
getReloadableClassDirs()
Get the build directory (or directories) where reloadable classes reside. |
int |
getSecureListenPort(HttpServletRequest request)
Get the port on which the server is listening for secure connections. |
protected ServletContext |
getServletContext()
|
void |
initServletContext(ServletContext servletContext)
Called upon the initialization of the given ServletContext. |
boolean |
isInProductionMode()
Tell whether the server is running in production mode. |
Boolean |
isSecureResource(String uri,
HttpServletRequest request)
Tell whether a web application resource requires a secure transport protocol. |
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 class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultServerAdapter()
Method Detail |
---|
public boolean isInProductionMode()
ServerAdapter
false
only if the System property pageflow:devmode
is set.
isInProductionMode
in interface ServerAdapter
true
if the server is running in production mode.public Boolean isSecureResource(String uri, HttpServletRequest request)
ServerAdapter
<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>
isSecureResource
in interface ServerAdapter
uri
- a webapp-relative URI 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.public boolean checkSecurity(String uri, HttpServletRequest request, HttpServletResponse response)
ServerAdapter
checkSecurity
in interface ServerAdapter
uri
- the URI on which to run security checks.request
- the current HttpServletRequest.response
- the current HttpServletResponse.
true
if a redirect occurred.public int getListenPort(HttpServletRequest request)
ServerAdapter
getListenPort
in interface ServerAdapter
request
- the current HttpServletRequest.
public int getSecureListenPort(HttpServletRequest request)
ServerAdapter
getSecureListenPort
in interface ServerAdapter
request
- the current HttpServletRequest.
public void login(String username, String password, HttpServletRequest request, HttpServletResponse response) throws LoginException
ServerAdapter
login
in interface ServerAdapter
username
- the user's login name.password
- the user's password.request
- the current HttpServletRequest.response
- the current HttpServletResponse.
LoginException
- if the authentication failedpublic void logout(boolean invalidateSessions, HttpServletRequest request, HttpServletResponse response)
ServerAdapter
logout
in interface ServerAdapter
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.public String getFullContextPath(HttpServletRequest request)
ServerAdapter
getFullContextPath
in interface ServerAdapter
request
- the current HttpServletRequest.public void ensureFailover(String attrName, Object attrVal, HttpServletRequest request)
ServerAdapter
ensureFailover
in interface ServerAdapter
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.public void initServletContext(ServletContext servletContext)
ServerAdapter
initServletContext
in interface ServerAdapter
servletContext
- the ServletContext being initialized.public void beginRequest(HttpServletRequest request, HttpServletResponse response)
ServerAdapter
beginRequest
in interface ServerAdapter
request
- the current HttpServletRequest.response
- the current HttpServletResponse.public void endRequest(HttpServletRequest request, HttpServletResponse response)
ServerAdapter
endRequest
in interface ServerAdapter
request
- the current HttpServletRequest.response
- the current HttpServletResponse.public ControlBeanContext createControlBeanContext(HttpServletRequest request, HttpServletResponse response)
ServerAdapter
createControlBeanContext
in interface ServerAdapter
request
- the current HttpServletRequest.response
- the current HttpServletResponse.
public File[] getReloadableClassDirs()
ServerAdapter
getReloadableClassDirs
in interface ServerAdapter
null
if there are no
appropriate directories.ReloadableClassHandler
protected ServletContext getServletContext()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |