Class StaticPacketFactoryBinder

    • Field Detail

      • packetFactories

        private final java.util.Map<java.lang.Class<? extends NamedNumber<?,​?>>,​PacketFactory<?,​?>> packetFactories
      • packetpPieceFactories

        private final java.util.Map<java.lang.Class<?>,​PacketFactory<?,​?>> packetpPieceFactories
    • Constructor Detail

      • StaticPacketFactoryBinder

        private StaticPacketFactoryBinder()
    • Method Detail

      • getPacketFactory

        public <T,​N extends NamedNumber<?,​?>> PacketFactory<T,​N> getPacketFactory​(java.lang.Class<T> targetClass,
                                                                                                    java.lang.Class<N> numberClass)
        Description copied from interface: PacketFactoryBinder
        Provides a PacketFactory to build the received packets.
        Specified by:
        getPacketFactory in interface PacketFactoryBinder
        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