public class NetworkIF extends Object implements Serializable
| Constructor and Description |
|---|
NetworkIF() |
| Modifier and Type | Method and Description |
|---|---|
long |
getBytesRecv() |
long |
getBytesSent() |
String |
getDisplayName() |
long |
getInErrors() |
String[] |
getIPv4addr() |
String[] |
getIPv6addr() |
String |
getMacaddr() |
int |
getMTU() |
String |
getName() |
NetworkInterface |
getNetworkInterface() |
long |
getOutErrors() |
long |
getPacketsRecv() |
long |
getPacketsSent() |
long |
getSpeed() |
long |
getTimeStamp() |
void |
setBytesRecv(long bytesRecv) |
void |
setBytesSent(long bytesSent) |
void |
setInErrors(long inErrors) |
void |
setNetworkInterface(NetworkInterface networkInterface)
Sets the network interface and calculates other information derived from
it
|
void |
setOutErrors(long outErrors) |
void |
setPacketsRecv(long packetsRecv) |
void |
setPacketsSent(long packetsSent) |
void |
setSpeed(long speed) |
void |
setTimeStamp(long timeStamp) |
void |
updateNetworkStats()
Updates interface network statistics on this interface.
|
public NetworkInterface getNetworkInterface()
public void setNetworkInterface(NetworkInterface networkInterface)
networkInterface - The network interface to setpublic String getName()
public String getDisplayName()
public int getMTU()
NetworkIF is instantiated and may not be up to date. To
update this value, execute the
setNetworkInterface(NetworkInterface) methodpublic String getMacaddr()
NetworkIF is
instantiated and may not be up to date. To update this value,
execute the setNetworkInterface(NetworkInterface) methodpublic String[] getIPv4addr()
NetworkIF
is instantiated and may not be up to date. To update this value,
execute the setNetworkInterface(NetworkInterface) methodpublic String[] getIPv6addr()
NetworkIF
is instantiated and may not be up to date. To update this value,
execute the setNetworkInterface(NetworkInterface) methodpublic long getBytesRecv()
NetworkIF
is instantiated and may not be up to date. To update this value,
execute the updateNetworkStats() methodpublic void setBytesRecv(long bytesRecv)
bytesRecv - Set Bytes Receivedpublic long getBytesSent()
NetworkIF is
instantiated and may not be up to date. To update this value,
execute the updateNetworkStats() methodpublic void setBytesSent(long bytesSent)
bytesSent - Set the Bytes Sentpublic long getPacketsRecv()
NetworkIF is instantiated and may not be up to date. To
update this value, execute the updateNetworkStats()
methodpublic void setPacketsRecv(long packetsRecv)
packetsRecv - Set The Packets Receivedpublic long getPacketsSent()
NetworkIF is
instantiated and may not be up to date. To update this value,
execute the updateNetworkStats() methodpublic void setPacketsSent(long packetsSent)
packetsSent - Set The Packets Sentpublic long getInErrors()
NetworkIF is
instantiated and may not be up to date. To update this value,
execute the updateNetworkStats() methodpublic void setInErrors(long inErrors)
inErrors - The Input Errors to set.public long getOutErrors()
NetworkIF
is instantiated and may not be up to date. To update this value,
execute the updateNetworkStats() methodpublic void setOutErrors(long outErrors)
outErrors - The Output Errors to set.public long getSpeed()
NetworkIF is instantiated and may not be
up to date. To update this value, execute the
updateNetworkStats() methodpublic void setSpeed(long speed)
speed - Set the speed of the network interfacepublic long getTimeStamp()
public void setTimeStamp(long timeStamp)
timeStamp - The timeStamp to set.public void updateNetworkStats()
Copyright © 2010–2018 oshi. All rights reserved.