Package org.apache.juneau.http
Class BasicStatusLine
java.lang.Object
org.apache.juneau.http.BasicStatusLine
- All Implemented Interfaces:
StatusLine
-
Constructor Summary
ModifierConstructorDescriptionConstructor.protected
BasicStatusLine
(BasicStatusLine copyFrom) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
Throws anUnsupportedOperationException
if the unmodifiable flag is set on this bean.copy()
Returns a copy of this bean.static BasicStatusLine
create()
Instantiates a new instance of this bean.static BasicStatusLine
Instantiates a new instance of this bean.Returns the locale of this status line.int
Sets the locale used to retrieve reason phrases.Sets the protocol version on the status line.setReasonPhrase
(String value) Sets the reason phrase on the status line.Sets the reason phrase catalog used to retrieve reason phrases.setStatusCode
(int value) Sets the status code on the status line.Specifies whether this bean should be unmodifiable.toString()
-
Constructor Details
-
BasicStatusLine
public BasicStatusLine()Constructor. -
BasicStatusLine
Copy constructor.- Parameters:
copyFrom
- The status line being copied.
-
-
Method Details
-
create
Instantiates a new instance of this bean.- Returns:
- A new bean.
-
create
Instantiates a new instance of this bean.- Parameters:
statusCode
- The initial status code.reasonPhrase
- The initial reason phrase.- Returns:
- A new bean.
-
copy
Returns a copy of this bean.- Returns:
- A copy of this bean.
-
setUnmodifiable
Specifies whether this bean should be unmodifiable.When enabled, attempting to set any properties on this bean will cause an
UnsupportedOperationException
.- Returns:
- This object.
-
assertModifiable
Throws anUnsupportedOperationException
if the unmodifiable flag is set on this bean. -
getProtocolVersion
- Specified by:
getProtocolVersion
in interfaceStatusLine
-
setProtocolVersion
Sets the protocol version on the status line.If not specified,
"HTTP/1.1" will be used.- Parameters:
value
- The new value.- Returns:
- This object.
-
getStatusCode
- Specified by:
getStatusCode
in interfaceStatusLine
-
setStatusCode
Sets the status code on the status line.If not specified,
0 will be used.- Parameters:
value
- The new value.- Returns:
- This object.
-
getReasonPhrase
- Specified by:
getReasonPhrase
in interfaceStatusLine
-
setReasonPhrase
Sets the reason phrase on the status line.If not specified, the reason phrase will be retrieved from the reason phrase catalog using the locale on this bean.
- Parameters:
value
- The new value.- Returns:
- This object.
-
setReasonPhraseCatalog
Sets the reason phrase catalog used to retrieve reason phrases.If not specified, uses
EnglishReasonPhraseCatalog
.- Parameters:
value
- The new value.- Returns:
- This object.
-
getLocale
Returns the locale of this status line.- Returns:
- The locale of this status line.
-
setLocale
Sets the locale used to retrieve reason phrases.If not specified, uses
Locale.getDefault()
.- Parameters:
value
- The new value.- Returns:
- This object.
-
toString
-