Class PropertiesBasedIpV6RoutingDataFactory
- java.lang.Object
-
- org.pcap4j.packet.factory.propertiesbased.PropertiesBasedIpV6RoutingDataFactory
-
- All Implemented Interfaces:
PacketFactory<IpV6ExtRoutingPacket.IpV6RoutingData,IpV6RoutingType>
public final class PropertiesBasedIpV6RoutingDataFactory extends java.lang.Object implements PacketFactory<IpV6ExtRoutingPacket.IpV6RoutingData,IpV6RoutingType>
- Since:
- pcap4j 0.9.14
-
-
Field Summary
Fields Modifier and Type Field Description private static PropertiesBasedIpV6RoutingDataFactoryINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privatePropertiesBasedIpV6RoutingDataFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertiesBasedIpV6RoutingDataFactorygetInstance()java.lang.Class<? extends IpV6ExtRoutingPacket.IpV6RoutingData>getTargetClass()java.lang.Class<? extends IpV6ExtRoutingPacket.IpV6RoutingData>getTargetClass(IpV6RoutingType type)IpV6ExtRoutingPacket.IpV6RoutingDatanewInstance(byte[] rawData, int offset, int length)IpV6ExtRoutingPacket.IpV6RoutingDatanewInstance(byte[] rawData, int offset, int length, java.lang.Class<? extends IpV6ExtRoutingPacket.IpV6RoutingData> dataClass)IpV6ExtRoutingPacket.IpV6RoutingDatanewInstance(byte[] rawData, int offset, int length, IpV6RoutingType type)
-
-
-
Field Detail
-
INSTANCE
private static final PropertiesBasedIpV6RoutingDataFactory INSTANCE
-
-
Method Detail
-
getInstance
public static PropertiesBasedIpV6RoutingDataFactory getInstance()
- Returns:
- the singleton instance of PropertiesBasedIpV6RoutingDataFactory.
-
newInstance
public IpV6ExtRoutingPacket.IpV6RoutingData newInstance(byte[] rawData, int offset, int length, IpV6RoutingType type)
- Specified by:
newInstancein interfacePacketFactory<IpV6ExtRoutingPacket.IpV6RoutingData,IpV6RoutingType>- Parameters:
rawData- rawDataoffset- offsetlength- lengthtype- number- Returns:
- a new data object.
-
newInstance
public IpV6ExtRoutingPacket.IpV6RoutingData newInstance(byte[] rawData, int offset, int length)
- Specified by:
newInstancein interfacePacketFactory<IpV6ExtRoutingPacket.IpV6RoutingData,IpV6RoutingType>- Parameters:
rawData- rawDataoffset- offsetlength- length- Returns:
- a new data object.
-
newInstance
public IpV6ExtRoutingPacket.IpV6RoutingData newInstance(byte[] rawData, int offset, int length, java.lang.Class<? extends IpV6ExtRoutingPacket.IpV6RoutingData> dataClass)
- Parameters:
rawData- rawDataoffset- offsetlength- lengthdataClass- dataClass- Returns:
- a new IpV6RoutingData 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 IpV6ExtRoutingPacket.IpV6RoutingData> getTargetClass(IpV6RoutingType type)
- Specified by:
getTargetClassin interfacePacketFactory<IpV6ExtRoutingPacket.IpV6RoutingData,IpV6RoutingType>- 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 IpV6ExtRoutingPacket.IpV6RoutingData> getTargetClass()
- Specified by:
getTargetClassin interfacePacketFactory<IpV6ExtRoutingPacket.IpV6RoutingData,IpV6RoutingType>- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int).
-
-