Interface NetworkRouteMBean
-
public interface NetworkRouteMBeanManagement interface for querying and updating a network route in the SIS.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSIS_MANAGEMENT_TYPE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetInterfaceName()Get the name of the network interface used by this route.intgetPosition()Get the current position of the route within the routing table.StringgetRule()Get the rule required to match for this route to be selected.booleanisDefaultRoute()Determine if this route represents a default route.voidremove()Remove this network route from the SIS.voidreposition(int newPosition)Move the route to a new position within the route list.voidsetInterfaceName(String interfaceName)Set the name of the network interface to be used by this rule.voidsetRule(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
nullif 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- ifruleisnull.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- ifinterfaceNameisnull.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 ManagementExceptionGet 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 ManagementExceptionMove 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 ManagementExceptionDetermine if this route represents a default route.- Returns:
trueif this is a default route,falseotherwise.- Throws:
ManagementException- if the operation could not be completed due to a system-level failure.
-
remove
void remove() throws ManagementException, InvalidStateExceptionRemove 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.
-
-