Enum NetStat.BusyPort.TcpState
java.lang.Object
java.lang.Enum<NetStat.BusyPort.TcpState>
org.terracotta.utilities.test.net.NetStat.BusyPort.TcpState
- All Implemented Interfaces:
Serializable,Comparable<NetStat.BusyPort.TcpState>,java.lang.constant.Constable
- Enclosing class:
- NetStat.BusyPort
TCP Connection states.
Implementation Notes
Mac OS X
Thenettop utility used for Mac OS X is closed source but source for a variant
(netbottom.c) is available. The TCP state constants returned by nettop
are neither documented nor listed in an available source file. The values used in this
enum are presumed from the known values and the names of external references,
in the form of kNStatSrcTcpStateXxxxxxxxxx, made by netbottom.c.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NetStat.BusyPort.TcpStatefromLsofString(String lsofStateString) Determine theTcpCodefrom the state string from thelsofcommand.static NetStat.BusyPort.TcpStatefromMicrosoftNumber(int msStateNumber) Determine theTcpStatefrom the state number corresponding to a MicrosoftSystem.Net.NetworkInformation.TcpStateenum value.static NetStat.BusyPort.TcpStatefromMicrosoftString(String msStateString) Determine theTcpStatefrom the state string from the MicrosoftGet-NetTCPConnectioncmdlet.static NetStat.BusyPort.TcpStatefromNettopString(String nettopStateString) Determine theTcpCodefrom the state string from thenettopcommand.static NetStat.BusyPort.TcpStateReturns the enum constant of this type with the specified name.static NetStat.BusyPort.TcpState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
-
CLOSED
-
LISTEN
-
SYN_SENT
-
SYN_RECEIVED
-
ESTABLISHED
-
FIN_WAIT_1
-
FIN_WAIT_2
-
CLOSE_WAIT
-
CLOSING
-
LAST_ACK
-
TIME_WAIT
-
DELETE_TCB
-
BOUND
-
CLOSE
-
IDLE
-
-
Field Details
-
msStateString
String representation used by Microsoft. -
msStateNumber
private final int msStateNumberNumber associated with Microsoft's .Net TcpState enum. -
nettopStateString
State value reported by Mac OS Xnettopcommand. -
lsofStateStrings
State values reported bylsof. Multiple values are permitted because of differences in representation by platform.
-
-
Constructor Details
-
TcpState
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
fromNettopString
Determine theTcpCodefrom the state string from thenettopcommand.- Parameters:
nettopStateString- the state string fromnettop- Returns:
- the
TcpStatecorresponding tonettopStateString - Throws:
EnumConstantNotPresentException- ifnettopStateStringis not a recognizedTcpState
-
fromLsofString
Determine theTcpCodefrom the state string from thelsofcommand.- Parameters:
lsofStateString- the state string fromlsof- Returns:
- the
TcpStatecorresponding tolsofStateString - Throws:
EnumConstantNotPresentException- iflsofStateStringis not a recognizedTcpState- See Also:
-
fromMicrosoftString
Determine theTcpStatefrom the state string from the MicrosoftGet-NetTCPConnectioncmdlet.- Parameters:
msStateString- the state string from theGet-NetTCPConnectioncmdlet- Returns:
- the
TcpStatecorresponding tomsStateString - Throws:
EnumConstantNotPresentException- ifmsStateStringis not a recognizedTcpState- See Also:
-
fromMicrosoftNumber
Determine theTcpStatefrom the state number corresponding to a MicrosoftSystem.Net.NetworkInformation.TcpStateenum value.- Parameters:
msStateNumber- theTcpStateenum number- Returns:
- the
TcpStatecorresponding tomsStateNumber - Throws:
EnumConstantNotPresentException- ifmsStateNumberis not a recognizedTcpState- See Also:
-