Package akka.http.scaladsl.model
Class StatusCode
java.lang.Object
akka.http.javadsl.model.StatusCode
akka.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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
Returns if a response with this status-code is allowed to be accompanied with a non-empty entity.abstract String
Returns the default message to be included as the content of an Http response with this status-code.static StatusCode
int2StatusCode
(int code) abstract int
intValue()
Returns the numeric code of this status code.abstract boolean
Returns if the status-code represents failure.abstract boolean
Returns if the status-code is a redirection status code.abstract boolean
Returns if the status-code represents success.abstract String
reason()
Returns the reason message for this status code.value()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface akka.http.impl.util.LazyValueBytesRenderable
render, toString, valueBytes
-
Constructor Details
-
StatusCode
public StatusCode()
-
-
Method Details
-
int2StatusCode
-
intValue
public abstract int intValue()Description copied from class:StatusCode
Returns the numeric code of this status code.- Specified by:
intValue
in classStatusCode
-
value
- Specified by:
value
in interfaceLazyValueBytesRenderable
-
reason
Description copied from class:StatusCode
Returns the reason message for this status code.- Specified by:
reason
in classStatusCode
-
defaultMessage
Description copied from class:StatusCode
Returns the default message to be included as the content of an Http response with this status-code.- Specified by:
defaultMessage
in classStatusCode
-
isSuccess
public abstract boolean isSuccess()Description copied from class:StatusCode
Returns if the status-code represents success.- Specified by:
isSuccess
in classStatusCode
-
isFailure
public abstract boolean isFailure()Description copied from class:StatusCode
Returns if the status-code represents failure.- Specified by:
isFailure
in classStatusCode
-
isRedirection
public abstract boolean isRedirection()Description copied from class:StatusCode
Returns if the status-code is a redirection status code.- Specified by:
isRedirection
in classStatusCode
-
allowsEntity
public abstract boolean allowsEntity()Description copied from class:StatusCode
Returns if a response with this status-code is allowed to be accompanied with a non-empty entity.- Specified by:
allowsEntity
in classStatusCode
-