Package io.aeron.command
Class PublicationErrorFrameFlyweight
java.lang.Object
io.aeron.command.PublicationErrorFrameFlyweight
Control message flyweight error frames received by a publication to be reported to the client.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Publication Registration Id | | | +---------------------------------------------------------------+ | Destination Registration Id | | | +---------------------------------------------------------------+ | Session ID | +---------------------------------------------------------------+ | Stream ID | +---------------------------------------------------------------+ | Receiver ID | | | +---------------------------------------------------------------+ | Group Tag | | | +-------------------------------+-------------------------------+ | Address Type | UDP Port | +-------------------------------+-------------------------------+ | IPv4 or IPv6 Address padded out to 16 bytes | | | | | | | +---------------------------------------------------------------+ | Error Code | +---------------------------------------------------------------+ | Error Message Length | +---------------------------------------------------------------+ | Error Message ... ... | +---------------------------------------------------------------+
- Since:
- 1.47.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintappendMessage(Appendable appendable) Append the error message to an appendable without allocation.longReturn registration id of the destination that received the error frame.destinationRegistrationId(long registrationId) Set the registration ID of the destination that received the error frame.Error code for the command.Set the error code for the command.intError code value for the command.Error message associated with the error.errorMessage(String message) Set the error message.longgroupTag()Get the group tag field.groupTag(long groupTag) Set the group tag field.intlength()Length of the error response in bytes.longGet the receiver id field.receiverId(long receiverId) Set receiver id field.longReturn registration ID of the publication that received the error frame.registrationId(long registrationId) Set the registration ID of the publication that received the error frame.intGet the session id field.sessionId(int sessionId) Set session id field.Get the source address of this error frame.sourceAddress(InetSocketAddress sourceAddress) Set the source address for the error frame.intstreamId()Get the stream id field.streamId(int streamId) Set the stream id field.wrap(MutableDirectBuffer buffer, int offset) Wrap the buffer at a given offset for updates.
-
Constructor Details
-
PublicationErrorFrameFlyweight
public PublicationErrorFrameFlyweight()
-
-
Method Details
-
wrap
Wrap the buffer at a given offset for updates.- Parameters:
buffer- to wrap.offset- at which the message begins.- Returns:
- this for a fluent API.
-
registrationId
public long registrationId()Return registration ID of the publication that received the error frame.- Returns:
- registration ID of the publication.
-
registrationId
Set the registration ID of the publication that received the error frame.- Parameters:
registrationId- of the publication.- Returns:
- this for a fluent API.
-
destinationRegistrationId
public long destinationRegistrationId()Return registration id of the destination that received the error frame. This will only be set if the publication is using manual MDC.- Returns:
- registration ID of the publication or
Aeron.NULL_VALUE.
-
destinationRegistrationId
Set the registration ID of the destination that received the error frame. UseAeron.NULL_VALUEif not set.- Parameters:
registrationId- of the destination.- Returns:
- this for a fluent API.
-
streamId
public int streamId()Get the stream id field.- Returns:
- stream id field.
-
streamId
Set the stream id field.- Parameters:
streamId- field value.- Returns:
- this for a fluent API.
-
sessionId
public int sessionId()Get the session id field.- Returns:
- session id field.
-
sessionId
Set session id field.- Parameters:
sessionId- field value.- Returns:
- this for a fluent API.
-
receiverId
public long receiverId()Get the receiver id field.- Returns:
- get the receiver id field.
-
receiverId
Set receiver id field.- Parameters:
receiverId- field value.- Returns:
- this for a fluent API.
-
groupTag
public long groupTag()Get the group tag field.- Returns:
- the group tag field.
-
groupTag
Set the group tag field.- Parameters:
groupTag- the group tag value.- Returns:
- this for a fluent API.
-
sourceAddress
Set the source address for the error frame. Store the type (IPv4 or IPv6), port and address as bytes.- Parameters:
sourceAddress- of the error frame.- Returns:
- this for a fluent API
-
sourceAddress
Get the source address of this error frame.- Returns:
- source address of the error frame.
-
errorCode
Error code for the command.- Returns:
- error code for the command.
-
errorCodeValue
public int errorCodeValue()Error code value for the command.- Returns:
- error code value for the command.
-
errorCode
Set the error code for the command.- Parameters:
code- for the error.- Returns:
- this for a fluent API.
-
errorMessage
Error message associated with the error.- Returns:
- error message.
-
appendMessage
Append the error message to an appendable without allocation.- Parameters:
appendable- to append error message to.- Returns:
- number bytes copied.
-
errorMessage
Set the error message.- Parameters:
message- to associate with the error.- Returns:
- this for a fluent API.
-
length
public int length()Length of the error response in bytes.- Returns:
- length of the error response in bytes.
-