Class AixNetworkIF
- All Implemented Interfaces:
NetworkIF
@ThreadSafe public final class AixNetworkIF extends AbstractNetworkIF
-
Constructor Summary
Constructors Constructor Description AixNetworkIF(java.net.NetworkInterface netint, java.util.function.Supplier<Perfstat.perfstat_netinterface_t[]> netstats)
-
Method Summary
Modifier and Type Method Description long
getBytesRecv()
Getter for the fieldbytesRecv
.long
getBytesSent()
Getter for the fieldbytesSent
.long
getCollisions()
Getter for the fieldcollisions
.long
getInDrops()
Getter for the fieldinDrops
.long
getInErrors()
Getter for the fieldinErrors
.static java.util.List<NetworkIF>
getNetworks()
Gets the network interfaces on this machinelong
getOutErrors()
Getter for the fieldoutErrors
.long
getPacketsRecv()
Getter for the fieldpacketsRecv
.long
getPacketsSent()
Getter for the fieldpacketsSent
.long
getSpeed()
Getter for the fieldspeed
.long
getTimeStamp()
Getter for the fieldtimeStamp
.boolean
updateAttributes()
Updates interface network statistics on this interface.Methods inherited from class oshi.hardware.common.AbstractNetworkIF
getDisplayName, getIfType, getIPv4addr, getIPv6addr, getMacaddr, getMTU, getName, getNdisPhysicalMediumType, getNetworkInterfaces, getPrefixLengths, getSubnetMasks, isConnectorPresent, isKnownVmMacAddr, queryNetworkInterface, toString
-
Constructor Details
-
AixNetworkIF
public AixNetworkIF(java.net.NetworkInterface netint, java.util.function.Supplier<Perfstat.perfstat_netinterface_t[]> netstats)
-
-
Method Details
-
getNetworks
Gets the network interfaces on this machine- Returns:
- An
UnmodifiableList
ofNetworkIF
objects representing the interfaces
-
getBytesRecv
public long getBytesRecv()Description copied from interface:NetworkIF
Getter for the field
bytesRecv
.- Returns:
- The Bytes Received.
This value is set when the
NetworkIF
is instantiated and may not be up to date. To update this value, execute theNetworkIF.updateAttributes()
method
-
getBytesSent
public long getBytesSent()Description copied from interface:NetworkIF
Getter for the field
bytesSent
.- Returns:
- The Bytes Sent.
This value is set when the
NetworkIF
is instantiated and may not be up to date. To update this value, execute theNetworkIF.updateAttributes()
method
-
getPacketsRecv
public long getPacketsRecv()Description copied from interface:NetworkIF
Getter for the field
packetsRecv
.- Returns:
- The Packets Received.
This value is set when the
NetworkIF
is instantiated and may not be up to date. To update this value, execute theNetworkIF.updateAttributes()
method
-
getPacketsSent
public long getPacketsSent()Description copied from interface:NetworkIF
Getter for the field
packetsSent
.- Returns:
- The Packets Sent.
This value is set when the
NetworkIF
is instantiated and may not be up to date. To update this value, execute theNetworkIF.updateAttributes()
method
-
getInErrors
public long getInErrors()Description copied from interface:NetworkIF
Getter for the field
inErrors
.- Returns:
- Input Errors.
This value is set when the
NetworkIF
is instantiated and may not be up to date. To update this value, execute theNetworkIF.updateAttributes()
method
-
getOutErrors
public long getOutErrors()Description copied from interface:NetworkIF
Getter for the field
outErrors
.- Returns:
- The Output Errors.
This value is set when the
NetworkIF
is instantiated and may not be up to date. To update this value, execute theNetworkIF.updateAttributes()
method
-
getInDrops
public long getInDrops()Description copied from interface:NetworkIF
Getter for the field
inDrops
.- Returns:
- Incoming/Received dropped packets. On Windows, returns discarded
incoming packets.
This value is set when the
NetworkIF
is instantiated and may not be up to date. To update this value, execute theNetworkIF.updateAttributes()
method
-
getCollisions
public long getCollisions()Description copied from interface:NetworkIF
Getter for the field
collisions
.- Returns:
- Packet collisions. On Windows, returns discarded outgoing packets.
This value is set when the
NetworkIF
is instantiated and may not be up to date. To update this value, execute theNetworkIF.updateAttributes()
method
-
getSpeed
public long getSpeed()Description copied from interface:NetworkIF
Getter for the field
speed
.- Returns:
- The speed of the network interface in bits per second.
This value is set when the
NetworkIF
is instantiated and may not be up to date. To update this value, execute theNetworkIF.updateAttributes()
method
-
getTimeStamp
public long getTimeStamp()Description copied from interface:NetworkIF
Getter for the field
timeStamp
.- Returns:
- Returns the timeStamp.
-
updateAttributes
public boolean updateAttributes()Description copied from interface:NetworkIF
Updates interface network statistics on this interface. Statistics include packets and bytes sent and received, and interface speed.- Returns:
true
if the update was successful,false
otherwise.
-