org.apache.http.message
Class BasicStatusLine

java.lang.Object
  extended by org.apache.http.message.BasicStatusLine
All Implemented Interfaces:
java.lang.Cloneable, StatusLine

public class BasicStatusLine
extends java.lang.Object
implements StatusLine, java.lang.Cloneable

Represents a status line as returned from a HTTP server. See RFC2616 section 6.1. This class is immutable and therefore inherently thread safe.

Since:
4.0
Version:
$Id: BasicStatusLine.java 604625 2007-12-16 14:11:11Z olegk $
Author:
Jeff Dever, Mike Bowler
See Also:
HttpStatus

Constructor Summary
BasicStatusLine(ProtocolVersion version, int statusCode, java.lang.String reasonPhrase)
          Creates a new status line with the given version, status, and reason.
 
Method Summary
 java.lang.Object clone()
           
 ProtocolVersion getProtocolVersion()
           
 java.lang.String getReasonPhrase()
           
 int getStatusCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicStatusLine

public BasicStatusLine(ProtocolVersion version,
                       int statusCode,
                       java.lang.String reasonPhrase)
Creates a new status line with the given version, status, and reason.

Parameters:
version - the protocol version of the response
statusCode - the status code of the response
reasonPhrase - the reason phrase to the status code, or null
Method Detail

getStatusCode

public int getStatusCode()
Specified by:
getStatusCode in interface StatusLine
Returns:
the Status-Code

getProtocolVersion

public ProtocolVersion getProtocolVersion()
Specified by:
getProtocolVersion in interface StatusLine
Returns:
the HTTP-Version

getReasonPhrase

public java.lang.String getReasonPhrase()
Specified by:
getReasonPhrase in interface StatusLine
Returns:
the Reason-Phrase

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.