Interface PacketParser
-
- All Known Implementing Classes:
ActiveMQPacketParser
public interface PacketParserInterface for a DatagramPacket parser object which is used by the MulticastDiscoveryAget to parse incoming packets to determine the discovered peer information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetGroup()DiscoveryEventprocessPacket(byte[] data, int offset, int length)Process in incoming event packet and create a DiscoveryEvent from the data.voidsetGroup(String group)Sets the multicast group that the parent agent is assigned to.
-
-
-
Method Detail
-
getGroup
String getGroup()
- Returns:
- the multicast group assignment for this parser.
-
setGroup
void setGroup(String group)
Sets the multicast group that the parent agent is assigned to. This can be used in some cases to parse discovery messages.- Parameters:
group- the multicast group that this parser's parent agent resides in./
-
processPacket
DiscoveryEvent processPacket(byte[] data, int offset, int length)
Process in incoming event packet and create a DiscoveryEvent from the data.- Parameters:
data- the new data packet to process.offset- the offset into the data buffer to start at.length- the length of the data packet contained in the buffer.- Returns:
- a new DiscoveryEvent created from pocessing the incoming data.
-
-