Class CAIJ1Messages
java.lang.Object
com.io7m.cardant.protocol.inventory.json.CAIJ1Messages
- All Implemented Interfaces:
CAProtocolMessagesType<CAIMessageType>, com.io7m.repetoir.core.RPServiceType
public final class CAIJ1Messages
extends Object
implements CAProtocolMessagesType<CAIMessageType>, com.io7m.repetoir.core.RPServiceType
The protocol messages for Inventory JSON.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CONTENT_TYPE
-
CONTENT_TYPE_FOR_SEQUENCE
-
-
Constructor Details
-
CAIJ1Messages
public CAIJ1Messages()The protocol messages for Inventory v1 JSON.
-
-
Method Details
-
contentType
- Returns:
- The content type
-
contentTypeForSequence
- Returns:
- The content type for sequences
-
protocolId
- Returns:
- The protocol identifier
-
parse
Description copied from interface:CAProtocolMessagesTypeParse a message from the given bytes.- Specified by:
parsein interfaceCAProtocolMessagesType<CAIMessageType>- Parameters:
data- The bytes- Returns:
- A parsed message
- Throws:
CAProtocolException- If parsing fails
-
serialize
Description copied from interface:CAProtocolMessagesTypeSerialize the given message to a byte array.- Specified by:
serializein interfaceCAProtocolMessagesType<CAIMessageType>- Parameters:
message- The message- Returns:
- The serialized message as a byte array
-
description
- Specified by:
descriptionin interfacecom.io7m.repetoir.core.RPServiceType
-
toString
-