org.apache.http.message
Class BasicStatusLine

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

public class BasicStatusLine
extends java.lang.Object
implements StatusLine

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 573864 2007-09-08 15:53:25Z rolandw $
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
 ProtocolVersion getProtocolVersion()
           
 java.lang.String getReasonPhrase()
           
 int getStatusCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, 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


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