Class PropertiesBasedIpV6OptionFactory
- java.lang.Object
-
- org.pcap4j.packet.factory.propertiesbased.AbstractPropertiesBasedFactory<IpV6ExtOptionsPacket.IpV6Option,IpV6OptionType>
-
- org.pcap4j.packet.factory.propertiesbased.PropertiesBasedIpV6OptionFactory
-
- All Implemented Interfaces:
PacketFactory<IpV6ExtOptionsPacket.IpV6Option,IpV6OptionType>
public final class PropertiesBasedIpV6OptionFactory extends AbstractPropertiesBasedFactory<IpV6ExtOptionsPacket.IpV6Option,IpV6OptionType>
- Since:
- pcap4j 0.9.14
- Author:
- Kaito Yamada
-
-
Method Summary
Modifier and Type Method Description static PropertiesBasedIpV6OptionFactory
getInstance()
protected java.lang.String
getStaticFactoryMethodName()
protected java.lang.Class<? extends IpV6ExtOptionsPacket.IpV6Option>
getTargetClass(IpV6OptionType number)
protected java.lang.Class<? extends IpV6ExtOptionsPacket.IpV6Option>
getUnknownClass()
protected IpV6ExtOptionsPacket.IpV6Option
newIllegalData(byte[] rawData, int offset, int length, IllegalRawDataException cause)
This method is called whenIllegalRawDataException
is thrown during instantiating a classgetTargetClass(N)
orAbstractPropertiesBasedFactory.getUnknownClass()
return and create an object representing an illegal packet or packet field.-
Methods inherited from class org.pcap4j.packet.factory.propertiesbased.AbstractPropertiesBasedFactory
newInstance
-
-
-
-
Method Detail
-
getInstance
public static PropertiesBasedIpV6OptionFactory getInstance()
- Returns:
- the singleton instance of PropertiesBasedIpV6OptionFactory.
-
getTargetClass
protected java.lang.Class<? extends IpV6ExtOptionsPacket.IpV6Option> getTargetClass(IpV6OptionType number)
- Specified by:
getTargetClass
in classAbstractPropertiesBasedFactory<IpV6ExtOptionsPacket.IpV6Option,IpV6OptionType>
- Parameters:
number
- number- Returns:
- the class that is supposed to be instantiated for the given number.
-
getUnknownClass
protected java.lang.Class<? extends IpV6ExtOptionsPacket.IpV6Option> getUnknownClass()
- Specified by:
getUnknownClass
in classAbstractPropertiesBasedFactory<IpV6ExtOptionsPacket.IpV6Option,IpV6OptionType>
- Returns:
- the class that is supposed to be instantiated for numbers this factory doesn't support.
-
getStaticFactoryMethodName
protected java.lang.String getStaticFactoryMethodName()
- Specified by:
getStaticFactoryMethodName
in classAbstractPropertiesBasedFactory<IpV6ExtOptionsPacket.IpV6Option,IpV6OptionType>
- Returns:
- the name of the static factory method to instantiate classes
getTargetClass(N)
andAbstractPropertiesBasedFactory.getUnknownClass()
return.
-
newIllegalData
protected IpV6ExtOptionsPacket.IpV6Option newIllegalData(byte[] rawData, int offset, int length, IllegalRawDataException cause)
Description copied from class:AbstractPropertiesBasedFactory
This method is called whenIllegalRawDataException
is thrown during instantiating a classgetTargetClass(N)
orAbstractPropertiesBasedFactory.getUnknownClass()
return and create an object representing an illegal packet or packet field.- Specified by:
newIllegalData
in classAbstractPropertiesBasedFactory<IpV6ExtOptionsPacket.IpV6Option,IpV6OptionType>
- Parameters:
rawData
- rawDataoffset
- offsetlength
- lengthcause
- cause- Returns:
- a new object.
-
-