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

HttpMessage Class Reference

Inheritance diagram for HttpMessage:

IWritable HttpRequest HttpResponse ServletRequest ServletResponse List of all members.

Public Member Functions

 this (IProviderBridge bridge, IBuffer headerSpace)
void reset ()
void setConduit (IConduit conduit)
char[] getEncoding ()
char[] getMimeType ()
void setContentType (char[] type)
char[] getContentType ()

Protected Member Functions

final IConduit getConduit ()
final IBuffer getBuffer ()
final HttpMutableHeaders getHeader ()
final IProviderBridge getBridge ()
void setMimeAndEncoding (char[] type)
void write (IWriter writer)

Private Attributes

Buffer buffer
IProviderBridge bridge
HttpMutableHeaders headers
char[] encoding
char[] mimeType

Detailed Description

The basic HTTP message. Acts as a base-class for HttpRequest and HttpResponse.

Definition at line 86 of file HttpMessage.d.


Member Function Documentation

this IProviderBridge  bridge,
IBuffer  headerSpace
[inline]
 

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 bridge, Buffer, buffer, and headers.

void reset  )  [inline]
 

Reset this message

Reimplemented in HttpRequest, HttpResponse, ServletRequest, and ServletResponse.

Definition at line 124 of file HttpMessage.d.

References encoding, headers, and mimeType.

void setConduit IConduit  conduit  )  [inline]
 

Set the IConduit used by this message; typically this is the SocketConduit instantiated in response to a connection request.

Given that the HttpMessage remains live (on a per-thread basis), this method will be called for each connection request.

Definition at line 143 of file HttpMessage.d.

References buffer, Buffer::clear(), and Buffer::setConduit().

Referenced by HttpBridge::cross().

final IConduit getConduit  )  [inline, protected]
 

Return the IConduit in use

Definition at line 155 of file HttpMessage.d.

References buffer, and Buffer::getConduit().

Referenced by HttpRequest::getRemoteAddr(), and HttpRequest::getRemoteHost().

final IBuffer getBuffer  )  [inline, protected]
 

Return the buffer bound to our conduit

Definition at line 166 of file HttpMessage.d.

References buffer.

final HttpMutableHeaders getHeader  )  [inline, protected]
 

Return the HttpHeaders wrapper

Definition at line 177 of file HttpMessage.d.

References headers.

Referenced by HttpResponse::commit(), HttpRequest::getHost(), HttpRequest::getInputHeaders(), HttpRequest::readHeaders(), HttpResponse::sendRedirect(), ServletResponse::setContentLength(), and HttpRequest::this().

final IProviderBridge getBridge  )  [inline, protected]
 

Return the bridge used by the this message

Definition at line 188 of file HttpMessage.d.

References bridge.

Referenced by HttpRequest::getHost(), HttpRequest::getPort(), HttpRequest::getRemoteAddr(), HttpRequest::getRemoteHost(), and HttpRequest::getServerScheme().

char [] getEncoding  )  [inline]
 

Return the encoding string

Reimplemented in HttpRequest.

Definition at line 199 of file HttpMessage.d.

References encoding.

char [] getMimeType  )  [inline]
 

Return the mime-type in use

Reimplemented in HttpRequest.

Definition at line 210 of file HttpMessage.d.

References mimeType.

void setContentType char[]  type  )  [inline]
 

Set the content-type header, and parse it for encoding and mime-tpye information.

Reimplemented in ServletResponse.

Definition at line 222 of file HttpMessage.d.

References HttpMutableHeaders::add(), headers, and setMimeAndEncoding().

Referenced by HttpResponse::sendError().

char [] getContentType  )  [inline]
 

Return the content-type from the headers.

Reimplemented in ServletRequest.

Definition at line 234 of file HttpMessage.d.

References HttpHeaders::get(), and headers.

void setMimeAndEncoding char[]  type  )  [inline, protected]
 

Parse a text string looking for encoding and mime information

Definition at line 245 of file HttpMessage.d.

References encoding, and mimeType.

Referenced by HttpRequest::getMimeType(), and setContentType().

void write IWriter  writer  )  [inline, protected]
 

Output our headers to the provided IWriter

Reimplemented from IWritable.

Reimplemented in HttpRequest, and HttpResponse.

Definition at line 275 of file HttpMessage.d.

References headers.


Member Data Documentation

Buffer buffer [private]
 

Definition at line 88 of file HttpMessage.d.

Referenced by getBuffer(), getConduit(), setConduit(), and this().

IProviderBridge bridge [private]
 

Definition at line 89 of file HttpMessage.d.

Referenced by getBridge(), and this().

HttpMutableHeaders headers [private]
 

Definition at line 90 of file HttpMessage.d.

Referenced by getContentType(), getHeader(), reset(), setContentType(), this(), and write().

char [] encoding [private]
 

Definition at line 92 of file HttpMessage.d.

Referenced by getEncoding(), reset(), and setMimeAndEncoding().

char [] mimeType [private]
 

Definition at line 92 of file HttpMessage.d.

Referenced by getMimeType(), reset(), and setMimeAndEncoding().


The documentation for this class was generated from the following file:
Generated on Fri May 27 18:12:01 2005 for Mango by  doxygen 1.4.0