| 
||||||||||
| 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  | 
 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.  | 
 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()
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
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
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||