Class PropertiesBasedIpV6NeighborDiscoveryOptionFactory
java.lang.Object
org.pcap4j.packet.factory.propertiesbased.PropertiesBasedIpV6NeighborDiscoveryOptionFactory
- All Implemented Interfaces:
PacketFactory<IcmpV6CommonPacket.IpV6NeighborDiscoveryOption,IpV6NeighborDiscoveryOptionType>
public final class PropertiesBasedIpV6NeighborDiscoveryOptionFactory
extends Object
implements PacketFactory<IcmpV6CommonPacket.IpV6NeighborDiscoveryOption,IpV6NeighborDiscoveryOptionType>
- Since:
- pcap4j 0.9.15
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final PropertiesBasedIpV6NeighborDiscoveryOptionFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewInstance(byte[] rawData, int offset, int length) newInstance(byte[] rawData, int offset, int length, Class<? extends IcmpV6CommonPacket.IpV6NeighborDiscoveryOption> dataClass) newInstance(byte[] rawData, int offset, int length, IpV6NeighborDiscoveryOptionType type)
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PropertiesBasedIpV6NeighborDiscoveryOptionFactory
private PropertiesBasedIpV6NeighborDiscoveryOptionFactory()
-
-
Method Details
-
getInstance
- Returns:
- the singleton instance of PropertiesBasedIpV6NeighborDiscoveryOptionFactory.
-
newInstance
public IcmpV6CommonPacket.IpV6NeighborDiscoveryOption newInstance(byte[] rawData, int offset, int length, IpV6NeighborDiscoveryOptionType type) - Specified by:
newInstancein interfacePacketFactory<IcmpV6CommonPacket.IpV6NeighborDiscoveryOption,IpV6NeighborDiscoveryOptionType> - Parameters:
rawData- rawDataoffset- offsetlength- lengthtype- number- Returns:
- a new data object.
-
newInstance
public IcmpV6CommonPacket.IpV6NeighborDiscoveryOption newInstance(byte[] rawData, int offset, int length) - Specified by:
newInstancein interfacePacketFactory<IcmpV6CommonPacket.IpV6NeighborDiscoveryOption,IpV6NeighborDiscoveryOptionType> - Parameters:
rawData- rawDataoffset- offsetlength- length- Returns:
- a new data object.
-
newInstance
public IcmpV6CommonPacket.IpV6NeighborDiscoveryOption newInstance(byte[] rawData, int offset, int length, Class<? extends IcmpV6CommonPacket.IpV6NeighborDiscoveryOption> dataClass) - Parameters:
rawData- rawDataoffset- offsetlength- lengthdataClass- dataClass- Returns:
- a new IpV6NeighborDiscoveryOption object.
- Throws:
IllegalStateException- if an access to the newInstance method of the dataClass fails.IllegalArgumentException- if an exception other thanIllegalRawDataExceptionis thrown by newInstance method of the dataClass.NullPointerException- if any of arguments are null.
-
getTargetClass
public Class<? extends IcmpV6CommonPacket.IpV6NeighborDiscoveryOption> getTargetClass(IpV6NeighborDiscoveryOptionType type) - Specified by:
getTargetClassin interfacePacketFactory<IcmpV6CommonPacket.IpV6NeighborDiscoveryOption,IpV6NeighborDiscoveryOptionType> - Parameters:
type- number- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int, NamedNumber)with the number argument.
-
getTargetClass
- Specified by:
getTargetClassin interfacePacketFactory<IcmpV6CommonPacket.IpV6NeighborDiscoveryOption,IpV6NeighborDiscoveryOptionType> - Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int).
-