public class PacketTypeFilter extends Object implements PacketFilter
Modifier and Type | Field and Description |
---|---|
static PacketTypeFilter |
MESSAGE |
static PacketTypeFilter |
PRESENCE |
Constructor and Description |
---|
PacketTypeFilter(Class<? extends Packet> packetType)
Creates a new packet type filter that will filter for packets that are the
same type as packetType.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Packet packet)
Tests whether or not the specified packet should pass the filter.
|
String |
toString() |
public static final PacketTypeFilter PRESENCE
public static final PacketTypeFilter MESSAGE
public boolean accept(Packet packet)
PacketFilter
accept
in interface PacketFilter
packet
- the packet to test.Copyright © 2015 Ignite Realtime. All rights reserved.