public class NetworkIF extends Object implements OshiJsonObject
| Constructor and Description |
|---|
NetworkIF() |
| Modifier and Type | Method and Description |
|---|---|
long |
getBytesRecv() |
long |
getBytesSent() |
String |
getDisplayName() |
String[] |
getIPv4addr() |
String[] |
getIPv6addr() |
String |
getMacaddr() |
int |
getMTU() |
String |
getName() |
NetworkInterface |
getNetworkInterface() |
long |
getPacketsRecv() |
long |
getPacketsSent() |
long |
getSpeed() |
void |
setBytesRecv(long bytesRecv) |
void |
setBytesSent(long bytesSent) |
void |
setNetworkInterface(NetworkInterface networkInterface)
Sets the network interface and calculates other information derived from
it
|
void |
setPacketsRecv(long packetsRecv) |
void |
setPacketsSent(long packetsSent) |
void |
setSpeed(long speed) |
javax.json.JsonObject |
toJSON()
Creates a compact JSON string containing the information for this class
|
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 Networks.updateNetworkStats(NetworkIF) 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 Networks.updateNetworkStats(NetworkIF) 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
Networks.updateNetworkStats(NetworkIF) 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 Networks.updateNetworkStats(NetworkIF) methodpublic void setPacketsSent(long packetsSent)
packetsSent - Set The Packets Sentpublic long getSpeed()
NetworkIF is instantiated and may not be
up to date. To update this value, execute the
Networks.updateNetworkStats(NetworkIF) methodpublic void setSpeed(long speed)
speed - Set the speed of the network interfacepublic javax.json.JsonObject toJSON()
toJSON in interface OshiJsonObjectCopyright © 2010–2016 com.github.dblock. All rights reserved.