Interface PacketFactoryBinder

All Known Implementing Classes:
PropertiesBasedPacketFactoryBinder, StaticPacketFactoryBinder

public interface PacketFactoryBinder
Pcap4J modules can provide a factory to build new packets as they are received.
The implementing modules must also provide a PacketFactoryBinderProvider
Since:
pcap4j 1.8.0
  • Method Details

    • getPacketFactory

      <T, N extends NamedNumber<?,?>> PacketFactory<T,N> getPacketFactory(Class<T> targetClass, Class<N> numberClass)
      Provides a PacketFactory to build the received packets.
      Type Parameters:
      T - the type of object the factory method returns.
      N - the type of object that is given to the factory method.
      Parameters:
      targetClass - targetClass
      numberClass - numberClass
      Returns:
      the factory