Interface Packet

    • Method Detail

      • setChannelID

        void setChannelID​(long channelID)
        Sets the channel id that should be used once the packet has been successfully decoded it is sent to the correct channel.
        Parameters:
        channelID - the id of the channel to handle the packet
      • expectedEncodeSize

        default int expectedEncodeSize()
        This will return the expected packet size for the encoding
        Returns:
      • isRequiresResponse

        boolean isRequiresResponse()
      • isResponseAsync

        boolean isResponseAsync()
      • getCorrelationID

        long getCorrelationID()
      • setCorrelationID

        void setCorrelationID​(long correlationID)
      • getChannelID

        long getChannelID()
        Returns the channel id of the channel that should handle this packet.
        Returns:
        the id of the channel
      • isResponse

        boolean isResponse()
        returns true if this packet is being sent in response to a previously received packet
        Returns:
        true if a response
      • getType

        byte getType()
        returns the type of the packet.

        This is needed when decoding the packet

        Returns:
        the packet type
      • decode

        void decode​(ActiveMQBuffer buffer)
        decodes the buffer into this packet
        Parameters:
        buffer - the buffer to decode from
      • getPacketSize

        int getPacketSize()
        returns the size needed to encode this packet.
        Returns:
        The size of the entire packet including headers, and extra data
      • isRequiresConfirmations

        boolean isRequiresConfirmations()
        returns true if a confirmation should be sent on receipt of this packet.
        Returns:
        true if confirmation is required
      • release

        default void release()
        The packe wasn't used because the stream is closed, this gives a chance to sub classes to cleanup anything that won't be used.