Class StatusCode
java.lang.Object
org.apache.pekko.http.javadsl.model.StatusCode
org.apache.pekko.http.scaladsl.model.StatusCode
- All Implemented Interfaces:
- LazyValueBytesRenderable,- Renderable
- Direct Known Subclasses:
- StatusCodes.CustomStatusCode,- StatusCodes.HttpFailure,- StatusCodes.HttpSuccess
The result status code of an HTTP response.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract booleanReturns if a response with this status-code is allowed to be accompanied with a non-empty entity.abstract StringReturns the default message to be included as the content of an Http response with this status-code.static StatusCodeint2StatusCode(int code) abstract intintValue()Returns the numeric code of this status code.abstract booleanReturns if the status-code represents failure.abstract booleanReturns if the status-code is a redirection status code.abstract booleanReturns if the status-code represents success.abstract Stringreason()Returns the reason message for this status code.value()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.http.impl.util.LazyValueBytesRenderablerender, toString, valueBytes
- 
Constructor Details- 
StatusCodepublic StatusCode()
 
- 
- 
Method Details- 
int2StatusCode
- 
intValuepublic abstract int intValue()Description copied from class:StatusCodeReturns the numeric code of this status code.- Specified by:
- intValuein class- StatusCode
 
- 
value- Specified by:
- valuein interface- LazyValueBytesRenderable
 
- 
reasonDescription copied from class:StatusCodeReturns the reason message for this status code.- Specified by:
- reasonin class- StatusCode
 
- 
defaultMessageDescription copied from class:StatusCodeReturns the default message to be included as the content of an Http response with this status-code.- Specified by:
- defaultMessagein class- StatusCode
 
- 
isSuccesspublic abstract boolean isSuccess()Description copied from class:StatusCodeReturns if the status-code represents success.- Specified by:
- isSuccessin class- StatusCode
 
- 
isFailurepublic abstract boolean isFailure()Description copied from class:StatusCodeReturns if the status-code represents failure.- Specified by:
- isFailurein class- StatusCode
 
- 
isRedirectionpublic abstract boolean isRedirection()Description copied from class:StatusCodeReturns if the status-code is a redirection status code.- Specified by:
- isRedirectionin class- StatusCode
 
- 
allowsEntitypublic abstract boolean allowsEntity()Description copied from class:StatusCodeReturns if a response with this status-code is allowed to be accompanied with a non-empty entity.- Specified by:
- allowsEntityin class- StatusCode
 
 
-