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
public abstract class StatusCode extends StatusCode implements LazyValueBytesRenderable
The result status code of an HTTP response.
-
-
Constructor Summary
Constructors Constructor Description StatusCode()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanallowsEntity()Returns if a response with this status-code is allowed to be accompanied with a non-empty entity.abstract java.lang.StringdefaultMessage()Returns 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 booleanisFailure()Returns if the status-code represents failure.abstract booleanisRedirection()Returns if the status-code is a redirection status code.abstract booleanisSuccess()Returns if the status-code represents success.abstract java.lang.Stringreason()Returns the reason message for this status code.java.lang.Stringvalue()-
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
-
-
-
-
Method Detail
-
int2StatusCode
public static StatusCode int2StatusCode(int code)
-
intValue
public abstract int intValue()
Description copied from class:StatusCodeReturns the numeric code of this status code.- Specified by:
intValuein classStatusCode
-
value
public java.lang.String value()
- Specified by:
valuein interfaceLazyValueBytesRenderable
-
reason
public abstract java.lang.String reason()
Description copied from class:StatusCodeReturns the reason message for this status code.- Specified by:
reasonin classStatusCode
-
defaultMessage
public abstract java.lang.String defaultMessage()
Description copied from class:StatusCodeReturns the default message to be included as the content of an Http response with this status-code.- Specified by:
defaultMessagein classStatusCode
-
isSuccess
public abstract boolean isSuccess()
Description copied from class:StatusCodeReturns if the status-code represents success.- Specified by:
isSuccessin classStatusCode
-
isFailure
public abstract boolean isFailure()
Description copied from class:StatusCodeReturns if the status-code represents failure.- Specified by:
isFailurein classStatusCode
-
isRedirection
public abstract boolean isRedirection()
Description copied from class:StatusCodeReturns if the status-code is a redirection status code.- Specified by:
isRedirectionin classStatusCode
-
allowsEntity
public 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 classStatusCode
-
-