Class GenericMessage

  • All Implemented Interfaces:
    Message

    public class GenericMessage
    extends Object
    implements Message

    GenericMessage class.

    • Constructor Detail

      • GenericMessage

        public GenericMessage​(String command,
                              byte[] payload)

        Constructor for GenericMessage.

        Parameters:
        command - a String object
        payload - an array of byte objects
    • Method Detail

      • getCommand

        public byte[] getCommand()

        getCommand.

        Specified by:
        getCommand in interface Message
        Returns:
        an array of byte objects
      • serialize

        public byte[] serialize()

        serialize.

        Specified by:
        serialize in interface Message
        Returns:
        an array of byte objects