- All Known Implementing Classes:
AbstractInternetProtocolStats
,AixInternetProtocolStats
,FreeBsdInternetProtocolStats
,LinuxInternetProtocolStats
,MacInternetProtocolStats
,OpenBsdInternetProtocolStats
,SolarisInternetProtocolStats
,WindowsInternetProtocolStats
Includes key statistics of TCP and UDP protocols
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
Encapsulates information associated with an IP connection.static enum
The TCP connection state as described in RFC 793.static final class
Encapsulates statistics associated with a TCP connection.static final class
Encapsulates statistics associated with a UDP connection. -
Method Summary
Modifier and TypeMethodDescriptionGets a list of TCP and UDP connections.Get the TCP stats for IPv4 connections.Get the TCP stats for IPv6 connections, if available.Get the UDP stats for IPv4 datagrams.Get the UDP stats for IPv6 datagrams, if available.
-
Method Details
-
getTCPv4Stats
InternetProtocolStats.TcpStats getTCPv4Stats()Get the TCP stats for IPv4 connections.On macOS connection information requires elevated permissions. Without elevatd permissions, segment data is estimated.
- Returns:
- a
InternetProtocolStats.TcpStats
object encapsulating the stats.
-
getTCPv6Stats
InternetProtocolStats.TcpStats getTCPv6Stats()Get the TCP stats for IPv6 connections, if available. If not available separately, these may be 0 and included in IPv4 connections.- Returns:
- a
InternetProtocolStats.TcpStats
object encapsulating the stats.
-
getUDPv4Stats
InternetProtocolStats.UdpStats getUDPv4Stats()Get the UDP stats for IPv4 datagrams.- Returns:
- a
InternetProtocolStats.UdpStats
object encapsulating the stats.
-
getUDPv6Stats
InternetProtocolStats.UdpStats getUDPv6Stats()Get the UDP stats for IPv6 datagrams, if available. If not available separately, these may be 0 and included in IPv4 datagrams.- Returns:
- a
InternetProtocolStats.UdpStats
object encapsulating the stats.
-
getConnections
List<InternetProtocolStats.IPConnection> getConnections()Gets a list of TCP and UDP connections.- Returns:
- A list of
InternetProtocolStats.IPConnection
objects for TCP and UDP connections.
-