Enum NetStat.BusyPort.TcpState
- java.lang.Object
-
- java.lang.Enum<NetStat.BusyPort.TcpState>
-
- org.terracotta.utilities.test.net.NetStat.BusyPort.TcpState
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<NetStat.BusyPort.TcpState>
- Enclosing class:
- NetStat.BusyPort
public static enum NetStat.BusyPort.TcpState extends java.lang.Enum<NetStat.BusyPort.TcpState>
TCP Connection states.Implementation Notes
Mac OS X
Thenettoputility used for Mac OS X is closed source but source for a variant (netbottom.c) is available. The TCP state constants returned bynettopare 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 ofkNStatSrcTcpStateXxxxxxxxxx, made bynetbottom.c.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOUNDCLOSECLOSE_WAITCLOSEDCLOSINGDELETE_TCBESTABLISHEDFIN_WAIT_1FIN_WAIT_2IDLELAST_ACKLISTENSYN_RECEIVEDSYN_SENTTIME_WAITUNKNOWN
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>lsofStateStringsState values reported bylsof.private intmsStateNumberNumber associated with Microsoft's .Net TcpState enum.private java.lang.StringmsStateStringString representation used by Microsoft.private java.lang.StringnettopStateStringState value reported by Mac OS Xnettopcommand.
-
Constructor Summary
Constructors Modifier Constructor Description privateTcpState(java.lang.String msStateString, int msStateNumber, java.lang.String nettopStateString, java.lang.String... lsofStateStrings)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NetStat.BusyPort.TcpStatefromLsofString(java.lang.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(java.lang.String msStateString)Determine theTcpStatefrom the state string from the MicrosoftGet-NetTCPConnectioncmdlet.static NetStat.BusyPort.TcpStatefromNettopString(java.lang.String nettopStateString)Determine theTcpCodefrom the state string from thenettopcommand.static NetStat.BusyPort.TcpStatevalueOf(java.lang.String name)Returns 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 Detail
-
UNKNOWN
public static final NetStat.BusyPort.TcpState UNKNOWN
-
CLOSED
public static final NetStat.BusyPort.TcpState CLOSED
-
LISTEN
public static final NetStat.BusyPort.TcpState LISTEN
-
SYN_SENT
public static final NetStat.BusyPort.TcpState SYN_SENT
-
SYN_RECEIVED
public static final NetStat.BusyPort.TcpState SYN_RECEIVED
-
ESTABLISHED
public static final NetStat.BusyPort.TcpState ESTABLISHED
-
FIN_WAIT_1
public static final NetStat.BusyPort.TcpState FIN_WAIT_1
-
FIN_WAIT_2
public static final NetStat.BusyPort.TcpState FIN_WAIT_2
-
CLOSE_WAIT
public static final NetStat.BusyPort.TcpState CLOSE_WAIT
-
CLOSING
public static final NetStat.BusyPort.TcpState CLOSING
-
LAST_ACK
public static final NetStat.BusyPort.TcpState LAST_ACK
-
TIME_WAIT
public static final NetStat.BusyPort.TcpState TIME_WAIT
-
DELETE_TCB
public static final NetStat.BusyPort.TcpState DELETE_TCB
-
BOUND
public static final NetStat.BusyPort.TcpState BOUND
-
CLOSE
public static final NetStat.BusyPort.TcpState CLOSE
-
IDLE
public static final NetStat.BusyPort.TcpState IDLE
-
-
Field Detail
-
msStateString
private final java.lang.String msStateString
String representation used by Microsoft.
-
msStateNumber
private final int msStateNumber
Number associated with Microsoft's .Net TcpState enum.
-
nettopStateString
private final java.lang.String nettopStateString
State value reported by Mac OS Xnettopcommand.
-
lsofStateStrings
private final java.util.List<java.lang.String> lsofStateStrings
State values reported bylsof. Multiple values are permitted because of differences in representation by platform.
-
-
Method Detail
-
values
public static NetStat.BusyPort.TcpState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NetStat.BusyPort.TcpState c : NetStat.BusyPort.TcpState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NetStat.BusyPort.TcpState valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
fromNettopString
public static NetStat.BusyPort.TcpState fromNettopString(java.lang.String nettopStateString)
Determine theTcpCodefrom the state string from thenettopcommand.- Parameters:
nettopStateString- the state string fromnettop- Returns:
- the
TcpStatecorresponding tonettopStateString - Throws:
java.lang.EnumConstantNotPresentException- ifnettopStateStringis not a recognizedTcpState
-
fromLsofString
public static NetStat.BusyPort.TcpState fromLsofString(java.lang.String lsofStateString)
Determine theTcpCodefrom the state string from thelsofcommand.- Parameters:
lsofStateString- the state string fromlsof- Returns:
- the
TcpStatecorresponding tolsofStateString - Throws:
java.lang.EnumConstantNotPresentException- iflsofStateStringis not a recognizedTcpState- See Also:
- lsof-org/lsof Source Repository
-
fromMicrosoftString
public static NetStat.BusyPort.TcpState fromMicrosoftString(java.lang.String msStateString)
Determine theTcpStatefrom the state string from the MicrosoftGet-NetTCPConnectioncmdlet.- Parameters:
msStateString- the state string from theGet-NetTCPConnectioncmdlet- Returns:
- the
TcpStatecorresponding tomsStateString - Throws:
java.lang.EnumConstantNotPresentException- ifmsStateStringis not a recognizedTcpState- See Also:
- MSFT_NetTCPConnection class
-
fromMicrosoftNumber
public static NetStat.BusyPort.TcpState fromMicrosoftNumber(int msStateNumber)
Determine theTcpStatefrom the state number corresponding to a MicrosoftSystem.Net.NetworkInformation.TcpStateenum value.- Parameters:
msStateNumber- theTcpStateenum number- Returns:
- the
TcpStatecorresponding tomsStateNumber - Throws:
java.lang.EnumConstantNotPresentException- ifmsStateNumberis not a recognizedTcpState- See Also:
- TcpState Enum
-
-