Class PropertiesBasedIpV6NeighborDiscoveryOptionFactory
- java.lang.Object
-
- org.pcap4j.packet.factory.propertiesbased.PropertiesBasedIpV6NeighborDiscoveryOptionFactory
-
- All Implemented Interfaces:
PacketFactory<IcmpV6CommonPacket.IpV6NeighborDiscoveryOption,IpV6NeighborDiscoveryOptionType>
public final class PropertiesBasedIpV6NeighborDiscoveryOptionFactory extends java.lang.Object implements PacketFactory<IcmpV6CommonPacket.IpV6NeighborDiscoveryOption,IpV6NeighborDiscoveryOptionType>
- Since:
- pcap4j 0.9.15
-
-
Field Summary
Fields Modifier and Type Field Description private static PropertiesBasedIpV6NeighborDiscoveryOptionFactoryINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privatePropertiesBasedIpV6NeighborDiscoveryOptionFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertiesBasedIpV6NeighborDiscoveryOptionFactorygetInstance()java.lang.Class<? extends IcmpV6CommonPacket.IpV6NeighborDiscoveryOption>getTargetClass()java.lang.Class<? extends IcmpV6CommonPacket.IpV6NeighborDiscoveryOption>getTargetClass(IpV6NeighborDiscoveryOptionType type)IcmpV6CommonPacket.IpV6NeighborDiscoveryOptionnewInstance(byte[] rawData, int offset, int length)IcmpV6CommonPacket.IpV6NeighborDiscoveryOptionnewInstance(byte[] rawData, int offset, int length, java.lang.Class<? extends IcmpV6CommonPacket.IpV6NeighborDiscoveryOption> dataClass)IcmpV6CommonPacket.IpV6NeighborDiscoveryOptionnewInstance(byte[] rawData, int offset, int length, IpV6NeighborDiscoveryOptionType type)
-
-
-
Field Detail
-
INSTANCE
private static final PropertiesBasedIpV6NeighborDiscoveryOptionFactory INSTANCE
-
-
Method Detail
-
getInstance
public static PropertiesBasedIpV6NeighborDiscoveryOptionFactory 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, java.lang.Class<? extends IcmpV6CommonPacket.IpV6NeighborDiscoveryOption> dataClass)
- Parameters:
rawData- rawDataoffset- offsetlength- lengthdataClass- dataClass- Returns:
- a new IpV6NeighborDiscoveryOption object.
- Throws:
java.lang.IllegalStateException- if an access to the newInstance method of the dataClass fails.java.lang.IllegalArgumentException- if an exception other thanIllegalRawDataExceptionis thrown by newInstance method of the dataClass.java.lang.NullPointerException- if any of arguments are null.
-
getTargetClass
public java.lang.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
public java.lang.Class<? extends IcmpV6CommonPacket.IpV6NeighborDiscoveryOption> getTargetClass()
- Specified by:
getTargetClassin interfacePacketFactory<IcmpV6CommonPacket.IpV6NeighborDiscoveryOption,IpV6NeighborDiscoveryOptionType>- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int).
-
-