Enum NetStat.BusyPort.TcpState

    • 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 X nettop command.
      • lsofStateStrings

        private final java.util.List<java.lang.String> lsofStateStrings
        State values reported by lsof. Multiple values are permitted because of differences in representation by platform.
    • Constructor Detail

      • TcpState

        private TcpState​(java.lang.String msStateString,
                         int msStateNumber,
                         java.lang.String nettopStateString,
                         java.lang.String... lsofStateStrings)
    • 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 name
        java.lang.NullPointerException - if the argument is null
      • fromNettopString

        public static NetStat.BusyPort.TcpState fromNettopString​(java.lang.String nettopStateString)
        Determine the TcpCode from the state string from the nettop command.
        Parameters:
        nettopStateString - the state string from nettop
        Returns:
        the TcpState corresponding to nettopStateString
        Throws:
        java.lang.EnumConstantNotPresentException - if nettopStateString is not a recognized TcpState
      • fromLsofString

        public static NetStat.BusyPort.TcpState fromLsofString​(java.lang.String lsofStateString)
        Determine the TcpCode from the state string from the lsof command.
        Parameters:
        lsofStateString - the state string from lsof
        Returns:
        the TcpState corresponding to lsofStateString
        Throws:
        java.lang.EnumConstantNotPresentException - if lsofStateString is not a recognized TcpState
        See Also:
        lsof-org/lsof Source Repository
      • fromMicrosoftString

        public static NetStat.BusyPort.TcpState fromMicrosoftString​(java.lang.String msStateString)
        Determine the TcpState from the state string from the Microsoft Get-NetTCPConnection cmdlet.
        Parameters:
        msStateString - the state string from the Get-NetTCPConnection cmdlet
        Returns:
        the TcpState corresponding to msStateString
        Throws:
        java.lang.EnumConstantNotPresentException - if msStateString is not a recognized TcpState
        See Also:
        MSFT_NetTCPConnection class
      • fromMicrosoftNumber

        public static NetStat.BusyPort.TcpState fromMicrosoftNumber​(int msStateNumber)
        Determine the TcpState from the state number corresponding to a Microsoft System.Net.NetworkInformation.TcpState enum value.
        Parameters:
        msStateNumber - the TcpState enum number
        Returns:
        the TcpState corresponding to msStateNumber
        Throws:
        java.lang.EnumConstantNotPresentException - if msStateNumber is not a recognized TcpState
        See Also:
        TcpState Enum