Class PropertiesBasedIpV6TrafficClassFactory
- java.lang.Object
-
- org.pcap4j.packet.factory.propertiesbased.PropertiesBasedIpV6TrafficClassFactory
-
- All Implemented Interfaces:
PacketFactory<IpV6Packet.IpV6TrafficClass,NotApplicable>
public final class PropertiesBasedIpV6TrafficClassFactory extends java.lang.Object implements PacketFactory<IpV6Packet.IpV6TrafficClass,NotApplicable>
- Since:
- pcap4j 0.9.14
-
-
Field Summary
Fields Modifier and Type Field Description private static PropertiesBasedIpV6TrafficClassFactoryINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privatePropertiesBasedIpV6TrafficClassFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static PropertiesBasedIpV6TrafficClassFactorygetInstance()java.lang.Class<? extends IpV6Packet.IpV6TrafficClass>getTargetClass()java.lang.Class<? extends IpV6Packet.IpV6TrafficClass>getTargetClass(NotApplicable number)Deprecated.IpV6Packet.IpV6TrafficClassnewInstance(byte[] rawData, int offset, int length)IpV6Packet.IpV6TrafficClassnewInstance(byte[] rawData, int offset, int length, java.lang.Class<? extends IpV6Packet.IpV6TrafficClass> clazz)A static factory method.IpV6Packet.IpV6TrafficClassnewInstance(byte[] rawData, int offset, int length, NotApplicable number)Deprecated.
-
-
-
Field Detail
-
INSTANCE
private static final PropertiesBasedIpV6TrafficClassFactory INSTANCE
-
-
Method Detail
-
getInstance
public static PropertiesBasedIpV6TrafficClassFactory getInstance()
- Returns:
- the singleton instance of PropertiesBasedIpV6TrafficClassFactory.
-
newInstance
@Deprecated public IpV6Packet.IpV6TrafficClass newInstance(byte[] rawData, int offset, int length, NotApplicable number)
Deprecated.- Specified by:
newInstancein interfacePacketFactory<IpV6Packet.IpV6TrafficClass,NotApplicable>- Parameters:
rawData- rawDataoffset- offsetlength- lengthnumber- number- Returns:
- a new data object.
-
newInstance
public IpV6Packet.IpV6TrafficClass newInstance(byte[] rawData, int offset, int length)
- Specified by:
newInstancein interfacePacketFactory<IpV6Packet.IpV6TrafficClass,NotApplicable>- Parameters:
rawData- rawDataoffset- offsetlength- length- Returns:
- a new data object.
-
newInstance
public IpV6Packet.IpV6TrafficClass newInstance(byte[] rawData, int offset, int length, java.lang.Class<? extends IpV6Packet.IpV6TrafficClass> clazz)
A static factory method. This method validates the arguments byByteArrays.validateBounds(byte[], int, int), which may throw exceptions undocumented here.- Parameters:
rawData- rawDataoffset- offsetlength- lengthclazz- clazz- Returns:
- a new IpV6TrafficClass object.
- Throws:
java.lang.IllegalStateException- if an access to the newInstance method of the clazz fails.java.lang.IllegalArgumentException- if an exception is thrown by newInstance method of the clazz.java.lang.NullPointerException- if any of arguments are null.
-
getTargetClass
@Deprecated public java.lang.Class<? extends IpV6Packet.IpV6TrafficClass> getTargetClass(NotApplicable number)
Deprecated.- Specified by:
getTargetClassin interfacePacketFactory<IpV6Packet.IpV6TrafficClass,NotApplicable>- Parameters:
number- number- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int, NamedNumber)with the number argument.
-
getTargetClass
public java.lang.Class<? extends IpV6Packet.IpV6TrafficClass> getTargetClass()
- Specified by:
getTargetClassin interfacePacketFactory<IpV6Packet.IpV6TrafficClass,NotApplicable>- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int).
-
-