Interface HeartBeatParser
-
public interface HeartBeatParserInterface used for heart beat message parsers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]genHeartBeatMessage(java.lang.String messageId, HeartBeatMessage heartBeatMessage)Method to generate a heart beat message from the supplied data.voidinit(MessageSecurityProvider securityProvider, java.util.Properties config)Method that initializes the heart beat parser with property set.HeartBeatMessageparseMessage(byte[] messageData)Method to parse the messageData into a HeartBeatMessage with validation according to the specification.
-
-
-
Method Detail
-
init
void init(MessageSecurityProvider securityProvider, java.util.Properties config) throws MessageProcessingException
Method that initializes the heart beat parser with property set.- Parameters:
securityProvider- the message security provider to use.config- the configuration of the parser.- Throws:
MessageProcessingException- if configuration contained bad configuration of security provider.
-
parseMessage
HeartBeatMessage parseMessage(byte[] messageData) throws MessageContentException, MessageProcessingException
Method to parse the messageData into a HeartBeatMessage with validation according to the specification.- Parameters:
messageData- the message data to parse- Returns:
- a heart beat message from the message data.
- Throws:
MessageContentException- if receipt message contained invalid data not conforming to the standard.MessageProcessingException- if internal state occurred when processing the message
-
genHeartBeatMessage
byte[] genHeartBeatMessage(java.lang.String messageId, HeartBeatMessage heartBeatMessage) throws MessageContentException, MessageProcessingExceptionMethod to generate a heart beat message from the supplied data.- Parameters:
heartBeatMessage- the heart beat message data to transform into a message structure.- Returns:
- a generated heart beat message, never null.
- Throws:
MessageContentException- if supplied arguments were invalid.MessageProcessingException- if internal problems occurred when generating the heart beat message.
-
-