Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.http.message
Class AbstractHttpMessage  view AbstractHttpMessage download AbstractHttpMessage.java

java.lang.Object
  extended byorg.apache.http.message.AbstractHttpMessage
All Implemented Interfaces:
org.apache.http.HttpMessage
Direct Known Subclasses:
BasicHttpRequest, BasicHttpResponse

public abstract class AbstractHttpMessage
extends java.lang.Object
implements org.apache.http.HttpMessage

Basic implementation of an HTTP message that can be modified.

Since:
4.0
Version:
$Revision: 385789 $

Field Summary
private  org.apache.http.impl.HeaderGroup headergroup
           
private  org.apache.http.params.HttpParams params
           
 
Constructor Summary
protected AbstractHttpMessage()
           
 
Method Summary
 void addHeader(org.apache.http.Header header)
          Adds a header to this message.
 boolean containsHeader(java.lang.String name)
          Checks if a certain header is present in this message.
 org.apache.http.Header[] getAllHeaders()
          Returns all the headers of this message.
 org.apache.http.Header getFirstHeader(java.lang.String name)
          Returns the first header with a specified name of this message.
 org.apache.http.Header[] getHeaders(java.lang.String name)
          Returns all the headers with a specified name of this message.
 org.apache.http.Header getLastHeader(java.lang.String name)
          Returns the last header with a specified name of this message.
 org.apache.http.params.HttpParams getParams()
          Returns the parameters effective for this message as set by
 java.util.Iterator headerIterator()
          Returns an iterator of all the headers.
 void removeHeader(org.apache.http.Header header)
          Removes a header from this message.
 void removeHeaders(java.lang.String name)
          Removes all headers with a certain name from this message.
 void setHeader(org.apache.http.Header header)
          Adds a header to this message.
 void setParams(org.apache.http.params.HttpParams params)
          Provides parameters to be used for the processing of this message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.http.HttpMessage
getHttpVersion
 

Field Detail

headergroup

private final org.apache.http.impl.HeaderGroup headergroup

params

private org.apache.http.params.HttpParams params
Constructor Detail

AbstractHttpMessage

protected AbstractHttpMessage()
Method Detail

containsHeader

public boolean containsHeader(java.lang.String name)
Description copied from interface: org.apache.http.HttpMessage
Checks if a certain header is present in this message. Header values are ignored.

Specified by:
containsHeader in interface org.apache.http.HttpMessage

getHeaders

public org.apache.http.Header[] getHeaders(java.lang.String name)
Description copied from interface: org.apache.http.HttpMessage
Returns all the headers with a specified name of this message. Header values are ignored. Headers are orderd in the sequence they will be sent over a connection.

Specified by:
getHeaders in interface org.apache.http.HttpMessage

getFirstHeader

public org.apache.http.Header getFirstHeader(java.lang.String name)
Description copied from interface: org.apache.http.HttpMessage
Returns the first header with a specified name of this message. Header values are ignored. If there is more than one matching header in the message the first element of

Specified by:
getFirstHeader in interface org.apache.http.HttpMessage

getLastHeader

public org.apache.http.Header getLastHeader(java.lang.String name)
Description copied from interface: org.apache.http.HttpMessage
Returns the last header with a specified name of this message. Header values are ignored. If there is more than one matching header in the message the last element of

Specified by:
getLastHeader in interface org.apache.http.HttpMessage

getAllHeaders

public org.apache.http.Header[] getAllHeaders()
Description copied from interface: org.apache.http.HttpMessage
Returns all the headers of this message. Headers are orderd in the sequence they will be sent over a connection.

Specified by:
getAllHeaders in interface org.apache.http.HttpMessage

addHeader

public void addHeader(org.apache.http.Header header)
Description copied from interface: org.apache.http.HttpMessage
Adds a header to this message. The header will be appended to the end of the list.

Specified by:
addHeader in interface org.apache.http.HttpMessage

setHeader

public void setHeader(org.apache.http.Header header)
Description copied from interface: org.apache.http.HttpMessage
Adds a header to this message. The new header will be appended to the end of the list. Existing headers with the same name will be removed.

Specified by:
setHeader in interface org.apache.http.HttpMessage

removeHeader

public void removeHeader(org.apache.http.Header header)
Description copied from interface: org.apache.http.HttpMessage
Removes a header from this message.

Specified by:
removeHeader in interface org.apache.http.HttpMessage

removeHeaders

public void removeHeaders(java.lang.String name)
Description copied from interface: org.apache.http.HttpMessage
Removes all headers with a certain name from this message.

Specified by:
removeHeaders in interface org.apache.http.HttpMessage

headerIterator

public java.util.Iterator headerIterator()
Description copied from interface: org.apache.http.HttpMessage
Returns an iterator of all the headers.

Specified by:
headerIterator in interface org.apache.http.HttpMessage

getParams

public org.apache.http.params.HttpParams getParams()
Description copied from interface: org.apache.http.HttpMessage
Returns the parameters effective for this message as set by

Specified by:
getParams in interface org.apache.http.HttpMessage

setParams

public void setParams(org.apache.http.params.HttpParams params)
Description copied from interface: org.apache.http.HttpMessage
Provides parameters to be used for the processing of this message.

Specified by:
setParams in interface org.apache.http.HttpMessage