|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface INetworkUtilityService
Utilities to check the status of a network link
| Field Summary | |
|---|---|
static java.lang.String |
SERVICE_NAME
service name of this interface for the bundle activator (com.esf.util.net.service) |
| Method Summary | |
|---|---|
java.lang.String |
calculateBroadcast(java.lang.String ipAddress,
java.lang.String netmask)
calculates the broadcast based on an IP address and subnet mask |
java.lang.String |
calculateNetwork(java.lang.String ipAddress,
java.lang.String netmask)
calculates the network based on an IP address and subnet mask |
boolean |
canPing(java.lang.String ipAddress,
int count)
pings a peer address a number of times. |
java.lang.String[] |
getAllInterfaceNames()
gets the interface names as would be shown by the output of ifconfig -a |
java.lang.String |
getBroadcastAddress(java.lang.String ifaceName)
gets the broadcast address for a specified interface. |
INetworkInterface |
getIface(java.lang.String name)
gets the interface with the supplied name |
java.lang.String[] |
getInterfaceNames()
gets the interface names as would be shown by the output of ifconfig |
java.lang.String |
getIpAddress(java.lang.String ifaceName)
gets the IP address for a specified interface. |
java.lang.String |
getMacAddress(java.lang.String ifaceName)
gets the MAC address for a specified interface. |
java.lang.String |
getNetmask(java.lang.String ifaceName)
gets the netmask for a specified interface. |
int |
getNetmaskIntForm(java.lang.String netmask)
gets the integer representation of the netmask (i.e. |
boolean |
isLinkUp(java.lang.String ifaceName)
checks to see if a valid link is present |
boolean |
isUp(java.lang.String ifaceName)
checks to see if an interface is 'up' |
| Field Detail |
|---|
static final java.lang.String SERVICE_NAME
| Method Detail |
|---|
java.lang.String[] getInterfaceNames()
java.lang.String[] getAllInterfaceNames()
boolean isUp(java.lang.String ifaceName)
ifaceName - the interface to check
java.lang.String getIpAddress(java.lang.String ifaceName)
ifaceName - the interface to get the IP address of
java.lang.String getNetmask(java.lang.String ifaceName)
ifaceName - the interface to get the netmask of
java.lang.String getBroadcastAddress(java.lang.String ifaceName)
ifaceName - the interface to get the broadcast address of
boolean isLinkUp(java.lang.String ifaceName)
ifaceName - the interface to check
java.lang.String getMacAddress(java.lang.String ifaceName)
ifaceName - the interface to get the MAC address of
java.lang.String calculateNetwork(java.lang.String ipAddress,
java.lang.String netmask)
ipAddress - the IP address to use as a base for the calculationnetmask - the network mask to use as a base for the calculation
java.lang.String calculateBroadcast(java.lang.String ipAddress,
java.lang.String netmask)
ipAddress - the IP address to use as a base for the calculationnetmask - the network mask to use as a base for the calculation
int getNetmaskIntForm(java.lang.String netmask)
throws java.lang.Exception
netmask - the netmask to convert it 'dotted notation' (i.e. 255.255.255.0)
java.lang.Exception - if the passed in subnet mask is invalid
boolean canPing(java.lang.String ipAddress,
int count)
ipAddress - the IP Address to pingcount - the number of times to try to ping the peer
INetworkInterface getIface(java.lang.String name)
ifaceName - the interface to get
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||