public interface NetworkInterfaceManagementMBean
Modifier and Type | Field and Description |
---|---|
static String |
SIS_MANAGEMENT_TYPE |
Modifier and Type | Method and Description |
---|---|
ObjectName |
addDefaultRoute(NetworkInterfaceType type,
String interfaceName)
Add a default route to the SIS.
|
ObjectName |
addRoute(NetworkInterfaceType type,
String rule,
String interfaceName,
int position)
Add a new network route in the SIS.
|
ObjectName |
createNetworkInterfaceDefinition(String name,
NetworkInterfaceType type,
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(NetworkInterfaceType type)
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(NetworkInterfaceType type,
int position)
Get the JMX Object Name for a network route.
|
TabularData |
getRoutes(NetworkInterfaceType type)
Get information about network routes in the SIS.
|
CompositeData |
getSupportedNetworkInterfaceProperties()
Get the network interface properties that are supported by this SIS instance.
|
void |
removeDefaultRoute(NetworkInterfaceType type)
Remove a default route from the SIS.
|
void |
removeNetworkInterfaceDefinition(String name)
Remove a network interface definition from the SIS.
|
void |
removeRoute(NetworkInterfaceType type,
int position)
Remove an existing network route from the SIS.
|
static final String SIS_MANAGEMENT_TYPE
ObjectName createNetworkInterfaceDefinition(String name, NetworkInterfaceType type, Map<String,String> properties) throws NullPointerException, InvalidArgumentException, AlreadyDeployedException, InvalidConfigurationException, ManagementException
name
- a unique name for the interface.type
- the network interface type, IN
or SIP
.properties
- a map of property names and values.NetworkInterfaceDefinitionMBean
used to manage the network interface definition.NullPointerException
- if any argument is null
.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.ObjectName getNetworkInterfaceDefinition(String name) throws NullPointerException, UnrecognizedComponentException, ManagementException
name
- the network interface name.NetworkInterfaceDefinitionMBean
used to manage the network interface definition.NullPointerException
- if name
is null
.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.void removeNetworkInterfaceDefinition(String name) throws NullPointerException, UnrecognizedComponentException, InvalidStateException, ManagementException
name
- the network interface name.NullPointerException
- if name
is null
.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.String[] getNetworkInterfaceDefinitions() throws ManagementException
ManagementException
- if the operation could not be completed due to a system-level failure.void enableNetworkInterface(String name) throws NullPointerException, UnrecognizedComponentException, InvalidStateException, ManagementException
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.
name
- the network interface name.NullPointerException
- if name
is null
.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.void disableNetworkInterface(String name) throws NullPointerException, UnrecognizedComponentException, InvalidStateException, ManagementException
name
- the network interface name.NullPointerException
- if name
is null
.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.String[] getEnabledNetworkInterfaces() throws ManagementException
ManagementException
- if the operation could not be completed due to a system-level failure.CompositeData getSupportedNetworkInterfaceProperties() throws ManagementException
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.
ManagementException
ObjectName addRoute(NetworkInterfaceType type, String rule, String interfaceName, int position) throws NullPointerException, InvalidArgumentException, UnrecognizedComponentException, AlreadyDeployedException, InvalidStateException, ManagementException
Rules are of the format "<type> [<value>]":
type
- the network interface type, IN
or SIP
.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.NetworkRouteMBean
used to manage the network route.NullPointerException
- if type
, rule
, or interfaceName
is null
.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.ObjectName getRoute(NetworkInterfaceType type, int position) throws UnrecognizedComponentException, ManagementException
type
- the network interface type, IN
or SIP
.position
- the route list position to get.NetworkRouteMBean
used to manage the network route.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.void removeRoute(NetworkInterfaceType type, int position) throws NullPointerException, InvalidArgumentException, ManagementException
type
- the network interface type, IN
or SIP
.position
- the route list position to remove.NullPointerException
- if type
is null
.InvalidArgumentException
- if an invalid position is specified.ManagementException
- if the operation could not be completed due to a system-level failure.ObjectName addDefaultRoute(NetworkInterfaceType type, String interfaceName) throws NullPointerException, UnrecognizedComponentException, AlreadyDeployedException, InvalidStateException, ManagementException
type
- the network interface type, IN
or SIP
.interfaceName
- the name of the network interface to be used for the default route.NullPointerException
- if either argument is null
.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.ObjectName getDefaultRoute(NetworkInterfaceType type) throws UnrecognizedComponentException, ManagementException
type
- the network interface type, IN
or SIP
.NetworkRouteMBean
used to manage the network route.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.void removeDefaultRoute(NetworkInterfaceType type) throws NullPointerException, InvalidStateException, ManagementException
type
- the network interface type, IN
or SIP
.NullPointerException
- if type
is null
.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.TabularData getRoutes(NetworkInterfaceType type) throws NullPointerException, ManagementException
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. |
type
- the network interface type, IN
or SIP
.TabularData
object as described above.NullPointerException
- if type
is null
.ManagementException
- if the operation could not be completed due to a system-level failure.