Class CoreMessagePersister
- java.lang.Object
-
- org.apache.activemq.artemis.core.message.impl.CoreMessagePersister
-
-
Field Summary
Fields Modifier and Type Field Description static byteID
-
Constructor Summary
Constructors Modifier Constructor Description protectedCoreMessagePersister()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Messagedecode(ActiveMQBuffer buffer, Message record, CoreMessageObjectPools pool)voidencode(ActiveMQBuffer buffer, Message record)Sub classes must add the first short as the protocol-idintgetEncodeSize(Message record)bytegetID()This is to be used to store the protocol-id on Messages.static CoreMessagePersistergetInstance()static voidregisterPersister(CoreMessagePersister newPersister)This is a hook for testingstatic voidresetPersister()
-
-
-
Field Detail
-
ID
public static final byte ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerPersister
public static void registerPersister(CoreMessagePersister newPersister)
This is a hook for testing
-
resetPersister
public static void resetPersister()
-
getInstance
public static CoreMessagePersister getInstance()
-
getID
public byte getID()
Description copied from interface:PersisterThis is to be used to store the protocol-id on Messages. Messages are stored on their bare format. The protocol manager will be responsible to code or decode messages. The caveat here is that the first short-sized bytes need to be this constant.
-
getEncodeSize
public int getEncodeSize(Message record)
- Specified by:
getEncodeSizein interfacePersister<Message>
-
encode
public void encode(ActiveMQBuffer buffer, Message record)
Sub classes must add the first short as the protocol-id
-
decode
public Message decode(ActiveMQBuffer buffer, Message record, CoreMessageObjectPools pool)
-
-