com.foxsmart.csu.config.global.mapclassframerelay
Class FrameRelayMincirComponent

java.lang.Object
  extended by com.foxsmart.csu.config.CiscoRouterConfigParser
      extended by com.foxsmart.csu.config.CiscoRouterConfigComponent
          extended by com.foxsmart.csu.config.global.mapclassframerelay.FrameRelayMincirComponent
All Implemented Interfaces:
MultiInstanceComponent, java.io.Serializable

public class FrameRelayMincirComponent
extends CiscoRouterConfigComponent
implements MultiInstanceComponent

The frame relay Minimum CIR class sets the minimum acceptable Committed Information Rate (CIR). The default is 56000 bps.

See Also:
Serialized Form

Field Summary
static java.lang.String DIRECTION_BOTH
          The Min CIR applies to both input and output.
static java.lang.String DIRECTION_IN
          The Min CIR applies only to input.
static java.lang.String DIRECTION_OUT
          The Min CIR applies only to output.
static java.lang.String FRAME_RELAY
           
static java.lang.String IN
           
static java.lang.Integer MAX_CIR
          The maximum CIR.
static java.lang.Integer MIN_CIR
          The minimum CIR.
static java.lang.String MINCIR
           
static java.lang.String OUT
           
 
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
FrameRelayMincirComponent()
          Constructs a frame relay minimum CIR object.
 
Method Summary
 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.
 boolean equalsComponentInstance(CiscoRouterConfigComponent component)
          Determines if this component and the passed in component are the same instance of component that can be compared from an IOS configuration standpoint.
 Commands generateIos()
          Returns the IOS configuration commands for this component.
protected  java.lang.String generateUniqueHeaderInfo()
          Generates the IOS header that makes each component unique.
 java.lang.String getDirection()
          Gets the direction.
 java.lang.Integer getMinCir()
          Gets the minimum acceptable committed information rate (CIR).
 void setDirection(java.lang.String direction)
          Sets the direction.
 void setMinCir(java.lang.Integer minCir)
          Sets the minimum accepted committed information rate (CIR).
 void validate()
          Validates this object to ensure it contains a valid IOS configuration.
 
Methods inherited from class com.foxsmart.csu.config.CiscoRouterConfigComponent
addComponent, addComponent, checkComponentType, deleteOldConfigWhenUpdating, dumpComponents, generateChildrenUpdateConfiglet, generateCompositeIos, generateCompositeIos, generateDeleteIos, generateIos, generateIos, generateIos, generateMultiLineUpdateConfiglet, generateUpdateCompositeIos, generateUpdateIos, generateUpdateIos, getAllComponents, getCiscoRouterConfig, getComment, getComponentClassName, getComponentClassName, getComponentKeys, getComponents, getComponents, getDeferredDelete, getFirstComponent, getFirstComponent, getParentComponent, getTotalComponents, getTotalComponents, getUpdateConfiglet, instantiateComponent, instantiateComponent, isValid, removeAllComponents, removeAllComponents, removeAllComponents, removeComponent, removeComponent, removeComponent, requiresCommentSeparator, setComment, setParentComponent, validateChildren
 
Methods inherited from class com.foxsmart.csu.config.CiscoRouterConfigParser
checkExists, checkLineComplete, checkNotEmpty, checkRange, checkTokenCount, checkTokenCount, checkTokenMatch, checkTokenMatch, decrementTokenIndex, generateCommands, getBigDecimalNumberFromString, getDoubleNumberFromString, getEnum, getHexadecimalNumberFromString, getIntegerNumberFromString, getIpAddressFromString, getLine, getLongNumberFromString, getMacAddressFromString, getNextOptionalToken, getNextToken, getToken, getTokenIndex, getTokens, getTotalIndentedLines, getTotalLines, incrementTokenIndex, invalidConfiguration, invalidTokenFound, isEmpty, moreIndentedLines, moreLines, moreTokens, removeLines, resetTokenIndex, setTokenIndex, tokensLeft
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.foxsmart.csu.config.MultiInstanceComponent
requiresCommentSeparator
 

Field Detail

FRAME_RELAY

public static final java.lang.String FRAME_RELAY
See Also:
Constant Field Values

MINCIR

public static final java.lang.String MINCIR
See Also:
Constant Field Values

OUT

public static final java.lang.String OUT
See Also:
Constant Field Values

IN

public static final java.lang.String IN
See Also:
Constant Field Values

DIRECTION_BOTH

public static final java.lang.String DIRECTION_BOTH
The Min CIR applies to both input and output.

See Also:
Constant Field Values

DIRECTION_IN

public static final java.lang.String DIRECTION_IN
The Min CIR applies only to input.

See Also:
Constant Field Values

DIRECTION_OUT

public static final java.lang.String DIRECTION_OUT
The Min CIR applies only to output.

See Also:
Constant Field Values

MIN_CIR

public static final java.lang.Integer MIN_CIR
The minimum CIR.


MAX_CIR

public static final java.lang.Integer MAX_CIR
The maximum CIR.

Constructor Detail

FrameRelayMincirComponent

public FrameRelayMincirComponent()
Constructs a frame relay minimum CIR object.

Method Detail

setMinCir

public void setMinCir(java.lang.Integer minCir)
Sets the minimum accepted committed information rate (CIR). Valid values are from 1000-45000000.

Parameters:
minCir - The minimum committed information rate.

getMinCir

public java.lang.Integer getMinCir()
Gets the minimum acceptable committed information rate (CIR).

Returns:
the minimum committed information rate.

setDirection

public void setDirection(java.lang.String direction)
Sets the direction. This should be one of the following constants: DIRECTION_OUT or DIRECTION_BOTH.

Parameters:
direction - The direction.

getDirection

public java.lang.String getDirection()
Gets the direction.

Returns:
the direction.

buildFromIos

public java.util.List buildFromIos(java.util.List configLines)
                            throws InvalidConfigurationException
Description copied from class: CiscoRouterConfigComponent
Parse and populate the specific CiscoRouterComponent object based on the passed in individual lines of the IOS configuration. The passed in configuration lines should represent the first line in the configuration that applies to the specific component. The component should use all lines needed by its specific part of the configuration and return a List with the remaining lines that are not part of the component's configuration.

Specified by:
buildFromIos in class CiscoRouterConfigComponent
Parameters:
configLines - The list of IOS configuration lines.
Returns:
The rest of the lines that were not parsed by the component.
Throws:
InvalidConfigurationException - if the IOS configuration can not be parsed for any reason.
See Also:
CiscoRouterConfigComponent

validate

public void validate()
              throws InvalidConfigurationException
Description copied from class: CiscoRouterConfigComponent
Validates this object to ensure it contains a valid IOS configuration.

Specified by:
validate in class CiscoRouterConfigComponent
Throws:
InvalidConfigurationException - if the configuration is invalid.
See Also:
CiscoRouterConfigComponent

generateIos

public Commands generateIos()
                     throws InvalidConfigurationException
Description copied from class: CiscoRouterConfigComponent
Returns the IOS configuration commands for this component.

Specified by:
generateIos in class CiscoRouterConfigComponent
Returns:
The IOS configuration string as a list of Command objects. To generate a configlet from the list of Command objects, use Command.getConfiglet().
Throws:
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.
See Also:
CiscoRouterConfigComponent

generateUniqueHeaderInfo

protected java.lang.String generateUniqueHeaderInfo()
Generates the IOS header that makes each component unique.

Returns:
the unique header info.

equalsComponentInstance

public boolean equalsComponentInstance(CiscoRouterConfigComponent component)
                                throws InvalidConfigurationException
Determines if this component and the passed in component are the same instance of component that can be compared from an IOS configuration standpoint.

Specified by:
equalsComponentInstance in interface MultiInstanceComponent
Parameters:
component - The component to compare to this component.
Returns:
True if the components are of the same instance or false if not.
Throws:
InvalidConfigurationException - if either this or the passed in component aren't valid.


Copyright © 2005-2008 Fox Smart, Inc. All Rights Reserved.