Class HttpStatusLine
- java.lang.Object
-
- com.microsoft.azure.proton.transport.proxy.HttpStatusLine
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpStatusLinecreate(String line)Parses the providedstatusLineinto an HTTP status line.StringgetProtocolVersion()Gets the HTTP protocol version.StringgetReason()Gets the textual representation for the HTTP status code.intgetStatusCode()Gets the HTTP status code.
-
-
-
Method Detail
-
create
public static HttpStatusLine create(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:
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 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 String getReason()
Gets the textual representation for the HTTP status code.- Returns:
- The textual representation for the HTTP status code.
-
-