|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectelectric.servlet.InboundHTTPRequest
InboundHTTPRequest is an implementation of the standard HttpServletRequest interface.
| Field Summary |
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
InboundHTTPRequest()
|
|
InboundHTTPRequest(IChannel channel)
|
|
| Method Summary | |
void |
clearHeaders()
Clear all of my headers. |
boolean |
containsHeader(java.lang.String name)
Return true if there is at least one header with the specified name. |
java.lang.Object |
getAttribute(java.lang.String name)
Return the attribute with the specified name, or null if none is found. |
java.util.Enumeration |
getAttributeNames()
Return an enumeration over the attribute names. |
ICredentials[] |
getAuthenticatedCredentials()
|
java.lang.String |
getAuthType()
Returns the name of the authentication scheme used to protect the servlet, for example, "BASIC" or "SSL," or null if the servlet was not protected. |
IChannel |
getChannel()
|
java.lang.String |
getCharacterEncoding()
Return my character encoding. |
int |
getContentLength()
Return my content length, or -1 if none is defined. |
java.lang.String |
getContentType()
Return my content type, or null if none is defined. |
HTTPContext |
getContext()
Return the HTTP context associated with this request. |
java.lang.String |
getContextPath()
|
javax.servlet.http.Cookie |
getCookie(java.lang.String name)
Return the cookie with the specified name, or null if there is none. |
javax.servlet.http.Cookie[] |
getCookies()
Return an array of all the cookies, or null if there are none. |
long |
getDateHeader(java.lang.String name)
Return the value of the header with the specified name, or -1 if none is defined. |
java.lang.String |
getHeader(java.lang.String name)
Return the header with the specified name. |
java.util.Enumeration |
getHeaderNames()
Return an enumeration over all the header names. |
MIMEHeaders |
getHeaders()
|
java.util.Enumeration |
getHeaders(java.lang.String name)
Return an enumeration over all the headers with the specified name. |
javax.servlet.ServletInputStream |
getInputStream()
|
int |
getIntHeader(java.lang.String name)
Return the value of the header with the specified name, or -1 if none is defined. |
java.util.Locale |
getLocale()
Returns the preferred Locale that the client will accept content in, based on the Accept-Language header. |
java.util.Enumeration |
getLocales()
Return an enumeration of locale objects as specified in the request according to section SRV 4.8 of the servlet spec. |
java.lang.String |
getMethod()
Return the method. |
java.lang.String |
getParameter(java.lang.String name)
Return the first parameter with the specified name, or null if there is none. |
java.util.Map |
getParameterMap()
Return an array of all the parameters with the specified name. |
java.util.Enumeration |
getParameterNames()
Return an enumeration over the parameter names. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Return an array of all the parameters with the specified name. |
java.lang.String |
getPathInfo()
Returns any extra path information associated with the URL the client sent when it made this request. |
java.lang.String |
getPathTranslated()
|
java.lang.String |
getProtocol()
|
java.lang.String |
getQueryString()
Return the query string, or null if there is none. |
java.io.BufferedReader |
getReader()
|
java.lang.String |
getRealPath(java.lang.String path)
|
java.lang.String |
getRemoteAddr()
|
java.lang.String |
getRemoteHost()
|
java.lang.String |
getRemoteUser()
Returns the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated. |
javax.servlet.RequestDispatcher |
getRequestDispatcher(java.lang.String path)
Returns a ServletRequestDispatcher object that acts as a wrapper for the resource located at the given path. |
java.lang.String |
getRequestedSessionId()
|
java.lang.String |
getRequestURI()
Return the request URI. |
java.lang.StringBuffer |
getRequestURL()
Return the request URL. |
java.lang.String |
getScheme()
Returns the name of the scheme used to make this request, for example, http, https, or
ftp. |
java.lang.String |
getServerName()
|
int |
getServerPort()
|
java.lang.String |
getServletPath()
Returns the part of this request s URL that calls the servlet. |
javax.servlet.http.HttpSession |
getSession()
|
javax.servlet.http.HttpSession |
getSession(boolean createIfNotFound)
Returns the current HttpSession associated
with this request or, if if there is no current session
and create is true, returns a new session,
or null if create is false. |
java.security.Principal |
getUserPrincipal()
Returns a java.security.Principal object containing the name of the current authenticated user. |
java.lang.String |
getVersion()
Return my version. |
boolean |
isKeepAlive()
|
boolean |
isRequestedSessionIdFromCookie()
|
boolean |
isRequestedSessionIdFromUrl()
|
boolean |
isRequestedSessionIdFromURL()
|
boolean |
isRequestedSessionIdValid()
|
boolean |
isSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS. |
boolean |
isUserInRole(java.lang.String role)
Returns a boolean indicating whether the authenticated user is included in the specified logical "role". |
void |
readHeaders()
|
void |
removeAttribute(java.lang.String name)
Remove the attribute with the specified name. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Binds an object to a given attribute name in this servlet context. |
void |
setAuthenticatedCredentials(ICredentials[] authenticatedCredentials)
|
void |
setChannel(IChannel channel)
|
void |
setCharacterEncoding(java.lang.String newEncoding)
|
void |
setConfig(Config config)
|
void |
setContentType(java.lang.String type)
Set my content type. |
void |
setContext(HTTPContext context)
|
void |
setHTTPResponse(OutboundHTTPResponse httpResponse)
|
void |
setPathInfo(java.lang.String pathInfo)
|
void |
setRemoteUser(java.lang.String user)
|
void |
setScheme(java.lang.String scheme)
Set the scheme. |
void |
setSecure(boolean isSecure)
Configure the isSecure flag. |
void |
setServletPath(java.lang.String servletPath)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public InboundHTTPRequest()
public InboundHTTPRequest(IChannel channel)
channel - | Method Detail |
public java.lang.String toString()
public IChannel getChannel()
public void setChannel(IChannel channel)
channel - public void setContext(HTTPContext context)
context - may be needed internally before config is setFormAuthenticatorpublic HTTPContext getContext()
OutboundHTTPResponse.sendRedirect(java.lang.String)public void setConfig(Config config)
config - public void setHTTPResponse(OutboundHTTPResponse httpResponse)
httpResponse - public java.lang.String getVersion()
public java.lang.String getMethod()
getMethod in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getRequestURI()
getRequestURI in interface javax.servlet.http.HttpServletRequestpublic java.lang.StringBuffer getRequestURL()
getRequestURL in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getQueryString()
getQueryString in interface javax.servlet.http.HttpServletRequestpublic int getContentLength()
getContentLength in interface javax.servlet.ServletRequestpublic java.lang.String getContentType()
getContentType in interface javax.servlet.ServletRequestpublic void setContentType(java.lang.String type)
type - The new value.
public void setCharacterEncoding(java.lang.String newEncoding)
throws java.io.UnsupportedEncodingException
setCharacterEncoding in interface javax.servlet.ServletRequestnewEncoding -
java.io.UnsupportedEncodingExceptionpublic java.lang.String getCharacterEncoding()
getCharacterEncoding in interface javax.servlet.ServletRequest
public void readHeaders()
throws java.io.IOException
java.io.IOExceptionpublic MIMEHeaders getHeaders()
public void clearHeaders()
public java.lang.String getHeader(java.lang.String name)
getHeader in interface javax.servlet.http.HttpServletRequestname - The name.public java.util.Enumeration getHeaders(java.lang.String name)
getHeaders in interface javax.servlet.http.HttpServletRequestname - The name.public boolean containsHeader(java.lang.String name)
name - The name.public java.util.Enumeration getHeaderNames()
getHeaderNames in interface javax.servlet.http.HttpServletRequestpublic int getIntHeader(java.lang.String name)
getIntHeader in interface javax.servlet.http.HttpServletRequestname - The name.public long getDateHeader(java.lang.String name)
getDateHeader in interface javax.servlet.http.HttpServletRequestname - The name.public boolean isKeepAlive()
public java.util.Enumeration getLocales()
getLocales in interface javax.servlet.ServletRequestpublic java.util.Locale getLocale()
getLocale in interface javax.servlet.ServletRequestpublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.servlet.ServletRequestname - The name.public java.util.Enumeration getAttributeNames()
getAttributeNames in interface javax.servlet.ServletRequestpublic void removeAttribute(java.lang.String name)
removeAttribute in interface javax.servlet.ServletRequestname - The name.
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface javax.servlet.ServletRequestname - The name.value - The value.public java.lang.String getParameter(java.lang.String name)
getParameter in interface javax.servlet.ServletRequestname - The name.public java.util.Enumeration getParameterNames()
getParameterNames in interface javax.servlet.ServletRequestpublic java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues in interface javax.servlet.ServletRequestname - The name.public java.util.Map getParameterMap()
getParameterMap in interface javax.servlet.ServletRequestpublic javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
The pathname specified may be relative, although it cannot
extend outside the current servlet context. If the path begins
with a "/" it is interpreted as relative to the current context
root. This method returns null if the servlet
container cannot return a RequestDispatcher.
The difference between this method and ServletContext.getRequestDispatcher(java.lang.String) is that this method can take
a relative path.
getRequestDispatcher in interface javax.servlet.ServletRequestpath - public javax.servlet.http.Cookie[] getCookies()
getCookies in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.Cookie getCookie(java.lang.String name)
name - public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getRequestedSessionId()
getRequestedSessionId in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.HttpSession getSession()
getSession in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.HttpSession getSession(boolean createIfNotFound)
HttpSession associated
with this request or, if if there is no current session
and create is true, returns a new session,
or null if create is false.
getSession in interface javax.servlet.http.HttpServletRequestcreateIfNotFound - false to get existing session (or null),
true to create a session if none existing.
public java.lang.String getRemoteUser()
getRemoteUser in interface javax.servlet.http.HttpServletRequestpublic void setRemoteUser(java.lang.String user)
user - public boolean isUserInRole(java.lang.String role)
isUserInRole in interface javax.servlet.http.HttpServletRequestrole - public java.security.Principal getUserPrincipal()
getUserPrincipal in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getAuthType()
getAuthType in interface javax.servlet.http.HttpServletRequestpublic void setAuthenticatedCredentials(ICredentials[] authenticatedCredentials)
authenticatedCredentials - public ICredentials[] getAuthenticatedCredentials()
public java.lang.String getContextPath()
getContextPath in interface javax.servlet.http.HttpServletRequestpublic void setServletPath(java.lang.String servletPath)
servletPath - public java.lang.String getServletPath()
getServletPath in interface javax.servlet.http.HttpServletRequestpublic void setPathInfo(java.lang.String pathInfo)
pathInfo - public java.lang.String getPathInfo()
getPathInfo in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getRealPath(java.lang.String path)
getRealPath in interface javax.servlet.ServletRequestpath - public java.lang.String getPathTranslated()
getPathTranslated in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getRemoteAddr()
getRemoteAddr in interface javax.servlet.ServletRequestpublic java.lang.String getRemoteHost()
getRemoteHost in interface javax.servlet.ServletRequestpublic java.lang.String getScheme()
http, https, or
ftp. Different schemes have different rules
for constructing URLs, as noted in RFC 1738.
getScheme in interface javax.servlet.ServletRequestpublic void setScheme(java.lang.String scheme)
scheme - public java.lang.String getServerName()
getServerName in interface javax.servlet.ServletRequestpublic int getServerPort()
getServerPort in interface javax.servlet.ServletRequestpublic boolean isSecure()
isSecure in interface javax.servlet.ServletRequestpublic void setSecure(boolean isSecure)
isSecure - IMessageFactory,
SSLMessageFactorypublic java.lang.String getProtocol()
getProtocol in interface javax.servlet.ServletRequest
public javax.servlet.ServletInputStream getInputStream()
throws java.io.IOException
getInputStream in interface javax.servlet.ServletRequestjava.io.IOException
public java.io.BufferedReader getReader()
throws java.io.IOException
getReader in interface javax.servlet.ServletRequestjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||