Class StatusCode

java.lang.Object
akka.http.javadsl.model.StatusCode
Direct Known Subclasses:
StatusCode

public abstract class StatusCode extends Object
Represents an Http status-code and message. See StatusCodes for the set of predefined status-codes.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract 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.
    abstract int
    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
    Returns the reason message for this status code.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StatusCode

      public StatusCode()
  • Method Details

    • intValue

      public abstract int intValue()
      Returns the numeric code of this status code.
    • reason

      public abstract String reason()
      Returns the reason message for this status code.
    • defaultMessage

      public abstract String defaultMessage()
      Returns the default message to be included as the content of an Http response with this status-code.
    • isSuccess

      public abstract boolean isSuccess()
      Returns if the status-code represents success.
    • isFailure

      public abstract boolean isFailure()
      Returns if the status-code represents failure.
    • allowsEntity

      public abstract boolean allowsEntity()
      Returns if a response with this status-code is allowed to be accompanied with a non-empty entity.
    • isRedirection

      public abstract boolean isRedirection()
      Returns if the status-code is a redirection status code.