public interface NetworkRouteMBean
Modifier and Type | Field and Description |
---|---|
static String |
SIS_MANAGEMENT_TYPE |
Modifier and Type | Method and Description |
---|---|
String |
getInterfaceName()
Get the name of the network interface used by this route.
|
int |
getPosition()
Get the current position of the route within the routing table.
|
String |
getRule()
Get the rule required to match for this route to be selected.
|
NetworkInterfaceType |
getType()
Get the type of this route.
|
boolean |
isDefaultRoute()
Determine if this route represents a default route.
|
void |
remove()
Remove this network route from the SIS.
|
void |
reposition(int newPosition)
Move the route to a new position within the route list.
|
void |
setInterfaceName(String interfaceName)
Set the name of the network interface to be used by this rule.
|
void |
setRule(String rule)
Update the rule for this route.
|
static final String SIS_MANAGEMENT_TYPE
NetworkInterfaceType getType() throws ManagementException
ManagementException
- if the operation could not be completed due to a system-level failure.String getRule() throws ManagementException
null
if this route represents the default route (which has no rule).ManagementException
- if the operation could not be completed due to a system-level failure.void setRule(String rule) throws NullPointerException, InvalidStateException, InvalidArgumentException, AlreadyDeployedException, ManagementException
Rules are of the format "<type> [<value>]":
rule
- the rule to match for this route to be selected.NullPointerException
- if rule
is null
.InvalidStateException
- if this route represents the default route. The default route has
no rule associated with it.InvalidArgumentException
- if the rule is invalid.AlreadyDeployedException
- if changing the route to use the specified rule would produce a route
that is identical to an existing route in the routing table.ManagementException
- if the operation could not be completed due to a system-level failure.String getInterfaceName() throws ManagementException
ManagementException
- if the operation could not be completed due to a system-level failure.void setInterfaceName(String interfaceName) throws NullPointerException, UnrecognizedComponentException, InvalidStateException, AlreadyDeployedException, ManagementException
interfaceName
- the network interface name.NullPointerException
- if interfaceName
is null
.UnrecognizedComponentException
- if the interface name is not known.InvalidStateException
- if the specified network interface is not enabled on this SIS instance.AlreadyDeployedException
- if changing the route to use the specified interface would produce a
route that is identical to an existing route in the routing table.ManagementException
- if the operation could not be completed due to a system-level failure.int getPosition() throws ManagementException
The default route has a position equal to Integer.MAX_VALUE
.
ManagementException
- if the operation could not be completed due to a system-level failure.void reposition(int newPosition) throws ManagementException
newPosition
- the route list position to move the route to. A value less than or equal to
zero moves the route to the beginning of the route list. A value greater than or equal to
the current number of routes moves the route to the end of the list.InvalidStateException
- if this route represents the default route. The default route cannot
be repositioned.ManagementException
- if the operation could not be completed due to a system-level failure.boolean isDefaultRoute() throws ManagementException
true
if this is a default route, false
otherwise.ManagementException
- if the operation could not be completed due to a system-level failure.void remove() throws ManagementException, InvalidStateException
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.