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 Details

    • StatusCode

      public StatusCode()
  • Method Details

    • int2StatusCode

      public static StatusCode int2StatusCode(int code)
    • intValue

      public abstract int intValue()
      Description copied from class: StatusCode
      Returns the numeric code of this status code.
      Specified by:
      intValue in class StatusCode
    • value

      public String value()
      Specified by:
      value in interface LazyValueBytesRenderable
    • reason

      public abstract String reason()
      Description copied from class: StatusCode
      Returns the reason message for this status code.
      Specified by:
      reason in class StatusCode
    • defaultMessage

      public abstract String 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 class StatusCode
    • isSuccess

      public abstract boolean isSuccess()
      Description copied from class: StatusCode
      Returns if the status-code represents success.
      Specified by:
      isSuccess in class StatusCode
    • isFailure

      public abstract boolean isFailure()
      Description copied from class: StatusCode
      Returns if the status-code represents failure.
      Specified by:
      isFailure in class StatusCode
    • isRedirection

      public abstract boolean isRedirection()
      Description copied from class: StatusCode
      Returns if the status-code is a redirection status code.
      Specified by:
      isRedirection in class StatusCode
    • 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 class StatusCode