Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

ServletRequest Class Reference

Inheritance diagram for ServletRequest:

HttpRequest IServletRequest List of all members.

Public Member Functions

 this (IProviderBridge bridge)
void set (char[] servlet, ServletContext context)
void reset ()
Uri getUri ()
ServletContext getContext ()
HttpParams getParameters ()
HttpHeaders getHeaders ()
HttpCookies getCookies ()
char[] getCharacterEncoding ()
int getContentLength ()
char[] getContentType ()
char[] getProtocol ()
char[] getMethod ()
char[] getServerName ()
int getServerPort ()
HttpReader getReader ()
char[] getRemoteAddress ()
char[] getRemoteHost ()
char[] getPathInfo ()
char[] getContextPath ()
char[] getServletPath ()

Private Member Functions

 this (IProviderBridge bridge, IBuffer headerSpace)
StartLine getStartLine ()
Uri getRequestUri ()
Uri getExplicitUri ()
HttpCookies getInputCookies ()
HttpHeaders getInputHeaders ()
HttpParams getInputParameters ()
IBuffer getInputBuffer ()
void write (IWriter writer)
void readHeaders ()
char[] getRemoteAddr ()
char[] getServerScheme ()
char[] getEncoding ()
char[] getMimeType ()
int getPort ()
char[] getHost ()

Static Private Member Functions

 this ()

Private Attributes

ServletContext context
char[] servlet

Member Function Documentation

this IProviderBridge  bridge  )  [inline]
 

Create a Request instance. Note that we create a bunch of internal support objects on a per-thread basis. This is so we don't have to create them on demand; however, we should be careful about resetting them all before each new usage.

Reimplemented from HttpRequest.

Definition at line 68 of file ServletRequest.d.

void set char[]  servlet,
ServletContext  context
[inline]
 

Definition at line 78 of file ServletRequest.d.

Referenced by ServletProvider::service().

void reset  )  [inline]
 

Reset this request, ready for the next connection

Reimplemented from HttpRequest.

Definition at line 88 of file ServletRequest.d.

Uri getUri  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 98 of file ServletRequest.d.

Referenced by ServletProvider::service().

ServletContext getContext  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 107 of file ServletRequest.d.

HttpParams getParameters  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 116 of file ServletRequest.d.

HttpHeaders getHeaders  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 125 of file ServletRequest.d.

HttpCookies getCookies  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 134 of file ServletRequest.d.

char [] getCharacterEncoding  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 143 of file ServletRequest.d.

int getContentLength  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 152 of file ServletRequest.d.

char [] getContentType  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 161 of file ServletRequest.d.

char [] getProtocol  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 170 of file ServletRequest.d.

char [] getMethod  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 179 of file ServletRequest.d.

char [] getServerName  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 188 of file ServletRequest.d.

int getServerPort  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 197 of file ServletRequest.d.

HttpReader getReader  )  [inline]
 

Return the reader for the request input. This sets a boundary sentinel, indicating we're finished processing the input headers.

Reimplemented from HttpRequest.

Definition at line 206 of file ServletRequest.d.

char [] getRemoteAddress  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 215 of file ServletRequest.d.

char [] getRemoteHost  )  [inline]
 

Proxy this request across to the server instance

Reimplemented from HttpRequest.

Definition at line 224 of file ServletRequest.d.

char [] getPathInfo  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 233 of file ServletRequest.d.

References ServletContext::getName().

char [] getContextPath  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 244 of file ServletRequest.d.

References ServletContext::getName().

char [] getServletPath  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 253 of file ServletRequest.d.

this  )  [inline, static, inherited]
 

Setup exceptions and so on

Definition at line 91 of file HttpRequest.d.

References HttpRequest::InvalidState.

this IProviderBridge  bridge,
IBuffer  headerSpace
[inline, inherited]
 

Construct this HttpMessage using the specified HttpBridge. The bridge provides a gateway to both the server and provider (servicer) instances.

Definition at line 100 of file HttpMessage.d.

References HttpMessage::bridge, and Buffer.

StartLine getStartLine  )  [inline, inherited]
 

Return the HTTP startline from the connection request

Definition at line 157 of file HttpRequest.d.

References HttpRequest::startLine.

Uri getRequestUri  )  [inline, inherited]
 

Return the request Uri as an immutable version ...

Definition at line 168 of file HttpRequest.d.

References Uri::getScheme(), HttpRequest::getServerScheme(), MutableUri::parse(), MutableUri::setScheme(), HttpRequest::startLine, and HttpRequest::uried.

Referenced by HttpRequest::getExplicitUri(), HttpRequest::getHost(), and HttpRequest::getInputParameters().

Uri getExplicitUri  )  [inline, inherited]
 

Ensure the uri has a host present. Return as an immutable

Definition at line 186 of file HttpRequest.d.

References HttpRequest::getHost(), Uri::getHost(), HttpRequest::getRequestUri(), and MutableUri::setHost().

HttpCookies getInputCookies  )  [inline, inherited]
 

Return the set of parsed request cookies

Definition at line 216 of file HttpRequest.d.

References HttpRequest::gulped, and HttpRequest::InvalidState.

HttpHeaders getInputHeaders  )  [inline, inherited]
 

Return the set of parsed input headers

Definition at line 229 of file HttpRequest.d.

References HttpMessage::getHeader(), HttpRequest::gulped, and HttpRequest::InvalidState.

HttpParams getInputParameters  )  [inline, inherited]
 

Return the set of input parameters, from the query string and/or from POST data.

Definition at line 243 of file HttpRequest.d.

References Uri::decode(), IBuffer::get(), HttpHeaders::getInt(), Uri::getQuery(), HttpRequest::getRequestUri(), HttpTokens::isParsed(), HttpRequest::params, HttpParams::parse, and HttpRequest::startLine.

IBuffer getInputBuffer  )  [inline, inherited]
 

Return the buffer attached to the input conduit. This also sets a sentinel indicating we cannot read headers anymore.

Definition at line 287 of file HttpRequest.d.

References HttpRequest::gulped.

void write IWriter  writer  )  [inline, inherited]
 

Write the startline and all input headers to the provider IWriter. This can be used for debug purposes.

Reimplemented from HttpMessage.

Definition at line 301 of file HttpRequest.d.

References HttpRequest::startLine, and IWritable::write().

void readHeaders  )  [inline, inherited]
 

Parse all headers from the input.

Definition at line 313 of file HttpRequest.d.

References HttpMessage::getHeader(), CompositeToken::next(), HttpHeaders::parse, IBuffer::readable(), HttpRequest::startLine, and version.

Referenced by HttpBridge::cross().

char [] getRemoteAddr  )  [inline, inherited]
 

Proxy this request across to the server instance

Definition at line 344 of file HttpRequest.d.

References HttpMessage::getBridge(), HttpMessage::getConduit(), IServer::getRemoteAddress(), and IProviderBridge::getServer().

char [] getServerScheme  )  [inline, inherited]
 

Ask the server instance what protocol it is using

Definition at line 366 of file HttpRequest.d.

References HttpMessage::getBridge(), IServer::getProtocol(), and IProviderBridge::getServer().

Referenced by HttpRequest::getRequestUri().

char [] getEncoding  )  [inline, inherited]
 

Return the encoding from the input headers.

Reimplemented from HttpMessage.

Definition at line 377 of file HttpRequest.d.

References HttpRequest::getMimeType().

char [] getMimeType  )  [inline, inherited]
 

Return the mime-type from the input headers.

Reimplemented from HttpMessage.

Definition at line 389 of file HttpRequest.d.

References HttpRequest::mimed, and HttpMessage::setMimeAndEncoding().

Referenced by HttpRequest::getEncoding().

int getPort  )  [inline, inherited]
 

Return the port number this request was sent to.

Definition at line 405 of file HttpRequest.d.

References HttpMessage::getBridge(), HttpRequest::getHost(), IServer::getPort(), and IProviderBridge::getServer().

char [] getHost  )  [inline, inherited]
 

Get the host name. If we can't get it from the Uri, then we try to extract for the host header. Failing that, we ask the server instance to provide it for us.

Definition at line 425 of file HttpRequest.d.

References Exception, HttpMessage::getBridge(), HttpMessage::getHeader(), IServer::getHost(), Uri::getHost(), Uri::getPort(), HttpRequest::getRequestUri(), IProviderBridge::getServer(), and HttpRequest::host.

Referenced by HttpRequest::getExplicitUri(), and HttpRequest::getPort().


Member Data Documentation

ServletContext context [private]
 

Definition at line 61 of file ServletRequest.d.

char [] servlet [private]
 

Definition at line 62 of file ServletRequest.d.


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:10 2004 for Mango by doxygen 1.3.6