Class ErrorResponse (0.5.1)

public class ErrorResponse extends WireOutput

Sends error information back to client.

Inheritance

java.lang.Object > WireOutput > ErrorResponse

Constructors

ErrorResponse(DataOutputStream output, Exception e, ErrorResponse.State errorState)

public ErrorResponse(DataOutputStream output, Exception e, ErrorResponse.State errorState)
Parameters
NameDescription
outputDataOutputStream
eException
errorStateErrorResponse.State

ErrorResponse(DataOutputStream output, Exception e, ErrorResponse.State errorState, ErrorResponse.Severity severity)

public ErrorResponse(DataOutputStream output, Exception e, ErrorResponse.State errorState, ErrorResponse.Severity severity)
Parameters
NameDescription
outputDataOutputStream
eException
errorStateErrorResponse.State
severityErrorResponse.Severity

Methods

getIdentifier()

public byte getIdentifier()

Override this to specify the byte which represents the protocol for the specific message. Used for logging and by send.

Returns
TypeDescription
byte
Overrides

getMessageName()

protected String getMessageName()

Used for logging.

Returns
TypeDescription
String
Overrides

getPayloadString()

protected String getPayloadString()

Used for logging.

Returns
TypeDescription
String
Overrides

sendPayload()

protected void sendPayload()

Override this method to include post-processing and metadata in the sending process. Template method for send.

Overrides Exceptions
TypeDescription
IOException