|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.foxsmart.csu.config.CiscoRouterConfigParser
com.foxsmart.csu.config.CiscoRouterConfigComponent
com.foxsmart.csu.config.global.interfacepkg.RateLimitComponent
public class RateLimitComponent
The RateLimitComponent class defines a series of rate limits on an interface.
| Field Summary | |
|---|---|
static java.lang.String |
RATE_LIMIT
|
| Fields inherited from class com.foxsmart.csu.config.CiscoRouterConfigComponent |
|---|
commentComponent, componentMap, log, parentComponent |
| Fields inherited from class com.foxsmart.csu.config.CiscoRouterConfigParser |
|---|
NO, tokenIndex |
| Constructor Summary | |
|---|---|
RateLimitComponent()
Constructs an IP Rate Limit component object. |
|
| Method Summary | |
|---|---|
void |
addRateLimit(RateLimitEntry rateLimitEntry)
Adds a rate limit. |
java.util.List |
buildFromIos(java.util.List configLines)
Parse and populate the specific CiscoRouterComponent object based on the passed in individual lines of the IOS configuration. |
void |
clearAllRateLimits()
Clears all of the rate limits. |
Commands |
generateDeleteIos(CiscoRouterConfig updatedCiscoRouterConfig)
Generates the IOS configuration commands to delete this component. |
Commands |
generateIos()
Returns the IOS configuration commands for this component. |
protected Commands |
generateMultiLineUpdateConfiglet(CiscoRouterConfigComponent origComponent)
Generates the IOS commands that will handle the updating of a multi-line component. |
java.util.List |
getRateLimits()
Returns a list of all RateLimitEntry objects that have been added. |
java.util.List |
getSortedRateLimits()
Returns a sorted list of all the RateLimitEntry objects that have been added. |
boolean |
removeRateLimit(RateLimitEntry rateLimitEntry)
Removes a previously added rate limit. |
void |
validate()
Validates this object to ensure it contains a valid IOS configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RATE_LIMIT
| Constructor Detail |
|---|
public RateLimitComponent()
| Method Detail |
|---|
public void addRateLimit(RateLimitEntry rateLimitEntry)
rateLimitEntry - The rate limit entry to add.public java.util.List getRateLimits()
public java.util.List getSortedRateLimits()
public void clearAllRateLimits()
public boolean removeRateLimit(RateLimitEntry rateLimitEntry)
rateLimitEntry - The rate limit to remove.
List.remove(Object).
public java.util.List buildFromIos(java.util.List configLines)
throws InvalidConfigurationException
CiscoRouterConfigComponent
buildFromIos in class CiscoRouterConfigComponentconfigLines - The list of IOS configuration lines.
InvalidConfigurationException - if the IOS configuration can not be parsed for any reason.CiscoRouterConfigComponent
public void validate()
throws InvalidConfigurationException
CiscoRouterConfigComponent
validate in class CiscoRouterConfigComponentInvalidConfigurationException - if the configuration is invalid.CiscoRouterConfigComponent
public Commands generateIos()
throws InvalidConfigurationException
CiscoRouterConfigComponent
generateIos in class CiscoRouterConfigComponentInvalidConfigurationException - if the IOS configuration is invalid and the IOS string can not be generated.
The validate() method is used to determine if the configuration is valid.CiscoRouterConfigComponent
public Commands generateDeleteIos(CiscoRouterConfig updatedCiscoRouterConfig)
throws InvalidConfigurationException
CiscoRouterConfigComponent
generateDeleteIos in interface MultiLineComponentgenerateDeleteIos in class CiscoRouterConfigComponentupdatedCiscoRouterConfig - the updated Cisco router configuration.
InvalidConfigurationException - if the IOS configuration is invalid and the IOS string can not be generated.
The validate() method is used to determine if the configuration is valid.MultiLineComponent
protected Commands generateMultiLineUpdateConfiglet(CiscoRouterConfigComponent origComponent)
throws InvalidConfigurationException
CiscoRouterConfigComponent
generateMultiLineUpdateConfiglet in class CiscoRouterConfigComponentorigComponent - The original component.
InvalidConfigurationException - if either this or the passed in configuration are invalid.CiscoRouterConfigComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||