|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface INetworkDeviceService
Manages Network device configurations. This is an interface that is not directly implemented by any bundles. Instead this is extended by other interfaces such as the @IEthernetDeviceService and the @IWifiDeviceService which are then in turn implemented. Copyright � 2009 Eurotech Inc. All rights reserved.
Field Summary | |
---|---|
static java.lang.String |
SERVICE_NAME
Reports the class name representing this interface. |
static int |
TYPE_DHCP
Definition for an interface that uses DHCP for configuration |
static int |
TYPE_NULL
Definition for an interface that is not configured |
static int |
TYPE_STATIC
Definition for an interface that is statically configured |
Method Summary | |
---|---|
void |
bringInterfaceDown(NetworkDeviceContainer networkDeviceContainer)
Brings an interface down |
void |
bringInterfaceDown(java.lang.String ifaceName)
Brings an interface down |
void |
bringInterfaceUp(NetworkDeviceContainer device)
Brings an interface up using the parameters currently set. |
void |
bringInterfaceUp(java.lang.String ifaceName)
Brings an interface up using the parameters currently set. |
java.lang.String |
getBroadcast(java.lang.String iface)
Gets the broadcast address currently associated with this interface |
java.lang.String |
getGateway(java.lang.String iface)
Gets the gateway address currently associated with this interface |
java.util.ArrayList |
getIfaceNames()
Returns a list of interface names present on this system |
java.lang.String |
getIpAddress(java.lang.String iface)
Gets the IP address currently associated with this interface |
java.lang.String |
getMacAddress(java.lang.String ifaceName)
Gets the MAC address of a specified interfaces |
java.lang.String |
getNetmask(java.lang.String iface)
Gets the network mask currently associated with this interface |
java.lang.String |
getNetwork(java.lang.String iface)
Gets the network currently associated with this interface |
NetworkDeviceContainer |
getParameters(java.lang.String iface)
Gets all of the parameters that currently make up an EthernetDevice. |
java.lang.String |
getPrimaryDns(java.lang.String iface)
Gets the primary DNS address currently associated with this interface |
java.lang.String |
getSecondaryDns(java.lang.String iface)
Gets the secondary DNS address currently associated with this interface |
int |
getType(java.lang.String iface)
Gets the defined type (DHCP or STATIC) from the currently running configuration |
boolean |
isIfaceUp(java.lang.String iface)
Gets the state of an interface |
void |
setBroadcast(java.lang.String iface,
java.lang.String broadcast)
Sets the broadcast for an interface that has been defined to be statically defined. |
void |
setGateway(java.lang.String iface,
java.lang.String gateway)
Sets the default gateway for an interface that has been defined to be statically defined. |
void |
setIpAddress(java.lang.String iface,
java.lang.String ipAddress)
Sets the IP address for an interface that has been defined to be statically defined. |
void |
setNetmask(java.lang.String iface,
java.lang.String netmask)
Sets the network mask for an interface that has been defined to be statically defined. |
void |
setNetwork(java.lang.String iface,
java.lang.String network)
Sets the network definition for an interface that has been defined to be statically defined. |
void |
setPrimaryDns(java.lang.String iface,
java.lang.String primaryDns)
Sets the primary DNS for an interface that has been defined to be statically defined. |
void |
setSecondaryDns(java.lang.String iface,
java.lang.String secondaryDns)
Sets the secondary DNS for an interface that has been defined to be statically defined. |
void |
setToDhcp(java.lang.String iface)
Sets the method used to configure a particular interface to use either DHCP. |
void |
setToNull(java.lang.String iface)
Removes the configuration currently set and disables the interface. |
void |
setToStatic(java.lang.String iface,
java.lang.String ipAddress,
java.lang.String netmask,
java.lang.String network,
java.lang.String broadcast,
java.lang.String gateway,
java.lang.String primaryDns,
java.lang.String secondaryDns)
Sets the parameters of a statically defined interface. |
Field Detail |
---|
static final java.lang.String SERVICE_NAME
static final int TYPE_DHCP
static final int TYPE_STATIC
static final int TYPE_NULL
Method Detail |
---|
java.util.ArrayList getIfaceNames() throws java.lang.Exception
java.lang.Exception
- if the platform is improperly defined, not supported, or not definedvoid setToDhcp(java.lang.String iface) throws java.lang.Exception
iface
- the interface being set as either DHCP or static
java.lang.Exception
- if any parameters are invalid or the iface can not be foundvoid setToStatic(java.lang.String iface, java.lang.String ipAddress, java.lang.String netmask, java.lang.String network, java.lang.String broadcast, java.lang.String gateway, java.lang.String primaryDns, java.lang.String secondaryDns) throws java.lang.Exception
iface
- the interface to configureipAddress
- the static IP address to setnetmask
- the network mask to setnetwork
- the network to set (for example 192.168.1.0)broadcast
- the broadcast address to setgateway
- the gateway to useprimaryDns
- the primary DNS to usesecondaryDns
- the secondary DNS to use
java.lang.Exception
- if any parameters are invalidvoid setIpAddress(java.lang.String iface, java.lang.String ipAddress) throws java.lang.Exception
iface
- the interface to configureipAddress
- the new static IP address to set
java.lang.Exception
- if any parameters are invalid, if the interface to set is configured to use DHCPvoid setToNull(java.lang.String iface) throws java.lang.Exception
iface
- the interface which will have its current running configuration deleted
java.lang.Exception
- if the parameters are invalid.void setNetmask(java.lang.String iface, java.lang.String netmask) throws java.lang.Exception
iface
- the interface to configurenetmask
- the new network mask to use
java.lang.Exception
- if any parameters are invalid, if the interface to set is configured to use DHCPvoid setNetwork(java.lang.String iface, java.lang.String network) throws java.lang.Exception
iface
- the interface to configurenetwork
- the new network definition to use
java.lang.Exception
- if any parameters are invalid, if the interface to set is configured to use DHCPvoid setBroadcast(java.lang.String iface, java.lang.String broadcast) throws java.lang.Exception
iface
- the interface to configurebroadcast
- the new broadcast definition to use
java.lang.Exception
- if any parameters are invalid, if the interface to set is configured to use DHCPvoid setGateway(java.lang.String iface, java.lang.String gateway) throws java.lang.Exception
iface
- the interface to configuregateway
- the new gateway to use
java.lang.Exception
- if any parameters are invalid, if the interface to set is configured to use DHCPvoid setPrimaryDns(java.lang.String iface, java.lang.String primaryDns) throws java.lang.Exception
iface
- the interface to configureprimaryDns
- the new primary DNS to use
java.lang.Exception
- if any parameters are invalid, if the interface to set is configured to use DHCPvoid setSecondaryDns(java.lang.String iface, java.lang.String secondaryDns) throws java.lang.Exception
iface
- the interface to configuresecondaryDns
- the new secondary DNS to use
java.lang.Exception
- if any parameters are invalid, if the interface to set is configured to use DHCPint getType(java.lang.String iface) throws java.lang.Exception
iface
- the interface to get the type from
java.lang.Exception
- if there is an error, the type is not defined, or if the interface is not validNetworkDeviceContainer getParameters(java.lang.String iface) throws java.lang.Exception
iface
- the interface to get the configuration of
java.lang.Exception
- if there is an error, the type is not defined, or if the interface is not validjava.lang.String getIpAddress(java.lang.String iface) throws java.lang.Exception
iface
- the interface to get the IP address of
java.lang.Exception
- if there is an error, the type is not defined, or if the interface is not validjava.lang.String getNetmask(java.lang.String iface) throws java.lang.Exception
iface
- the interface to get the network mask of
java.lang.Exception
- if there is an error, the type is not defined, or if the interface is not validjava.lang.String getNetwork(java.lang.String iface) throws java.lang.Exception
iface
- the interface to get the network of
java.lang.Exception
- if there is an error, the type is not defined, or if the interface is not validjava.lang.String getBroadcast(java.lang.String iface) throws java.lang.Exception
iface
- the interface to get the broadcast address of
java.lang.Exception
- if there is an error, the type is not defined, or if the interface is not validjava.lang.String getGateway(java.lang.String iface) throws java.lang.Exception
iface
- the interface to get the gateway address of
java.lang.Exception
- if there is an error, the type is not defined, or if the interface is not validjava.lang.String getPrimaryDns(java.lang.String iface) throws java.lang.Exception
iface
- the interface to get the primary DNS address of
java.lang.Exception
- if there is an error, the type is not defined, or if the interface is not validjava.lang.String getSecondaryDns(java.lang.String iface) throws java.lang.Exception
iface
- the interface to get the secondary DNS address of
java.lang.Exception
- if there is an error, the type is not defined, or if the interface is not validvoid bringInterfaceUp(NetworkDeviceContainer device) throws java.lang.Exception
networkDevice
- the @NetworkDeviceContainer to bring up
java.lang.Exception
- if the iface is invalid or if the interface is not properly configuredvoid bringInterfaceUp(java.lang.String ifaceName) throws java.lang.Exception
ifaceName
- the interface name to bring up
java.lang.Exception
- if the iface is invalid or if the interface is not properly configuredvoid bringInterfaceDown(NetworkDeviceContainer networkDeviceContainer) throws java.lang.Exception
networkDeviceContainer
- the @NetworkDeviceContainer to bring down
java.lang.Exception
- if the iface is invalid or if the interface is not upvoid bringInterfaceDown(java.lang.String ifaceName) throws java.lang.Exception
ifaceName
- the interface name to bring down
java.lang.Exception
- if the ifaceName is invalid or if the interface is not upboolean isIfaceUp(java.lang.String iface) throws java.lang.Exception
iface
- the interface to check for its status
java.lang.Exception
- if the interface is invalidjava.lang.String getMacAddress(java.lang.String ifaceName) throws java.lang.Exception
ifaceName
- the interface to get the MAC id of
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |