Class PropertiesBasedSctpChunkFactory
- java.lang.Object
-
- org.pcap4j.packet.factory.propertiesbased.AbstractPropertiesBasedFactory<SctpPacket.SctpChunk,SctpChunkType>
-
- org.pcap4j.packet.factory.propertiesbased.PropertiesBasedSctpChunkFactory
-
- All Implemented Interfaces:
PacketFactory<SctpPacket.SctpChunk,SctpChunkType>
public final class PropertiesBasedSctpChunkFactory extends AbstractPropertiesBasedFactory<SctpPacket.SctpChunk,SctpChunkType>
- Since:
- pcap4j 1.6.6
- Author:
- Kaito Yamada
-
-
Method Summary
Modifier and Type Method Description static PropertiesBasedSctpChunkFactory
getInstance()
protected java.lang.String
getStaticFactoryMethodName()
protected java.lang.Class<? extends SctpPacket.SctpChunk>
getTargetClass(SctpChunkType number)
protected java.lang.Class<? extends SctpPacket.SctpChunk>
getUnknownClass()
protected SctpPacket.SctpChunk
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 PropertiesBasedSctpChunkFactory getInstance()
- Returns:
- the singleton instance of PropertiesBasedSctpChunkFactory.
-
getTargetClass
protected java.lang.Class<? extends SctpPacket.SctpChunk> getTargetClass(SctpChunkType number)
- Specified by:
getTargetClass
in classAbstractPropertiesBasedFactory<SctpPacket.SctpChunk,SctpChunkType>
- Parameters:
number
- number- Returns:
- the class that is supposed to be instantiated for the given number.
-
getUnknownClass
protected java.lang.Class<? extends SctpPacket.SctpChunk> getUnknownClass()
- Specified by:
getUnknownClass
in classAbstractPropertiesBasedFactory<SctpPacket.SctpChunk,SctpChunkType>
- 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<SctpPacket.SctpChunk,SctpChunkType>
- Returns:
- the name of the static factory method to instantiate classes
getTargetClass(N)
andAbstractPropertiesBasedFactory.getUnknownClass()
return.
-
newIllegalData
protected SctpPacket.SctpChunk 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<SctpPacket.SctpChunk,SctpChunkType>
- Parameters:
rawData
- rawDataoffset
- offsetlength
- lengthcause
- cause- Returns:
- a new object.
-
-