Class HttpStatusLine
- java.lang.Object
-
- com.microsoft.azure.proton.transport.proxy.HttpStatusLine
-
public final class HttpStatusLine extends java.lang.ObjectThe first line in an HTTP 1.0/1.1 response. Consists of the HTTP protocol version, status code, and a reason phrase for the HTTP response.- See Also:
- RFC 2616
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpStatusLinecreate(java.lang.String line)Parses the providedstatusLineinto an HTTP status line.java.lang.StringgetProtocolVersion()Gets the HTTP protocol version.java.lang.StringgetReason()Gets the textual representation for the HTTP status code.intgetStatusCode()Gets the HTTP status code.
-
-
-
Method Detail
-
create
public static HttpStatusLine create(java.lang.String line)
Parses the providedstatusLineinto an HTTP status line.- Parameters:
line- Line to parse into an HTTP status line.- Returns:
- A new instance of
HttpStatusLinerepresenting the givenstatusLine. - Throws:
java.lang.IllegalArgumentException- iflineis not the correct format of an HTTP status line. If it does not have a protocol version, status code, or reason component. Or, if the HTTP protocol version cannot be parsed.
-
getProtocolVersion
public java.lang.String getProtocolVersion()
Gets the HTTP protocol version.- Returns:
- The HTTP protocol version.
-
getStatusCode
public int getStatusCode()
Gets the HTTP status code.- Returns:
- The HTTP status code.
-
getReason
public java.lang.String getReason()
Gets the textual representation for the HTTP status code.- Returns:
- The textual representation for the HTTP status code.
-
-