Interface NetworkInterfaceManagementMBean
-
- All Known Subinterfaces:
INNetworkInterfaceManagementMBean
public interface NetworkInterfaceManagementMBean
Management interface for creating, removing and querying network interface definitions in the SIS.
-
-
Field Summary
Fields Modifier and Type Field Description static String
SIS_MANAGEMENT_TYPE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectName
addDefaultRoute(String interfaceName)
Add a default route to the SIS.ObjectName
addRoute(String rule, String interfaceName, int position)
Add a new network route in the SIS.ObjectName
createNetworkInterfaceDefinition(String name, Map<String,String> properties)
Create a new network interface definition in the SIS.void
disableNetworkInterface(String name)
Disable the network interface on this SIS instance.void
enableNetworkInterface(String name)
Enable the network interface on this SIS instance.ObjectName
getDefaultRoute()
Get the JMX Object Name for the default network route.String[]
getEnabledNetworkInterfaces()
Get the interfaces that are currently enabled on this SIS instance.ObjectName
getNetworkInterfaceDefinition(String name)
Get the JMX Object Name for a network interface definition.String[]
getNetworkInterfaceDefinitions()
Get the names of all network interfaces currently configured in the SIS.ObjectName
getRoute(int position)
Get the JMX Object Name for a network route.TabularData
getRoutes()
Get information about network routes in the SIS.CompositeData
getSupportedNetworkInterfaceProperties()
Get the network interface properties that are supported by this SIS instance.void
removeDefaultRoute()
Remove a default route from the SIS.void
removeNetworkInterfaceDefinition(String name)
Remove a network interface definition from the SIS.void
removeRoute(int position)
Remove an existing network route from the SIS.
-
-
-
Field Detail
-
SIS_MANAGEMENT_TYPE
static final String SIS_MANAGEMENT_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
createNetworkInterfaceDefinition
ObjectName createNetworkInterfaceDefinition(String name, Map<String,String> properties) throws NullPointerException, InvalidArgumentException, AlreadyDeployedException, InvalidConfigurationException, ManagementException
Create a new network interface definition in the SIS.- Parameters:
name
- a unique name for the interface.properties
- a map of property names and values.- Returns:
- the Object Name of a
NetworkInterfaceDefinitionMBean
used to manage the network interface definition. - Throws:
NullPointerException
- if any argument isnull
.InvalidArgumentException
- if unable to validate the interface properties.AlreadyDeployedException
- if an interface with the same name is already defined.InvalidConfigurationException
- if the SIS instance determines that the network interface configuration is not valid.ManagementException
- if the interface could not be created due to a system-level failure.
-
getNetworkInterfaceDefinition
ObjectName getNetworkInterfaceDefinition(String name) throws NullPointerException, UnrecognizedComponentException, ManagementException
Get the JMX Object Name for a network interface definition.- Parameters:
name
- the network interface name.- Returns:
- the Object Name of a
NetworkInterfaceDefinitionMBean
used to manage the network interface definition. - Throws:
NullPointerException
- ifname
isnull
.UnrecognizedComponentException
- if the interface name is not known.ManagementException
- if the Object Name for the interface could not be obtained due to a system-level failure.
-
removeNetworkInterfaceDefinition
void removeNetworkInterfaceDefinition(String name) throws NullPointerException, UnrecognizedComponentException, InvalidStateException, ManagementException
Remove a network interface definition from the SIS.- Parameters:
name
- the network interface name.- Throws:
NullPointerException
- ifname
isnull
.UnrecognizedComponentException
- if the interface name is not known.InvalidStateException
- if the interface cannot be removed because it is enabled on a SIS instance.ManagementException
- if the interface could not be removed due to a system-level failure.
-
getNetworkInterfaceDefinitions
String[] getNetworkInterfaceDefinitions() throws ManagementException
Get the names of all network interfaces currently configured in the SIS.- Returns:
- an array of network interface names, empty if no network interfaces exist.
- Throws:
ManagementException
- if the operation could not be completed due to a system-level failure.
-
enableNetworkInterface
void enableNetworkInterface(String name) throws NullPointerException, UnrecognizedComponentException, InvalidStateException, ManagementException
Enable the network interface on this SIS instance. Several interfaces may be enabled on a SIS instance at the same time, if the SIS implementation supports this.When this method is called, the SIS will verify the interface's properties, and throw
InvalidConfigurationException
if any properties are not valid.The SIS does not necessarily begin using the interface immediately - it may be necessary to reactivate the SIS before it can use the interface. See the SIS implementation's documentation for more information.
- Parameters:
name
- the network interface name.- Throws:
NullPointerException
- ifname
isnull
.UnrecognizedComponentException
- if the interface name is not known.InvalidStateException
- if the interface is already enabled on this SIS instance; or if it is enabled on another SIS instance; or the SIS cannot enable the interface in its current state.ManagementException
- if the operation could not be completed due to a system-level failure.
-
disableNetworkInterface
void disableNetworkInterface(String name) throws NullPointerException, UnrecognizedComponentException, InvalidStateException, ManagementException
Disable the network interface on this SIS instance. The SIS does not necessarily stop using the interface immediately - it may be necessary to deactivate the SIS for it to stop using the interface. See the SIS implementation's documentation for more information.- Parameters:
name
- the network interface name.- Throws:
NullPointerException
- ifname
isnull
.UnrecognizedComponentException
- if the interface name is not known.InvalidStateException
- if the SIS cannot disable the interface in its current state.ManagementException
- if the operation could not be completed due to a system-level failure.
-
getEnabledNetworkInterfaces
String[] getEnabledNetworkInterfaces() throws ManagementException
Get the interfaces that are currently enabled on this SIS instance.- Returns:
- an array of interface names, empty if no network interfaces are enabled on the SIS instance
- Throws:
ManagementException
- if the operation could not be completed due to a system-level failure.
-
getSupportedNetworkInterfaceProperties
CompositeData getSupportedNetworkInterfaceProperties() throws ManagementException
Get the network interface properties that are supported by this SIS instance.This method returns a CompositeData type where each key is a supported property name, and the corresponding value is a
String
description of that property.- Throws:
ManagementException
-
addRoute
ObjectName addRoute(String rule, String interfaceName, int position) throws NullPointerException, InvalidArgumentException, UnrecognizedComponentException, AlreadyDeployedException, InvalidStateException, ManagementException
Add a new network route in the SIS.Rules are of the format "<type> [<value>]".
- Parameters:
rule
- the rule to match for this route to be selected.interfaceName
- the name of the network interface to be used if this route is selected.position
- the list position to insert the route. A value less than or equal to zero inserts the new route at the beginning of the list. A value greater than or equal to the current number of routes adds the new route to the end of the list.- Returns:
- the Object Name of a
NetworkRouteMBean
used to manage the network route. - Throws:
NullPointerException
- ifrule
, orinterfaceName
isnull
.InvalidArgumentException
- if the rule is invalid.UnrecognizedComponentException
- if the interface name is not known.AlreadyDeployedException
- if an identical route already exists in the routing table.InvalidStateException
- if the specified network interface is not enabled on this SIS instance.ManagementException
- if the operation could not be completed due to a system-level failure.
-
getRoute
ObjectName getRoute(int position) throws UnrecognizedComponentException, ManagementException
Get the JMX Object Name for a network route.- Parameters:
position
- the route list position to get.- Returns:
- the Object Name of a
NetworkRouteMBean
used to manage the network route. - Throws:
UnrecognizedComponentException
- if a route does not exist in the specified position.ManagementException
- if the Object Name for the route could not be obtained due to a system-level failure.
-
removeRoute
void removeRoute(int position) throws InvalidArgumentException, ManagementException
Remove an existing network route from the SIS.- Parameters:
position
- the route list position to remove.- Throws:
InvalidArgumentException
- if an invalid position is specified.ManagementException
- if the operation could not be completed due to a system-level failure.
-
addDefaultRoute
ObjectName addDefaultRoute(String interfaceName) throws NullPointerException, UnrecognizedComponentException, AlreadyDeployedException, InvalidStateException, ManagementException
Add a default route to the SIS. At most one default route per network interface type can be specified at any one time.- Parameters:
interfaceName
- the name of the network interface to be used for the default route.- Throws:
NullPointerException
- if either argument isnull
.UnrecognizedComponentException
- if the interface name is not known.AlreadyDeployedException
- if a default route has already been specified for the network interface type.InvalidStateException
- if the specified network interface is not enabled on this SIS instance.ManagementException
- if the operation could not be completed due to a system-level failure.
-
getDefaultRoute
ObjectName getDefaultRoute() throws UnrecognizedComponentException, ManagementException
Get the JMX Object Name for the default network route.- Returns:
- the Object Name of a
NetworkRouteMBean
used to manage the network route. - Throws:
UnrecognizedComponentException
- if a default route does not exist.ManagementException
- if the Object Name for the route could not be obtained due to a system-level failure.
-
removeDefaultRoute
void removeDefaultRoute() throws InvalidStateException, ManagementException
Remove a default route from the SIS.- Throws:
InvalidStateException
- if a default route has not been specified for the network interface type.ManagementException
- if the operation could not be completed due to a system-level failure.
-
getRoutes
TabularData getRoutes() throws ManagementException
Get information about network routes in the SIS.This method returns TabularData with the following fields:
Field Open Type Description position Integer The list position of the route. rule String The route rule. interface String The name of the network interface selected by this route. - Returns:
- a
TabularData
object as described above. - Throws:
ManagementException
- if the operation could not be completed due to a system-level failure.
-
-