Interface NetworkRouteMBean
-
public interface NetworkRouteMBean
Management interface for querying and updating a network route 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 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.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.
-
-
-
Field Detail
-
SIS_MANAGEMENT_TYPE
static final String SIS_MANAGEMENT_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRule
String getRule() throws ManagementException
Get the rule required to match for this route to be selected.- Returns:
- the rule, or
null
if this route represents the default route (which has no rule). - Throws:
ManagementException
- if the operation could not be completed due to a system-level failure.
-
setRule
void setRule(String rule) throws NullPointerException, InvalidStateException, InvalidArgumentException, AlreadyDeployedException, ManagementException
Update the rule for this route. Rule format for different protocols is described in subclasses ofNetworkInterfaceManagementMBean.addRoute(java.lang.String, java.lang.String, int)
.- Parameters:
rule
- the rule to match for this route to be selected.- Throws:
NullPointerException
- ifrule
isnull
.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.
-
getInterfaceName
String getInterfaceName() throws ManagementException
Get the name of the network interface used by this route.- Returns:
- the network interface name.
- Throws:
ManagementException
- if the operation could not be completed due to a system-level failure.
-
setInterfaceName
void setInterfaceName(String interfaceName) throws NullPointerException, UnrecognizedComponentException, InvalidStateException, AlreadyDeployedException, ManagementException
Set the name of the network interface to be used by this rule.- Parameters:
interfaceName
- the network interface name.- Throws:
NullPointerException
- ifinterfaceName
isnull
.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.
-
getPosition
int getPosition() throws ManagementException
Get the current position of the route within the routing table. Network routes are always evaluated in position order. Note that the position of a route may change over time as new routes are added or existing routes are removed.The default route has a position equal to
Integer.MAX_VALUE
.- Returns:
- the current position of the route.
- Throws:
ManagementException
- if the operation could not be completed due to a system-level failure.
-
reposition
void reposition(int newPosition) throws ManagementException
Move the route to a new position within the route list.- Parameters:
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.- Throws:
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.
-
isDefaultRoute
boolean isDefaultRoute() throws ManagementException
Determine if this route represents a default route.- Returns:
true
if this is a default route,false
otherwise.- Throws:
ManagementException
- if the operation could not be completed due to a system-level failure.
-
remove
void remove() throws ManagementException, InvalidStateException
Remove this network route from the SIS.- Throws:
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.
-
-