Example #1
0
 /**
  * Notify and process the packet listener if the filter matches the packet.
  *
  * @param packet the packet which was sent or received.
  */
 public void notifyListener(Packet packet) {
   if (packetFilter == null || packetFilter.accept(packet)) {
     packetListener.processPacket(packet);
   }
 }