juju.reattore.protocol.http
Interface HttpMessage

All Known Subinterfaces:
HttpRequest, HttpResponse
All Known Implementing Classes:
BaseHttpRequest, BaseHttpResponse

public interface HttpMessage

Encapsulates a HTTP message.


Method Summary
 ByteSource getBody()
          Gets the message body as a stream.
 java.lang.String getHeader(java.lang.String key)
          Gets a header line.
 java.util.Set getHeaders()
          Gets all headers as a set of Map.Entry items.
 int getNumHeaders()
          Gets the number of parsed headers not including the start line.
 

Method Detail

getNumHeaders

public int getNumHeaders()
Gets the number of parsed headers not including the start line.

Returns:
The number of header lines.

getHeader

public java.lang.String getHeader(java.lang.String key)
Gets a header line.

Parameters:
key - The header to get.
Returns:
The header line as a string or null if it doesn't exist.

getHeaders

public java.util.Set getHeaders()
Gets all headers as a set of Map.Entry items.

Returns:
Set of (name, value) pairs.

getBody

public ByteSource getBody()
Gets the message body as a stream. Will always be present, even if it is of zero length.

Returns:
The request body.


Copyright © 2002-2003 Michael Hope. All Rights Reserved.