Class ManualHttpFailureException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.github.fmjsjx.libnetty.http.exception.HttpRuntimeException
-
- com.github.fmjsjx.libnetty.http.server.exception.HttpFailureException
-
- com.github.fmjsjx.libnetty.http.server.exception.ManualHttpFailureException
-
- All Implemented Interfaces:
java.io.Serializable
public class ManualHttpFailureException extends HttpFailureException
AnHttpFailureExceptionwith manual response contents.- Since:
- 1.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ManualHttpFailureException(io.netty.handler.codec.http.HttpResponseStatus status, java.lang.String content, java.lang.CharSequence contentType, java.lang.String message)Constructs a newManualHttpFailureExceptionwith the specified status, content, contentType and message.ManualHttpFailureException(io.netty.handler.codec.http.HttpResponseStatus status, java.lang.String content, java.lang.CharSequence contentType, java.lang.Throwable cause)Constructs a newManualHttpFailureExceptionwith the specified status, content, contentType and cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringcontent()Returns the response content string.java.lang.CharSequencecontentType()Returns the response content type.java.lang.StringgetLocalizedMessage()io.netty.handler.codec.http.HttpResponseStatusstatus()Returns the failure status.
-
-
-
Constructor Detail
-
ManualHttpFailureException
public ManualHttpFailureException(io.netty.handler.codec.http.HttpResponseStatus status, java.lang.String content, java.lang.CharSequence contentType, java.lang.Throwable cause)Constructs a newManualHttpFailureExceptionwith the specified status, content, contentType and cause.- Parameters:
status- the failure statuscontent- the response content stringcontentType- the response content typecause- the cause
-
ManualHttpFailureException
public ManualHttpFailureException(io.netty.handler.codec.http.HttpResponseStatus status, java.lang.String content, java.lang.CharSequence contentType, java.lang.String message)Constructs a newManualHttpFailureExceptionwith the specified status, content, contentType and message.- Parameters:
status- the failure statuscontent- the response content stringcontentType- the response content typemessage- the detail message
-
-
Method Detail
-
status
public io.netty.handler.codec.http.HttpResponseStatus status()
Description copied from class:HttpFailureExceptionReturns the failure status.- Specified by:
statusin classHttpFailureException- Returns:
- the failure status
-
getLocalizedMessage
public java.lang.String getLocalizedMessage()
- Overrides:
getLocalizedMessagein classHttpFailureException
-
content
public java.lang.String content()
Returns the response content string.- Returns:
- the response content string
-
contentType
public java.lang.CharSequence contentType()
Returns the response content type.- Returns:
- the response content type
-
-