Class StatusLine

  • All Implemented Interfaces:
    java.io.Serializable

    @Contract(threading=IMMUTABLE)
    public final class StatusLine
    extends java.lang.Object
    implements java.io.Serializable
    HTTP/1.1 status line.
    Since:
    4.0
    See Also:
    Serialized Form
    • Field Detail

      • protoVersion

        private final ProtocolVersion protoVersion
        The protocol version.
      • statusCode

        private final int statusCode
        The status code.
      • reasonPhrase

        private final java.lang.String reasonPhrase
        The reason phrase.
    • Constructor Detail

      • StatusLine

        public StatusLine​(ProtocolVersion version,
                          int statusCode,
                          java.lang.String reasonPhrase)
        Creates a new status line with the given version, status, and reason.
        Parameters:
        version - the protocol version of the response
        statusCode - the status code of the response
        reasonPhrase - the reason phrase to the status code, or null