Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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

static 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.

References context.

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 context, and ServletContext::getName().

char [] getContextPath  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 247 of file ServletRequest.d.

References context, and ServletContext::getName().

char [] getServletPath  )  [inline]
 

Reimplemented from IServletRequest.

Definition at line 256 of file ServletRequest.d.

References servlet.

static this  )  [inline, static, inherited]
 

Setup exceptions and so on

Definition at line 96 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, Buffer, HttpMessage::buffer, and HttpMessage::headers.

StartLine getStartLine  )  [inline, inherited]
 

Return the HTTP startline from the connection request

Definition at line 162 of file HttpRequest.d.

References HttpRequest::startLine.

Uri getRequestUri  )  [inline, inherited]
 

Return the request Uri as an immutable version ...

Definition at line 173 of file HttpRequest.d.

References Uri::getScheme(), HttpRequest::getServerScheme(), MutableUri::parse(), MutableUri::setScheme(), HttpRequest::startLine, HttpRequest::uri, 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 191 of file HttpRequest.d.

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

HttpCookies getInputCookies  )  [inline, inherited]
 

Return the set of parsed request cookies

Definition at line 221 of file HttpRequest.d.

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

HttpHeaders getInputHeaders  )  [inline, inherited]
 

Return the set of parsed input headers

Definition at line 234 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 248 of file HttpRequest.d.

References Uri::decode(), IBuffer::get(), HttpHeaders::getInt(), Uri::getQuery(), HttpRequest::getRequestUri(), HttpRequest::params, HttpRequest::startLine, Text, and HttpRequest::uri.

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 292 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 306 of file HttpRequest.d.

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

void readHeaders  )  [inline, inherited]
 

Parse all headers from the input.

Definition at line 318 of file HttpRequest.d.

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

Referenced by HttpBridge::cross().

char [] getRemoteAddr  )  [inline, inherited]
 

Proxy this request across to the server instance

Definition at line 349 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 371 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 382 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 394 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 410 of file HttpRequest.d.

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

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 430 of file HttpRequest.d.

References Atoi, HttpMessage::getBridge(), HttpMessage::getHeader(), IServer::getHost(), Uri::getHost(), Uri::getPort(), HttpRequest::getRequestUri(), IProviderBridge::getServer(), HttpRequest::host, Uri::InvalidPort, HttpRequest::port, Text, and HttpRequest::uri.

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


Member Data Documentation

ServletContext context [private]
 

Definition at line 64 of file ServletRequest.d.

Referenced by getContext(), getContextPath(), and getPathInfo().

char [] servlet [private]
 

Definition at line 65 of file ServletRequest.d.

Referenced by getServletPath().


The documentation for this class was generated from the following file:
Generated on Sat Dec 24 17:28:42 2005 for Mango by  doxygen 1.4.0