public interface Packet
Modifier and Type | Method and Description |
---|---|
void |
decode(ActiveMQBuffer buffer)
decodes the buffer into this packet
|
ActiveMQBuffer |
encode(RemotingConnection connection)
Encodes the packet and returns a
ActiveMQBuffer containing the data |
long |
getChannelID()
Returns the channel id of the channel that should handle this packet.
|
int |
getPacketSize()
returns the size needed to encode this packet.
|
byte |
getType()
returns the type of the packet.
|
boolean |
isRequiresConfirmations()
returns true if a confirmation should be sent on receipt of this packet.
|
boolean |
isResponse()
returns true if this packet is being sent in response to a previously received packet
|
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.
|
void setChannelID(long channelID)
channelID
- the id of the channel to handle the packetlong getChannelID()
boolean isResponse()
byte getType()
This is needed when decoding the packet
ActiveMQBuffer encode(RemotingConnection connection)
ActiveMQBuffer
containing the dataconnection
- the connectionvoid decode(ActiveMQBuffer buffer)
buffer
- the buffer to decode fromint getPacketSize()
boolean isRequiresConfirmations()
Copyright © 2016 JBoss by Red Hat. All rights reserved.