public interface Request
ServletRequest that is to be processed, in order to
produce the corresponding Response.| Modifier and Type | Method and Description |
|---|---|
String |
changeSessionId()
Change the ID of the session that this request is associated with.
|
javax.servlet.ServletInputStream |
createInputStream()
Create and return a ServletInputStream to read the content
associated with this Request.
|
void |
disableAsyncSupport()
Disables async support on this request.
|
void |
finishRequest()
Perform whatever actions are required to flush and close the input
stream or reader, in a single operation.
|
String |
generateSessionId()
Generate and return a new session ID.
|
String |
getAuthorization()
Return the authorization credentials sent with this request.
|
boolean |
getCheckRestrictedResources()
Return whether or not access to resources under WEB-INF or META-INF
needs to be checked.
|
Connector |
getConnector()
Return the Connector through which this Request was received.
|
Context |
getContext()
Return the Context within which this Request is being processed.
|
javax.servlet.FilterChain |
getFilterChain()
Get filter chain associated with the request.
|
Host |
getHost()
Return the Host within which this Request is being processed.
|
String |
getInfo()
Return descriptive information about this Request implementation and
the corresponding version number, in the format
<description>/<version>. |
String |
getJrouteId()
Gets the jroute id of this request, which may have been
sent as a separate
JROUTE cookie or appended to the
session identifier encoded in the URI (if cookies have been disabled). |
Object |
getNote(String name)
Return the object bound with the specified name to the internal notes
for this request, or
null if no such binding exists. |
Iterator |
getNoteNames()
Return an Iterator containing the String names of all notes bindings
that exist for this request.
|
javax.servlet.ServletRequest |
getRequest()
Return the
ServletRequest for which this object
is the facade. |
javax.servlet.ServletRequest |
getRequest(boolean maskDefaultContextMapping)
Return the
ServletRequest for which this object
is the facade. |
Response |
getResponse()
Return the Response with which this Request is associated.
|
Session |
getSessionInternal(boolean create)
Gets the session associated with this Request, creating one
if necessary and requested.
|
Socket |
getSocket()
Return the Socket (if any) through which this Request was received.
|
InputStream |
getStream()
Return the input stream associated with this Request.
|
Wrapper |
getWrapper()
Return the Wrapper within which this Request is being processed.
|
Session |
lockSession() |
void |
recycle()
Release all object references, and initialize instance variables, in
preparation for reuse of this object.
|
void |
removeNote(String name)
Remove any object bound to the specified name in the internal notes
for this request.
|
void |
setCheckRestrictedResources(boolean check)
Set whether or not access to resources under WEB-INF or META-INF
needs to be checked.
|
void |
setConnector(Connector connector)
Set the Connector through which this Request was received.
|
void |
setContentLength(int length)
Set the content length associated with this Request.
|
void |
setContentType(String type)
Set the content type (and optionally the character encoding)
associated with this Request.
|
void |
setContext(Context context)
Set the Context within which this Request is being processed.
|
void |
setFilterChain(javax.servlet.FilterChain filterChain)
Set filter chain associated with the request.
|
void |
setHost(Host host)
Set the Host within which this Request is being processed.
|
void |
setNote(String name,
Object value)
Bind an object to a specified name in the internal notes associated
with this request, replacing any existing binding for this name.
|
void |
setProtocol(String protocol)
Set the protocol name and version associated with this Request.
|
void |
setRemoteAddr(String remote)
Set the remote IP address associated with this Request.
|
void |
setRequestedSessionCookiePath(String cookiePath)
Sets the requested session cookie path, see IT 7426
|
void |
setResponse(Response response)
Set the Response with which this Request is associated.
|
void |
setSecure(boolean secure)
Set the value to be returned by
isSecure()
for this Request. |
void |
setServerName(String name)
Set the name of the server (virtual host) to process this request.
|
void |
setServerPort(int port)
Set the port number of the server to process this request.
|
void |
setSocket(Socket socket)
Set the Socket (if any) through which this Request was received.
|
void |
setStream(InputStream stream)
Set the input stream associated with this Request.
|
void |
setWrapper(Wrapper wrapper)
Set the Wrapper within which this Request is being processed.
|
void |
unlockSession() |
String getAuthorization()
Connector getConnector()
void setConnector(Connector connector)
connector - The new connectorContext getContext()
void setContext(Context context)
getContextPath(),
and thus enables parsing of the request URI.context - The newly associated Contextjavax.servlet.FilterChain getFilterChain()
void setFilterChain(javax.servlet.FilterChain filterChain)
filterChain - new filter chainHost getHost()
void setHost(Host host)
host - The newly associated HostString getInfo()
<description>/<version>.javax.servlet.ServletRequest getRequest()
ServletRequest for which this object
is the facade.javax.servlet.ServletRequest getRequest(boolean maskDefaultContextMapping)
ServletRequest for which this object
is the facade.maskDefaultContextMapping - true if the fact that a request
received at the root context was mapped to a default-web-module will
be masked, false otherwiseResponse getResponse()
void setResponse(Response response)
response - The new associated responseSocket getSocket()
void setSocket(Socket socket)
socket - The socket through which this request was receivedInputStream getStream()
void setStream(InputStream stream)
stream - The new input streamWrapper getWrapper()
void setWrapper(Wrapper wrapper)
wrapper - The newly associated Wrapperjavax.servlet.ServletInputStream createInputStream()
throws IOException
IOException - if an input/output error occursvoid finishRequest()
throws IOException
IOException - if an input/output error occursObject getNote(String name)
null if no such binding exists.name - Name of the note to be returnedIterator getNoteNames()
void recycle()
void removeNote(String name)
name - Name of the note to be removedvoid setContentLength(int length)
length - The new content lengthvoid setContentType(String type)
text/html; charset=ISO-8859-4.type - The new content typevoid setNote(String name, Object value)
name - Name to which the object should be boundvalue - Object to be bound to the specified namevoid setProtocol(String protocol)
protocol - Protocol name and versionvoid setRemoteAddr(String remote)
getRemoteHost()
if that method is called.remote - The remote IP addressvoid setSecure(boolean secure)
isSecure()
for this Request.secure - The new isSecure valuevoid setServerName(String name)
name - The server namevoid setServerPort(int port)
port - The server portvoid setCheckRestrictedResources(boolean check)
boolean getCheckRestrictedResources()
String getJrouteId()
JROUTE cookie or appended to the
session identifier encoded in the URI (if cookies have been disabled).String generateSessionId()
void disableAsyncSupport()
void setRequestedSessionCookiePath(String cookiePath)
Session getSessionInternal(boolean create)
create - true if a new session is to be created if one does not
already exist, false otherwiseString changeSessionId()
Session lockSession()
void unlockSession()
Copyright © 2017. All rights reserved.