|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.noderunner.http.StatusLine
public class StatusLine
This is a immutable implementation of the StatusLine interface.
| Field Summary | |
|---|---|
static StatusLine |
HTTP11_100
Basic Continue message from an HTTP/1.1 server. |
static StatusLine |
HTTP11_200_OK
Basic OK message from an HTTP/1.1 server. |
static StatusLine |
HTTP11_204
Basic 204 message from an HTTP/1.1 server. |
static StatusLine |
HTTP11_301
Basic 301 message from an HTTP/1.1 server. |
static StatusLine |
HTTP11_404
Basic 404 message from an HTTP/1.1 server. |
| Constructor Summary | |
|---|---|
StatusLine(HttpVersion version,
int statusCode,
java.lang.String reasonPhrase)
Constructs this object using Status-Line |
|
StatusLine(int statusCode)
Constructs this object using a status code, HTTP version 1.1, and blank reason. |
|
StatusLine(int statusCode,
java.lang.String statusReason)
Constructs this object using Status-Line |
|
StatusLine(java.lang.String line)
Constructs a StatusLineImpl using an unparsed request
line. |
|
| Method Summary | |
|---|---|
HttpVersion |
getHttpVersion()
Returns the status' HTTP version. |
java.lang.String |
getReasonPhrase()
Returns the status reason phrase. |
int |
getStatusCode()
Returns the three-digit status code. |
static StatusLine |
parseStatusLine(java.lang.String line)
Returns either HTTP11_200_OK or a newly
constructed StatusLine object. |
java.lang.String |
toString()
Returns this StatusLine as: |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final StatusLine HTTP11_100
public static final StatusLine HTTP11_200_OK
public static final StatusLine HTTP11_204
public static final StatusLine HTTP11_301
public static final StatusLine HTTP11_404
| Constructor Detail |
|---|
public StatusLine(int statusCode)
statusCode - must be in the range 0 to 999
public StatusLine(HttpVersion version,
int statusCode,
java.lang.String reasonPhrase)
Status-Line parts.
- Parameters:
version - may not be nullstatusCode - must be in the range 0 to 999reasonPhrase - may not be null
public StatusLine(java.lang.String line)
throws HttpException
StatusLineImpl using an unparsed request
line. This string should not end in CRLF.
HttpException - if an invalid HTTP Request-Line was used
in initialization
public StatusLine(int statusCode,
java.lang.String statusReason)
Status-Line parts.
- Parameters:
statusCode - must be in the range 0 to 999reasonPhrase - may not be null
| Method Detail |
|---|
public static StatusLine parseStatusLine(java.lang.String line)
throws HttpException
HTTP11_200_OK or a newly
constructed StatusLine object.
HttpExceptionpublic HttpVersion getHttpVersion()
public int getStatusCode()
public java.lang.String getReasonPhrase()
public java.lang.String toString()
StatusLine as:
getHttpVersion() + ' ' + getStatusCode() + ' ' + getReasonPhrase()Note: Does not include
CRLF.
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||