Class HttpProtocolException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.jdrupes.httpcodec.ProtocolException
org.jdrupes.httpcodec.protocols.http.HttpProtocolException
- All Implemented Interfaces:
Serializable
Represents a violation of the HTTP protocol.
This kind of exception is thrown by the HTTP codecs when a problem is detected while encoding or decoding a message.
- See Also:
-
Constructor Summary
ConstructorDescriptionHttpProtocolException
(HttpConstants.HttpProtocol httpProtocol, int statusCode, String reasonPhrase) Creates a new exception with the given values.HttpProtocolException
(HttpConstants.HttpProtocol httpProtocol, HttpConstants.HttpStatus status) Creates a new exception with the standard reason phrase. -
Method Summary
Modifier and TypeMethodDescriptionReturns the HTTP version.Returns the reason phrase.int
Returns the status code.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpProtocolException
public HttpProtocolException(HttpConstants.HttpProtocol httpProtocol, int statusCode, String reasonPhrase) Creates a new exception with the given values.- Parameters:
httpProtocol
- the HTTP versionstatusCode
- the status codereasonPhrase
- the reason phrase
-
HttpProtocolException
public HttpProtocolException(HttpConstants.HttpProtocol httpProtocol, HttpConstants.HttpStatus status) Creates a new exception with the standard reason phrase.- Parameters:
httpProtocol
- the HTTP versionstatus
- the status
-
-
Method Details
-
httpVersion
Returns the HTTP version.- Returns:
- the HTTP Version
-
statusCode
Returns the status code.- Returns:
- the statusCode
-
reasonPhrase
Returns the reason phrase.- Returns:
- the reasonPhrase
-