Java Doc for CoyoteRequest.java in  » Sevlet-Container » tomcat-catalina » org » apache » coyote » tomcat5 » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » tomcat catalina » org.apache.coyote.tomcat5 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.coyote.tomcat5.CoyoteRequest

CoyoteRequest
public class CoyoteRequest implements HttpRequest,HttpServletRequest(Code)
Wrapper object for the Coyote request.
author:
   Remy Maucherat
author:
   Craig R. McClanahan
version:
   $Revision: 1.37 $ $Date: 2004/06/07 16:54:58 $


Field Summary
protected static  intCACHED_POST_LEN
     Post data buffer.
protected  B2CConverterURIConverter
     URI byte to char converter (not recycled).
protected  HashMapattributes
     The attributes associated with this Request, keyed by attribute name.
protected  StringauthType
     Authentication type.
protected  CoyoteConnectorconnector
     Associated Catalina connector.
protected  Contextcontext
     Associated context.
protected  Cookie[]cookies
     The set of cookies associated with this Request.
protected  booleancookiesParsed
     Cookies parsed flag.
protected  RequestcoyoteRequest
     Coyote request.
protected static  LocaledefaultLocale
     The default Locale if none are specified.
protected  ObjectdispatcherType
     The current dispatcher type.
protected  CoyoteRequestFacadefacade
     The facade associated with this request.
protected  FilterChainfilterChain
     Filter chain associated with the request.
protected  SimpleDateFormatformats
     The set of SimpleDateFormat formats to use in getDateHeader().
final protected static  Stringinfo
     Descriptive information about this Request implementation.
protected  InputBufferinputBuffer
     The associated input buffer.
protected  CoyoteInputStreaminputStream
     ServletInputStream.
protected  StringlocalAddr
    
protected  StringlocalName
    
protected  intlocalPort
    
protected  ArrayListlocales
     The preferred Locales assocaited with this Request.
protected  booleanlocalesParsed
     Parse locales.
protected  Loglog
     After the request is mapped to a ServletContext, we can also map it to a logger.
protected  MappingDatamappingData
     Mapping data.
protected  ParameterMapparameterMap
     Hash map used in the getParametersMap method.
protected  byte[]postData
    
protected  CoyoteReaderreader
     Reader.
protected  StringremoteAddr
     Remote address.
protected  StringremoteHost
     Remote host.
protected  intremotePort
    
protected  ObjectrequestDispatcherPath
     The current request dispatcher path.
protected  booleanrequestParametersParsed
     Request parameters parsed flag.
protected  booleanrequestedSessionCookie
    
protected  StringrequestedSessionId
     The requested session ID (if any) for this request.
protected  booleanrequestedSessionURL
    
protected  org.apache.catalina.Responseresponse
     The response with which this request is associated.
protected  booleansecure
     Secure flag.
protected  Sessionsession
     The currently active session for this request.
protected  booleansessionParsed
     Session parsed flag.
protected static  StringManagersm
     The string manager for this package.
protected  Socketsocket
     The socket through which this Request was received.
protected transient  Subjectsubject
    
protected  PrincipaluserPrincipal
     User principal.
protected  booleanusingInputStream
     Using stream flag.
protected  booleanusingReader
     Using writer flag.
protected  ValveContextvalveContext
     The valve context associated with this request.
protected  Wrapperwrapper
     Associated wrapper.

Constructor Summary
public  CoyoteRequest()
    

Method Summary
public  voidaddCookie(Cookie cookie)
     Add a Cookie to the set of Cookies associated with this Request.
public  voidaddHeader(String name, String value)
     Add a Header to the set of Headers associated with this Request.
public  voidaddLocale(Locale locale)
     Add a Locale to the set of preferred Locales for this Request.
public  voidaddParameter(String name, String values)
     Add a parameter name and corresponding set of values to this Request.
public  voidclearCookies()
     Clear the collection of Cookies associated with this Request.
public  voidclearHeaders()
     Clear the collection of Headers associated with this Request.
public  voidclearLocales()
     Clear the collection of Locales associated with this Request.
public  voidclearParameters()
     Clear the collection of parameters associated with this Request.
protected  voidconfigureSessionCookie(Cookie cookie)
     Configures the given JSESSIONID cookie.
public  ServletInputStreamcreateInputStream()
     Create and return a ServletInputStream to read the content associated with this Request.
protected  HttpSessiondoGetSession(boolean create)
    
public  voidfinishRequest()
     Perform whatever actions are required to flush and close the input stream or reader, in a single operation.
public  ObjectgetAttribute(String name)
     Return the specified request attribute if it exists; otherwise, return null.
public  EnumerationgetAttributeNames()
     Return the names of all request attributes for this Request, or an empty Enumeration if there are none.
public  StringgetAuthType()
     Return the authentication type used for this Request.
public  StringgetAuthorization()
     Return the authorization credentials sent with this request.
public  StringgetCharacterEncoding()
     Return the character encoding for this Request.
public  ConnectorgetConnector()
     Return the Connector through which this Request was received.
public  intgetContentLength()
     Return the content length for this Request.
public  StringgetContentType()
     Return the content type for this Request.
public  ContextgetContext()
     Return the Context within which this Request is being processed.
public  StringgetContextPath()
     Return the portion of the request URI used to select the Context of the Request.
public  MessageBytesgetContextPathMB()
     Get the context path.
public  Cookie[]getCookies()
     Return the set of Cookies received with this Request.
public  RequestgetCoyoteRequest()
     Get the Coyote request.
public  longgetDateHeader(String name)
     Return the value of the specified date header, if any; otherwise return -1.
public  StringgetDecodedRequestURI()
     Get the decoded request URI.
public  MessageBytesgetDecodedRequestURIMB()
     Get the decoded request URI.
public  FilterChaingetFilterChain()
     Get filter chain associated with the request.
public  StringgetHeader(String name)
    
public  EnumerationgetHeaderNames()
     Return the names of all headers received with this request.
public  EnumerationgetHeaders(String name)
     Return all of the values of the specified header, if any; otherwise, return an empty enumeration.
public  HostgetHost()
     Return the Host within which this Request is being processed.
public  StringgetInfo()
     Return descriptive information about this Request implementation and the corresponding version number, in the format <description>/<version>.
public  ServletInputStreamgetInputStream()
     Return the servlet input stream for this Request.
public  intgetIntHeader(String name)
     Return the value of the specified header as an integer, or -1 if there is no such header for this request.
public  StringgetLocalAddr()
     Returns the Internet Protocol (IP) address of the interface on which the request was received.
public  StringgetLocalName()
     Returns the host name of the Internet Protocol (IP) interface on which the request was received.
public  intgetLocalPort()
     Returns the Internet Protocol (IP) port number of the interface on which the request was received.
public  LocalegetLocale()
     Return the preferred Locale that the client will accept content in, based on the value for the first Accept-Language header that was encountered.
public  EnumerationgetLocales()
     Return the set of preferred Locales that the client will accept content in, based on the values for any Accept-Language headers that were encountered.
public  MappingDatagetMappingData()
     Return mapping data.
public  StringgetMethod()
     Return the HTTP request method used in this Request.
public  ObjectgetNote(String name)
     Return the object bound with the specified name to the internal notes for this request, or null if no such binding exists.
public  IteratorgetNoteNames()
     Return an Iterator containing the String names of all notes bindings that exist for this request.
public  StringgetParameter(String name)
     Return the value of the specified request parameter, if any; otherwise, return null.
public  MapgetParameterMap()
     Returns a Map of the parameters of this request.
public  EnumerationgetParameterNames()
     Return the names of all defined request parameters for this request.
public  String[]getParameterValues(String name)
     Return the defined values for the specified request parameter, if any; otherwise, return null.
public  StringgetPathInfo()
     Return the path information associated with this Request.
public  MessageBytesgetPathInfoMB()
     Get the path info.
public  StringgetPathTranslated()
     Return the extra path information for this request, translated to a real path.
public  StringgetProtocol()
     Return the protocol and version used to make this Request.
public  StringgetQueryString()
     Return the query string associated with this request.
public  BufferedReadergetReader()
     Read the Reader wrapping the input stream for this Request.
public  StringgetRealPath(String path)
     Return the real path of the specified virtual path.
public  StringgetRemoteAddr()
     Return the remote IP address making this Request.
public  StringgetRemoteHost()
     Return the remote host name making this Request.
public  intgetRemotePort()
     Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request.
public  StringgetRemoteUser()
     Return the name of the remote user that has been authenticated for this Request.
public  ServletRequestgetRequest()
     Return the ServletRequest for which this object is the facade.
public  RequestDispatchergetRequestDispatcher(String path)
     Return a RequestDispatcher that wraps the resource at the specified path, which may be interpreted as relative to the current request path.
public  MessageBytesgetRequestPathMB()
     Get the request path.
public  StringgetRequestURI()
     Return the request URI for this request.
public  StringBuffergetRequestURL()
     Reconstructs the URL the client used to make the request.
public  StringgetRequestedSessionId()
     Return the session identifier included in this request, if any.
public  org.apache.catalina.ResponsegetResponse()
     Return the Response with which this Request is associated.
public  StringgetScheme()
     Return the scheme used to make this Request.
public  StringgetServerName()
     Return the server name responding to this Request.
public  intgetServerPort()
     Return the server port responding to this Request.
public  StringgetServletPath()
     Return the portion of the request URI used to select the servlet that will process this request.
public  MessageBytesgetServletPathMB()
     Get the servlet path.
public  HttpSessiongetSession()
     Return the session associated with this Request, creating one if necessary.
public  HttpSessiongetSession(boolean create)
     Return the session associated with this Request, creating one if necessary and requested.
public  SocketgetSocket()
     Return the Socket (if any) through which this Request was received.
public  InputStreamgetStream()
     Return the input stream associated with this Request.
protected  B2CConvertergetURIConverter()
     Return the URI converter.
public  PrincipalgetUserPrincipal()
     Return the principal that has been authenticated for this Request.
public  ValveContextgetValveContext()
     Get valve context.
public  WrappergetWrapper()
     Return the Wrapper within which this Request is being processed.
public  booleanisRequestedSessionIdFromCookie()
     Return true if the session identifier included in this request came from a cookie.
public  booleanisRequestedSessionIdFromURL()
     Return true if the session identifier included in this request came from the request URI.
public  booleanisRequestedSessionIdFromUrl()
     Return true if the session identifier included in this request came from the request URI.
public  booleanisRequestedSessionIdValid()
     Return true if the session identifier included in this request identifies a valid session.
static  booleanisSSLAttribute(String name)
     Test if a given name is one of the special Servlet-spec SSL attributes.
public  booleanisSecure()
    
public  booleanisUserInRole(String role)
     Return true if the authenticated user principal possesses the specified role name.
protected  voidparseCookies()
     Parse cookies.
protected  voidparseLocales()
     Parse request locales.
protected  voidparseLocalesHeader(String value)
     Parse accept-language header value.
protected  voidparseRequestParameters()
     Parse request parameters.
protected  intreadPostBody(byte body, int len)
     Read post body in an array.
public  voidrecycle()
     Release all object references, and initialize instance variables, in preparation for reuse of this object.
public  voidremoveAttribute(String name)
     Remove the specified request attribute if it exists.
public  voidremoveNote(String name)
     Remove any object bound to the specified name in the internal notes for this request.
public  voidsetAttribute(String name, Object value)
     Set the specified request attribute to the specified value.
public  voidsetAuthType(String type)
     Set the authentication type used for this request, if any; otherwise set the type to null.
public  voidsetAuthorization(String authorization)
     Set the authorization credentials sent with this request.
public  voidsetCharacterEncoding(String enc)
     Overrides the name of the character encoding used in the body of this request.
public  voidsetConnector(Connector connector)
     Set the Connector through which this Request was received.
public  voidsetContentLength(int length)
     Set the content length associated with this Request.
public  voidsetContentType(String type)
     Set the content type (and optionally the character encoding) associated with this Request.
public  voidsetContext(Context context)
     Set the Context within which this Request is being processed.
public  voidsetContextPath(String path)
     Set the context path for this Request.
public  voidsetCookies(Cookie[] cookies)
     Set the set of cookies recieved with this Request.
public  voidsetCoyoteRequest(Request coyoteRequest)
     Set the Coyote request.
public  voidsetDecodedRequestURI(String uri)
     Set the decoded request URI.
public  voidsetFilterChain(FilterChain filterChain)
     Set filter chain associated with the request.
public  voidsetHost(Host host)
     Set the Host within which this Request is being processed.
public  voidsetMethod(String method)
     Set the HTTP request method used for this Request.
public  voidsetNote(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.
public  voidsetPathInfo(String path)
     Set the path information for this Request.
public  voidsetProtocol(String protocol)
     Set the protocol name and version associated with this Request.
public  voidsetQueryString(String query)
     Set the query string for this Request.
public  voidsetRemoteAddr(String remoteAddr)
     Set the IP address of the remote client associated with this Request.
public  voidsetRemoteHost(String remoteHost)
     Set the fully qualified name of the remote client associated with this Request.
public  voidsetRequestURI(String uri)
     Set the unparsed request URI for this Request.
public  voidsetRequestedSessionCookie(boolean flag)
     Set a flag indicating whether or not the requested session ID for this request came in through a cookie.
public  voidsetRequestedSessionId(String id)
     Set the requested session ID for this request.
public  voidsetRequestedSessionURL(boolean flag)
     Set a flag indicating whether or not the requested session ID for this request came in through a URL.
public  voidsetResponse(org.apache.catalina.Response response)
     Set the Response with which this Request is associated.
public  voidsetScheme(String scheme)
     Set the name of the scheme associated with this request.
public  voidsetSecure(boolean secure)
     Set the value to be returned by isSecure() for this Request.
public  voidsetServerName(String name)
     Set the name of the server (virtual host) to process this request.
public  voidsetServerPort(int port)
     Set the port number of the server to process this request.
public  voidsetServletPath(String path)
     Set the servlet path for this Request.
public  voidsetSocket(Socket socket)
     Set the Socket (if any) through which this Request was received.
public  voidsetStream(InputStream stream)
     Set the input stream associated with this Request.
protected  voidsetURIConverter(B2CConverter URIConverter)
     Set the URI converter.
public  voidsetUserPrincipal(Principal principal)
     Set the Principal who has been authenticated for this Request.
public  voidsetValveContext(ValveContext valveContext)
     Set valve context.
public  voidsetWrapper(Wrapper wrapper)
     Set the Wrapper within which this Request is being processed.

Field Detail
CACHED_POST_LEN
protected static int CACHED_POST_LEN(Code)
Post data buffer.



URIConverter
protected B2CConverter URIConverter(Code)
URI byte to char converter (not recycled).



attributes
protected HashMap attributes(Code)
The attributes associated with this Request, keyed by attribute name.



authType
protected String authType(Code)
Authentication type.



connector
protected CoyoteConnector connector(Code)
Associated Catalina connector.



context
protected Context context(Code)
Associated context.



cookies
protected Cookie[] cookies(Code)
The set of cookies associated with this Request.



cookiesParsed
protected boolean cookiesParsed(Code)
Cookies parsed flag.



coyoteRequest
protected Request coyoteRequest(Code)
Coyote request.



defaultLocale
protected static Locale defaultLocale(Code)
The default Locale if none are specified.



dispatcherType
protected Object dispatcherType(Code)
The current dispatcher type.



facade
protected CoyoteRequestFacade facade(Code)
The facade associated with this request.



filterChain
protected FilterChain filterChain(Code)
Filter chain associated with the request.



formats
protected SimpleDateFormat formats(Code)
The set of SimpleDateFormat formats to use in getDateHeader().



info
final protected static String info(Code)
Descriptive information about this Request implementation.



inputBuffer
protected InputBuffer inputBuffer(Code)
The associated input buffer.



inputStream
protected CoyoteInputStream inputStream(Code)
ServletInputStream.



localAddr
protected String localAddr(Code)
Local address



localName
protected String localName(Code)
Local address



localPort
protected int localPort(Code)
Local port



locales
protected ArrayList locales(Code)
The preferred Locales assocaited with this Request.



localesParsed
protected boolean localesParsed(Code)
Parse locales.



log
protected Log log(Code)
After the request is mapped to a ServletContext, we can also map it to a logger.



mappingData
protected MappingData mappingData(Code)
Mapping data.



parameterMap
protected ParameterMap parameterMap(Code)
Hash map used in the getParametersMap method.



postData
protected byte[] postData(Code)



reader
protected CoyoteReader reader(Code)
Reader.



remoteAddr
protected String remoteAddr(Code)
Remote address.



remoteHost
protected String remoteHost(Code)
Remote host.



remotePort
protected int remotePort(Code)
Remote port



requestDispatcherPath
protected Object requestDispatcherPath(Code)
The current request dispatcher path.



requestParametersParsed
protected boolean requestParametersParsed(Code)
Request parameters parsed flag.



requestedSessionCookie
protected boolean requestedSessionCookie(Code)
Was the requested session ID received in a cookie?



requestedSessionId
protected String requestedSessionId(Code)
The requested session ID (if any) for this request.



requestedSessionURL
protected boolean requestedSessionURL(Code)
Was the requested session ID received in a URL?



response
protected org.apache.catalina.Response response(Code)
The response with which this request is associated.



secure
protected boolean secure(Code)
Secure flag.



session
protected Session session(Code)
The currently active session for this request.



sessionParsed
protected boolean sessionParsed(Code)
Session parsed flag.



sm
protected static StringManager sm(Code)
The string manager for this package.



socket
protected Socket socket(Code)
The socket through which this Request was received.



subject
protected transient Subject subject(Code)
The Subject associated with the current AccessControllerContext



userPrincipal
protected Principal userPrincipal(Code)
User principal.



usingInputStream
protected boolean usingInputStream(Code)
Using stream flag.



usingReader
protected boolean usingReader(Code)
Using writer flag.



valveContext
protected ValveContext valveContext(Code)
The valve context associated with this request.



wrapper
protected Wrapper wrapper(Code)
Associated wrapper.




Constructor Detail
CoyoteRequest
public CoyoteRequest()(Code)




Method Detail
addCookie
public void addCookie(Cookie cookie)(Code)
Add a Cookie to the set of Cookies associated with this Request.
Parameters:
  cookie - The new cookie



addHeader
public void addHeader(String name, String value)(Code)
Add a Header to the set of Headers associated with this Request.
Parameters:
  name - The new header name
Parameters:
  value - The new header value



addLocale
public void addLocale(Locale locale)(Code)
Add a Locale to the set of preferred Locales for this Request. The first added Locale will be the first one returned by getLocales().
Parameters:
  locale - The new preferred Locale



addParameter
public void addParameter(String name, String values)(Code)
Add a parameter name and corresponding set of values to this Request. (This is used when restoring the original request on a form based login).
Parameters:
  name - Name of this request parameter
Parameters:
  values - Corresponding values for this request parameter



clearCookies
public void clearCookies()(Code)
Clear the collection of Cookies associated with this Request.



clearHeaders
public void clearHeaders()(Code)
Clear the collection of Headers associated with this Request.



clearLocales
public void clearLocales()(Code)
Clear the collection of Locales associated with this Request.



clearParameters
public void clearParameters()(Code)
Clear the collection of parameters associated with this Request.



configureSessionCookie
protected void configureSessionCookie(Cookie cookie)(Code)
Configures the given JSESSIONID cookie.
Parameters:
  cookie - The JSESSIONID cookie to be configured



createInputStream
public ServletInputStream createInputStream() throws IOException(Code)
Create and return a ServletInputStream to read the content associated with this Request.
exception:
  IOException - if an input/output error occurs



doGetSession
protected HttpSession doGetSession(boolean create)(Code)



finishRequest
public void finishRequest() throws IOException(Code)
Perform whatever actions are required to flush and close the input stream or reader, in a single operation.
exception:
  IOException - if an input/output error occurs



getAttribute
public Object getAttribute(String name)(Code)
Return the specified request attribute if it exists; otherwise, return null.
Parameters:
  name - Name of the request attribute to return



getAttributeNames
public Enumeration getAttributeNames()(Code)
Return the names of all request attributes for this Request, or an empty Enumeration if there are none.



getAuthType
public String getAuthType()(Code)
Return the authentication type used for this Request.



getAuthorization
public String getAuthorization()(Code)
Return the authorization credentials sent with this request.



getCharacterEncoding
public String getCharacterEncoding()(Code)
Return the character encoding for this Request.



getConnector
public Connector getConnector()(Code)
Return the Connector through which this Request was received.



getContentLength
public int getContentLength()(Code)
Return the content length for this Request.



getContentType
public String getContentType()(Code)
Return the content type for this Request.



getContext
public Context getContext()(Code)
Return the Context within which this Request is being processed.



getContextPath
public String getContextPath()(Code)
Return the portion of the request URI used to select the Context of the Request.



getContextPathMB
public MessageBytes getContextPathMB()(Code)
Get the context path. the context path



getCookies
public Cookie[] getCookies()(Code)
Return the set of Cookies received with this Request.



getCoyoteRequest
public Request getCoyoteRequest()(Code)
Get the Coyote request.



getDateHeader
public long getDateHeader(String name)(Code)
Return the value of the specified date header, if any; otherwise return -1.
Parameters:
  name - Name of the requested date header
exception:
  IllegalArgumentException - if the specified header valuecannot be converted to a date



getDecodedRequestURI
public String getDecodedRequestURI()(Code)
Get the decoded request URI. the URL decoded request URI



getDecodedRequestURIMB
public MessageBytes getDecodedRequestURIMB()(Code)
Get the decoded request URI. the URL decoded request URI



getFilterChain
public FilterChain getFilterChain()(Code)
Get filter chain associated with the request.



getHeader
public String getHeader(String name)(Code)
Return the first value of the specified header, if any; otherwise, return null
Parameters:
  name - Name of the requested header



getHeaderNames
public Enumeration getHeaderNames()(Code)
Return the names of all headers received with this request.



getHeaders
public Enumeration getHeaders(String name)(Code)
Return all of the values of the specified header, if any; otherwise, return an empty enumeration.
Parameters:
  name - Name of the requested header



getHost
public Host getHost()(Code)
Return the Host within which this Request is being processed.



getInfo
public String getInfo()(Code)
Return descriptive information about this Request implementation and the corresponding version number, in the format <description>/<version>.



getInputStream
public ServletInputStream getInputStream() throws IOException(Code)
Return the servlet input stream for this Request. The default implementation returns a servlet input stream created by createInputStream().
exception:
  IllegalStateException - if getReader() hasalready been called for this request
exception:
  IOException - if an input/output error occurs



getIntHeader
public int getIntHeader(String name)(Code)
Return the value of the specified header as an integer, or -1 if there is no such header for this request.
Parameters:
  name - Name of the requested header
exception:
  IllegalArgumentException - if the specified header valuecannot be converted to an integer



getLocalAddr
public String getLocalAddr()(Code)
Returns the Internet Protocol (IP) address of the interface on which the request was received.



getLocalName
public String getLocalName()(Code)
Returns the host name of the Internet Protocol (IP) interface on which the request was received.



getLocalPort
public int getLocalPort()(Code)
Returns the Internet Protocol (IP) port number of the interface on which the request was received.



getLocale
public Locale getLocale()(Code)
Return the preferred Locale that the client will accept content in, based on the value for the first Accept-Language header that was encountered. If the request did not specify a preferred language, the server's default Locale is returned.



getLocales
public Enumeration getLocales()(Code)
Return the set of preferred Locales that the client will accept content in, based on the values for any Accept-Language headers that were encountered. If the request did not specify a preferred language, the server's default Locale is returned.



getMappingData
public MappingData getMappingData()(Code)
Return mapping data.



getMethod
public String getMethod()(Code)
Return the HTTP request method used in this Request.



getNote
public Object getNote(String name)(Code)
Return the object bound with the specified name to the internal notes for this request, or null if no such binding exists.
Parameters:
  name - Name of the note to be returned



getNoteNames
public Iterator getNoteNames()(Code)
Return an Iterator containing the String names of all notes bindings that exist for this request.



getParameter
public String getParameter(String name)(Code)
Return the value of the specified request parameter, if any; otherwise, return null. If there is more than one value defined, return only the first one.
Parameters:
  name - Name of the desired request parameter



getParameterMap
public Map getParameterMap()(Code)
Returns a Map of the parameters of this request. Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained in the query string or posted form data. A Map containing parameter names as keysand parameter values as map values.



getParameterNames
public Enumeration getParameterNames()(Code)
Return the names of all defined request parameters for this request.



getParameterValues
public String[] getParameterValues(String name)(Code)
Return the defined values for the specified request parameter, if any; otherwise, return null.
Parameters:
  name - Name of the desired request parameter



getPathInfo
public String getPathInfo()(Code)
Return the path information associated with this Request.



getPathInfoMB
public MessageBytes getPathInfoMB()(Code)
Get the path info. the path info



getPathTranslated
public String getPathTranslated()(Code)
Return the extra path information for this request, translated to a real path.



getProtocol
public String getProtocol()(Code)
Return the protocol and version used to make this Request.



getQueryString
public String getQueryString()(Code)
Return the query string associated with this request.



getReader
public BufferedReader getReader() throws IOException(Code)
Read the Reader wrapping the input stream for this Request. The default implementation wraps a BufferedReader around the servlet input stream returned by createInputStream().
exception:
  IllegalStateException - if getInputStream()has already been called for this request
exception:
  IOException - if an input/output error occurs



getRealPath
public String getRealPath(String path)(Code)
Return the real path of the specified virtual path.
Parameters:
  path - Path to be translated



getRemoteAddr
public String getRemoteAddr()(Code)
Return the remote IP address making this Request.



getRemoteHost
public String getRemoteHost()(Code)
Return the remote host name making this Request.



getRemotePort
public int getRemotePort()(Code)
Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request.



getRemoteUser
public String getRemoteUser()(Code)
Return the name of the remote user that has been authenticated for this Request.



getRequest
public ServletRequest getRequest()(Code)
Return the ServletRequest for which this object is the facade. This method must be implemented by a subclass.



getRequestDispatcher
public RequestDispatcher getRequestDispatcher(String path)(Code)
Return a RequestDispatcher that wraps the resource at the specified path, which may be interpreted as relative to the current request path.
Parameters:
  path - Path of the resource to be wrapped



getRequestPathMB
public MessageBytes getRequestPathMB()(Code)
Get the request path. the request path



getRequestURI
public String getRequestURI()(Code)
Return the request URI for this request.



getRequestURL
public StringBuffer getRequestURL()(Code)
Reconstructs the URL the client used to make the request. The returned URL contains a protocol, server name, port number, and server path, but it does not include query string parameters.

Because this method returns a StringBuffer, not a String, you can modify the URL easily, for example, to append query parameters.

This method is useful for creating redirect messages and for reporting errors. A StringBuffer object containing thereconstructed URL




getRequestedSessionId
public String getRequestedSessionId()(Code)
Return the session identifier included in this request, if any.



getResponse
public org.apache.catalina.Response getResponse()(Code)
Return the Response with which this Request is associated.



getScheme
public String getScheme()(Code)
Return the scheme used to make this Request.



getServerName
public String getServerName()(Code)
Return the server name responding to this Request.



getServerPort
public int getServerPort()(Code)
Return the server port responding to this Request.



getServletPath
public String getServletPath()(Code)
Return the portion of the request URI used to select the servlet that will process this request.



getServletPathMB
public MessageBytes getServletPathMB()(Code)
Get the servlet path. the servlet path



getSession
public HttpSession getSession()(Code)
Return the session associated with this Request, creating one if necessary.



getSession
public HttpSession getSession(boolean create)(Code)
Return the session associated with this Request, creating one if necessary and requested.
Parameters:
  create - Create a new session if one does not exist



getSocket
public Socket getSocket()(Code)
Return the Socket (if any) through which this Request was received. This should only be used to access underlying state information about this Socket, such as the SSLSession associated with an SSLSocket.



getStream
public InputStream getStream()(Code)
Return the input stream associated with this Request.



getURIConverter
protected B2CConverter getURIConverter()(Code)
Return the URI converter.



getUserPrincipal
public Principal getUserPrincipal()(Code)
Return the principal that has been authenticated for this Request.



getValveContext
public ValveContext getValveContext()(Code)
Get valve context.



getWrapper
public Wrapper getWrapper()(Code)
Return the Wrapper within which this Request is being processed.



isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()(Code)
Return true if the session identifier included in this request came from a cookie.



isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()(Code)
Return true if the session identifier included in this request came from the request URI.



isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()(Code)
Return true if the session identifier included in this request came from the request URI.



isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()(Code)
Return true if the session identifier included in this request identifies a valid session.



isSSLAttribute
static boolean isSSLAttribute(String name)(Code)
Test if a given name is one of the special Servlet-spec SSL attributes.



isSecure
public boolean isSecure()(Code)
Was this request received on a secure connection?



isUserInRole
public boolean isUserInRole(String role)(Code)
Return true if the authenticated user principal possesses the specified role name.
Parameters:
  role - Role name to be validated



parseCookies
protected void parseCookies()(Code)
Parse cookies.



parseLocales
protected void parseLocales()(Code)
Parse request locales.



parseLocalesHeader
protected void parseLocalesHeader(String value)(Code)
Parse accept-language header value.



parseRequestParameters
protected void parseRequestParameters()(Code)
Parse request parameters.



readPostBody
protected int readPostBody(byte body, int len) throws IOException(Code)
Read post body in an array.



recycle
public void recycle()(Code)
Release all object references, and initialize instance variables, in preparation for reuse of this object.



removeAttribute
public void removeAttribute(String name)(Code)
Remove the specified request attribute if it exists.
Parameters:
  name - Name of the request attribute to remove



removeNote
public void removeNote(String name)(Code)
Remove any object bound to the specified name in the internal notes for this request.
Parameters:
  name - Name of the note to be removed



setAttribute
public void setAttribute(String name, Object value)(Code)
Set the specified request attribute to the specified value.
Parameters:
  name - Name of the request attribute to set
Parameters:
  value - The associated value



setAuthType
public void setAuthType(String type)(Code)
Set the authentication type used for this request, if any; otherwise set the type to null. Typical values are "BASIC", "DIGEST", or "SSL".
Parameters:
  type - The authentication type used



setAuthorization
public void setAuthorization(String authorization)(Code)
Set the authorization credentials sent with this request.
Parameters:
  authorization - The new authorization credentials



setCharacterEncoding
public void setCharacterEncoding(String enc) throws UnsupportedEncodingException(Code)
Overrides the name of the character encoding used in the body of this request. This method must be called prior to reading request parameters or reading input using getReader().
Parameters:
  enc - The character encoding to be used
exception:
  UnsupportedEncodingException - if the specified encodingis not supported
since:
   Servlet 2.3



setConnector
public void setConnector(Connector connector)(Code)
Set the Connector through which this Request was received.
Parameters:
  connector - The new connector



setContentLength
public void setContentLength(int length)(Code)
Set the content length associated with this Request.
Parameters:
  length - The new content length



setContentType
public void setContentType(String type)(Code)
Set the content type (and optionally the character encoding) associated with this Request. For example, text/html; charset=ISO-8859-4.
Parameters:
  type - The new content type



setContext
public void setContext(Context context)(Code)
Set the Context within which this Request is being processed. This must be called as soon as the appropriate Context is identified, because it identifies the value to be returned by getContextPath(), and thus enables parsing of the request URI.
Parameters:
  context - The newly associated Context



setContextPath
public void setContextPath(String path)(Code)
Set the context path for this Request. This will normally be called when the associated Context is mapping the Request to a particular Wrapper.
Parameters:
  path - The context path



setCookies
public void setCookies(Cookie[] cookies)(Code)
Set the set of cookies recieved with this Request.



setCoyoteRequest
public void setCoyoteRequest(Request coyoteRequest)(Code)
Set the Coyote request.
Parameters:
  coyoteRequest - The Coyote request



setDecodedRequestURI
public void setDecodedRequestURI(String uri)(Code)
Set the decoded request URI.
Parameters:
  uri - The decoded request URI



setFilterChain
public void setFilterChain(FilterChain filterChain)(Code)
Set filter chain associated with the request.
Parameters:
  filterChain - new filter chain



setHost
public void setHost(Host host)(Code)
Set the Host within which this Request is being processed. This must be called as soon as the appropriate Host is identified, and before the Request is passed to a context.
Parameters:
  host - The newly associated Host



setMethod
public void setMethod(String method)(Code)
Set the HTTP request method used for this Request.
Parameters:
  method - The request method



setNote
public void setNote(String name, Object value)(Code)
Bind an object to a specified name in the internal notes associated with this request, replacing any existing binding for this name.
Parameters:
  name - Name to which the object should be bound
Parameters:
  value - Object to be bound to the specified name



setPathInfo
public void setPathInfo(String path)(Code)
Set the path information for this Request. This will normally be called when the associated Context is mapping the Request to a particular Wrapper.
Parameters:
  path - The path information



setProtocol
public void setProtocol(String protocol)(Code)
Set the protocol name and version associated with this Request.
Parameters:
  protocol - Protocol name and version



setQueryString
public void setQueryString(String query)(Code)
Set the query string for this Request. This will normally be called by the HTTP Connector, when it parses the request headers.
Parameters:
  query - The query string



setRemoteAddr
public void setRemoteAddr(String remoteAddr)(Code)
Set the IP address of the remote client associated with this Request.
Parameters:
  remoteAddr - The remote IP address



setRemoteHost
public void setRemoteHost(String remoteHost)(Code)
Set the fully qualified name of the remote client associated with this Request.
Parameters:
  remoteHost - The remote host name



setRequestURI
public void setRequestURI(String uri)(Code)
Set the unparsed request URI for this Request. This will normally be called by the HTTP Connector, when it parses the request headers.
Parameters:
  uri - The request URI



setRequestedSessionCookie
public void setRequestedSessionCookie(boolean flag)(Code)
Set a flag indicating whether or not the requested session ID for this request came in through a cookie. This is normally called by the HTTP Connector, when it parses the request headers.
Parameters:
  flag - The new flag



setRequestedSessionId
public void setRequestedSessionId(String id)(Code)
Set the requested session ID for this request. This is normally called by the HTTP Connector, when it parses the request headers.
Parameters:
  id - The new session id



setRequestedSessionURL
public void setRequestedSessionURL(boolean flag)(Code)
Set a flag indicating whether or not the requested session ID for this request came in through a URL. This is normally called by the HTTP Connector, when it parses the request headers.
Parameters:
  flag - The new flag



setResponse
public void setResponse(org.apache.catalina.Response response)(Code)
Set the Response with which this Request is associated.
Parameters:
  response - The new associated response



setScheme
public void setScheme(String scheme)(Code)
Set the name of the scheme associated with this request. Typical values are http, https, and ftp.
Parameters:
  scheme - The scheme



setSecure
public void setSecure(boolean secure)(Code)
Set the value to be returned by isSecure() for this Request.
Parameters:
  secure - The new isSecure value



setServerName
public void setServerName(String name)(Code)
Set the name of the server (virtual host) to process this request.
Parameters:
  name - The server name



setServerPort
public void setServerPort(int port)(Code)
Set the port number of the server to process this request.
Parameters:
  port - The server port



setServletPath
public void setServletPath(String path)(Code)
Set the servlet path for this Request. This will normally be called when the associated Context is mapping the Request to a particular Wrapper.
Parameters:
  path - The servlet path



setSocket
public void setSocket(Socket socket)(Code)
Set the Socket (if any) through which this Request was received.
Parameters:
  socket - The socket through which this request was received



setStream
public void setStream(InputStream stream)(Code)
Set the input stream associated with this Request.
Parameters:
  stream - The new input stream



setURIConverter
protected void setURIConverter(B2CConverter URIConverter)(Code)
Set the URI converter.
Parameters:
  URIConverter - the new URI connverter



setUserPrincipal
public void setUserPrincipal(Principal principal)(Code)
Set the Principal who has been authenticated for this Request. This value is also used to calculate the value to be returned by the getRemoteUser() method.
Parameters:
  principal - The user Principal



setValveContext
public void setValveContext(ValveContext valveContext)(Code)
Set valve context.
Parameters:
  valveContext - New valve context object



setWrapper
public void setWrapper(Wrapper wrapper)(Code)
Set the Wrapper within which this Request is being processed. This must be called as soon as the appropriate Wrapper is identified, and before the Request is ultimately passed to an application servlet.
Parameters:
  wrapper - The newly associated Wrapper



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.