Package org.apache.http.message
Class BasicStatusLine
java.lang.Object
org.apache.http.message.BasicStatusLine
- All Implemented Interfaces:
Serializable
,Cloneable
,StatusLine
@Contract(threading=IMMUTABLE)
public class BasicStatusLine
extends Object
implements StatusLine, Cloneable, Serializable
Basic implementation of
StatusLine
- Since:
- 4.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ProtocolVersion
The protocol version.private final String
The reason phrase.private static final long
private final int
The status code. -
Constructor Summary
ConstructorsConstructorDescriptionBasicStatusLine
(ProtocolVersion version, int statusCode, String reasonPhrase) Creates a new status line with the given version, status, and reason. -
Method Summary
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
protoVersion
The protocol version. -
statusCode
private final int statusCodeThe status code. -
reasonPhrase
The reason phrase.
-
-
Constructor Details
-
BasicStatusLine
Creates a new status line with the given version, status, and reason.- Parameters:
version
- the protocol version of the responsestatusCode
- the status code of the responsereasonPhrase
- the reason phrase to the status code, ornull
-
-
Method Details
-
getStatusCode
public int getStatusCode()- Specified by:
getStatusCode
in interfaceStatusLine
-
getProtocolVersion
- Specified by:
getProtocolVersion
in interfaceStatusLine
-
getReasonPhrase
- Specified by:
getReasonPhrase
in interfaceStatusLine
-
toString
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-