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 71 of file ServletRequest.d.

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

Definition at line 81 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 91 of file ServletRequest.d.

Uri getUri  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 101 of file ServletRequest.d.

Referenced by ServletProvider::service().

ServletContext getContext  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 110 of file ServletRequest.d.

HttpParams getParameters  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 119 of file ServletRequest.d.

HttpHeaders getHeaders  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 128 of file ServletRequest.d.

HttpCookies getCookies  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 137 of file ServletRequest.d.

char [] getCharacterEncoding  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 146 of file ServletRequest.d.

int getContentLength  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 155 of file ServletRequest.d.

char [] getContentType  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 164 of file ServletRequest.d.

char [] getProtocol  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 173 of file ServletRequest.d.

char [] getMethod  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 182 of file ServletRequest.d.

char [] getServerName  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 191 of file ServletRequest.d.

int getServerPort  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 200 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 209 of file ServletRequest.d.

char [] getRemoteAddress  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 218 of file ServletRequest.d.

char [] getRemoteHost  )  [inline]
 

Proxy this request across to the server instance

Reimplemented from HttpRequest.

Definition at line 227 of file ServletRequest.d.

char [] getPathInfo  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 236 of file ServletRequest.d.

References ServletContext::getName().

char [] getContextPath  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 247 of file ServletRequest.d.

References ServletContext::getName().

char [] getServletPath  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 256 of file ServletRequest.d.

this  )  [inline, static, inherited]
 

Setup exceptions and so on

Definition at line 94 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 103 of file HttpMessage.d.

References HttpMessage::bridge, and Buffer.

StartLine getStartLine  )  [inline, inherited]
 

Return the HTTP startline from the connection request

Definition at line 160 of file HttpRequest.d.

References HttpRequest::startLine.

Uri getRequestUri  )  [inline, inherited]
 

Return the request Uri as an immutable version ...

Definition at line 171 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 189 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 219 of file HttpRequest.d.

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

HttpHeaders getInputHeaders  )  [inline, inherited]
 

Return the set of parsed input headers

Definition at line 232 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 246 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 290 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 304 of file HttpRequest.d.

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

void readHeaders  )  [inline, inherited]
 

Parse all headers from the input.

Definition at line 316 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 347 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 369 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 380 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 392 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 408 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 428 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 64 of file ServletRequest.d.

char [] servlet [private]
 

Definition at line 65 of file ServletRequest.d.


The documentation for this class was generated from the following file:
Generated on Tue Jan 25 21:18:40 2005 for Mango by doxygen 1.3.6