public class ErrorReplyHandler extends ReplyingHandler<ErrorReplyHandler>
ReplyingHandler designed to manage error responses.
This handler maintains an error message, which can be set and retrieved through dedicated methods. When generating
a response header, it produces an ErrorHeader instance populated with the current error message.
EMPTYDISCARD| Constructor and Description |
|---|
ErrorReplyHandler() |
| Modifier and Type | Method and Description |
|---|---|
String |
errorMsg()
Retrieves the current error message set for this handler.
|
ErrorReplyHandler |
errorMsg(String errorMsg)
Sets the error message for this handler.
|
ChannelHeader |
responseHeader(ChronicleContext context)
Creates an
ErrorHeader as a response, populated with the current error message. |
asInternalChannel, runbuffered, bufferedsessionName, sessionName, systemContext, systemContextusesSelfDescribingMessageequals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcloseWhenRunEnds, recordHistorysessionName, sessionName, systemContext, systemContext$equals, $fieldInfoMap, $fieldInfos, $hashCode, $toString, className, copyTo, deepCopy, fromFile, fromFile, fromString, fromString, fromString, getField, getLongField, mergeToMap, readMarshallable, reset, setField, setLongField, streamFromFile, streamFromFile, writeMarshallablebinaryLengthLength, writeValueunexpectedFieldpublic String errorMsg()
public ErrorReplyHandler errorMsg(String errorMsg)
errorMsg - The error message to be assigned to this handler.public ChannelHeader responseHeader(ChronicleContext context)
ErrorHeader as a response, populated with the current error message.
Overrides the responseHeader method from the ReplyingHandler superclass.responseHeader in interface ChannelHandlerresponseHeader in class ReplyingHandler<ErrorReplyHandler>context - A ChronicleContext object. Not used in this implementation.ChannelHeader object, specifically an instance of ErrorHeader, populated with the current error message.Copyright © 2023. All rights reserved.