- All Implemented Interfaces:
Serializable
,Comparable<PcapDirection>
,Constable
,IntSupplier
Specifies the packet direction on a live capture, relative to the network
interface.
- Author:
- Sly Technologies, repos@slytechs.com
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPacket's direction is being received.Packet's direction is in either direction.Packet's direction is being transmitted. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Packet's direction is being received.static final int
Packet's direction is in either direction.static final int
Packet's direction is being transmitted. -
Method Summary
Modifier and TypeMethodDescriptionint
getAsInt()
Gets the as int.static Optional
<PcapDirection> toEnum
(int direction) Converts integer pcap direction value to an enum.static PcapDirection
valueOf
(int direction) Converts integer pcap direction value to an enum.static PcapDirection
Returns the enum constant of this class with the specified name.static PcapDirection[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DIRECTION_INOUT
Packet's direction is in either direction. -
DIRECTION_IN
Packet's direction is being received. -
DIRECTION_OUT
Packet's direction is being transmitted.
-
-
Field Details
-
PCAP_DIRECTION_INOUT
public static final int PCAP_DIRECTION_INOUTPacket's direction is in either direction.- See Also:
-
PCAP_DIRECTION_IN
public static final int PCAP_DIRECTION_INPacket's direction is being received.- See Also:
-
PCAP_DIRECTION_OUT
public static final int PCAP_DIRECTION_OUTPacket's direction is being transmitted.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
valueOf
Converts integer pcap direction value to an enum.- Parameters:
direction
- an integer PCAP direction constant- Returns:
- the pcap direction enum
- Throws:
IllegalArgumentException
- thrown if not found
-
toEnum
Converts integer pcap direction value to an enum.- Parameters:
direction
- the direction- Returns:
- the optional
-
getAsInt
public int getAsInt()Gets the as int.- Specified by:
getAsInt
in interfaceIntSupplier
- Returns:
- the as int
- See Also:
-