Class MessageCodec
java.lang.Object
dev.moonbridge.messaging.protocol.MessageCodec
Binary message frames shared by proxy-core and Java 8 backend clients.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDecoded inbound message with its hop-local acknowledgement operation and deadline.static final classDecoded response. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final longstatic final intstatic final longstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageCodec.IncomingMessagedecodeMessage(byte[] frame) static MessageCodec.ResponsedecodeResponse(byte[] frame) static byte[]error(long operationId, MessagingException.Code code, String detail) static byte[]Returns a message frame body (the transport adds the outer 4-byte length prefix).static byte[]published(long operationId, PublishResult result) static byte[]static byte[]sendResult(long operationId, SendResult result)
-
Field Details
-
MESSAGE
public static final int MESSAGE- See Also:
-
RESPONSE
public static final int RESPONSE- See Also:
-
MAX_FRAME_BYTES
public static final int MAX_FRAME_BYTES- See Also:
-
MAX_NODE_BYTES
public static final int MAX_NODE_BYTES- See Also:
-
MAX_PUBLISH_RESULTS
public static final int MAX_PUBLISH_RESULTS- See Also:
-
MIN_TIMEOUT_MILLIS
public static final long MIN_TIMEOUT_MILLIS- See Also:
-
MAX_TIMEOUT_MILLIS
public static final long MAX_TIMEOUT_MILLIS- See Also:
-
-
Method Details
-
message
public static byte[] message(long operationId, long timeoutMillis, Message message) throws IOException Returns a message frame body (the transport adds the outer 4-byte length prefix).- Throws:
IOException
-
decodeMessage
- Throws:
IOException
-
sendResult
- Throws:
IOException
-
reply
- Throws:
IOException
-
published
- Throws:
IOException
-
error
public static byte[] error(long operationId, MessagingException.Code code, String detail) throws IOException - Throws:
IOException
-
decodeResponse
- Throws:
IOException
-