public class NetworkIF extends Object
| Constructor and Description |
|---|
NetworkIF() |
| Modifier and Type | Method and Description |
|---|---|
long |
getBytesRecv()
Getter for the field
bytesRecv. |
long |
getBytesSent()
Getter for the field
bytesSent. |
String |
getDisplayName()
Interface description.
|
long |
getInErrors()
Getter for the field
inErrors. |
String[] |
getIPv4addr()
The Internet Protocol (IP) v4 address.
|
String[] |
getIPv6addr()
The Internet Protocol (IP) v6 address.
|
String |
getMacaddr()
The Media Access Control (MAC) address.
|
int |
getMTU()
The interface Maximum Transmission Unit (MTU).
|
String |
getName()
Interface name.
|
long |
getOutErrors()
Getter for the field
outErrors. |
long |
getPacketsRecv()
Getter for the field
packetsRecv. |
long |
getPacketsSent()
Getter for the field
packetsSent. |
long |
getSpeed()
Getter for the field
speed. |
long |
getTimeStamp()
Getter for the field
timeStamp. |
NetworkInterface |
queryNetworkInterface()
The NetworkInterface object.
|
void |
setBytesRecv(long bytesRecv)
Setter for the field
bytesRecv. |
void |
setBytesSent(long bytesSent)
Setter for the field
bytesSent. |
void |
setInErrors(long inErrors)
Setter for the field
inErrors. |
void |
setNetworkInterface(NetworkInterface networkInterface)
Sets the network interface and calculates other information derived from it
|
void |
setOutErrors(long outErrors)
Setter for the field
outErrors. |
void |
setPacketsRecv(long packetsRecv)
Setter for the field
packetsRecv. |
void |
setPacketsSent(long packetsSent)
Setter for the field
packetsSent. |
void |
setSpeed(long speed)
Setter for the field
speed. |
void |
setTimeStamp(long timeStamp)
Setter for the field
timeStamp. |
String |
toString() |
void |
updateAttributes()
Updates interface network statistics on this interface.
|
public NetworkInterface queryNetworkInterface()
The NetworkInterface object.
NetworkInterface.public void setNetworkInterface(NetworkInterface networkInterface)
networkInterface - The network interface to setpublic String getName()
Interface name.
public String getDisplayName()
Interface description.
public int getMTU()
The interface Maximum Transmission Unit (MTU).
NetworkIF is instantiated and may not be up to
date. To update this value, execute the
setNetworkInterface(NetworkInterface) methodpublic String getMacaddr()
The Media Access Control (MAC) address.
NetworkIF is instantiated and may not be up to
date. To update this value, execute the
setNetworkInterface(NetworkInterface) methodpublic String[] getIPv4addr()
The Internet Protocol (IP) v4 address.
NetworkIF is instantiated and may not be up to
date. To update this value, execute the
setNetworkInterface(NetworkInterface) methodpublic String[] getIPv6addr()
The Internet Protocol (IP) v6 address.
NetworkIF is instantiated and may not be up to
date. To update this value, execute the
setNetworkInterface(NetworkInterface) methodpublic long getBytesRecv()
Getter for the field bytesRecv.
NetworkIF is instantiated and may not be up to
date. To update this value, execute the updateAttributes()
methodpublic void setBytesRecv(long bytesRecv)
Setter for the field bytesRecv.
bytesRecv - Set Bytes Receivedpublic long getBytesSent()
Getter for the field bytesSent.
NetworkIF is instantiated and may not be up to
date. To update this value, execute the updateAttributes()
methodpublic void setBytesSent(long bytesSent)
Setter for the field bytesSent.
bytesSent - Set the Bytes Sentpublic long getPacketsRecv()
Getter for the field packetsRecv.
NetworkIF is instantiated and may not be up to
date. To update this value, execute the updateAttributes()
methodpublic void setPacketsRecv(long packetsRecv)
Setter for the field packetsRecv.
packetsRecv - Set The Packets Receivedpublic long getPacketsSent()
Getter for the field packetsSent.
NetworkIF is instantiated and may not be up to
date. To update this value, execute the updateAttributes()
methodpublic void setPacketsSent(long packetsSent)
Setter for the field packetsSent.
packetsSent - Set The Packets Sentpublic long getInErrors()
Getter for the field inErrors.
NetworkIF is instantiated and may not be up to
date. To update this value, execute the updateAttributes()
methodpublic void setInErrors(long inErrors)
Setter for the field inErrors.
inErrors - The Input Errors to set.public long getOutErrors()
Getter for the field outErrors.
NetworkIF is instantiated and may not be up to
date. To update this value, execute the updateAttributes()
methodpublic void setOutErrors(long outErrors)
Setter for the field outErrors.
outErrors - The Output Errors to set.public long getSpeed()
Getter for the field speed.
NetworkIF is instantiated and may
not be up to date. To update this value, execute the
updateAttributes() methodpublic void setSpeed(long speed)
Setter for the field speed.
speed - Set the speed of the network interfacepublic long getTimeStamp()
Getter for the field timeStamp.
public void setTimeStamp(long timeStamp)
Setter for the field timeStamp.
timeStamp - The timeStamp to set.public void updateAttributes()
Copyright © 2019. All rights reserved.