com.foxsmart.csu.config.global
Class SmallServers

java.lang.Object
  extended by com.foxsmart.csu.config.CiscoRouterConfigParser
      extended by com.foxsmart.csu.config.global.SmallServers
All Implemented Interfaces:
java.io.Serializable

public class SmallServers
extends CiscoRouterConfigParser

The SmallServers class represents small server configurations. A small server configuration can optionally have a max servers setting.

See Also:
Serialized Form

Field Summary
 java.lang.Integer MAX_MAX_SERVERS
          The high range of max servers.
static java.lang.String MAX_SERVERS
           
 java.lang.Integer MIN_MAX_SERVERS
          The low range of max servers.
static java.lang.String NO_LIMIT
           
 
Fields inherited from class com.foxsmart.csu.config.CiscoRouterConfigParser
log, NO, tokenIndex
 
Constructor Summary
SmallServers()
          Constructs a SmallServers object.
 
Method Summary
 java.lang.String generateIos()
          Generates an IOS string for the timestamp portion of a line.
 java.lang.Integer getMaxServers()
          Gets the max servers.
 void setMaxServers(java.lang.Integer maxServers)
          Sets the max servers.
 void validate()
          Validates that the SmallServers object is valid.
 
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
 

Field Detail

MIN_MAX_SERVERS

public java.lang.Integer MIN_MAX_SERVERS
The low range of max servers.


MAX_MAX_SERVERS

public java.lang.Integer MAX_MAX_SERVERS
The high range of max servers.


MAX_SERVERS

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

NO_LIMIT

public static final java.lang.String NO_LIMIT
See Also:
Constant Field Values
Constructor Detail

SmallServers

public SmallServers()
Constructs a SmallServers object. By default, the max servers is set to null.

Method Detail

setMaxServers

public void setMaxServers(java.lang.Integer maxServers)
                   throws InvalidConfigurationException
Sets the max servers.

Parameters:
maxServers - If null, no max server information is set. If 0, there is no limit for max servers. Otherwise, the number of max servers between 1 and 2147483647.
Throws:
InvalidConfigurationException - if the max servers parameter is out of range.

getMaxServers

public java.lang.Integer getMaxServers()
Gets the max servers. Null indicates that max server information is not set. 0 indicates that there is no limit. Any other value is the number of max servers.

Returns:
The max servers.

validate

public void validate()
              throws InvalidConfigurationException
Validates that the SmallServers object is valid.

Throws:
InvalidConfigurationException - if the configuration is invalid.

generateIos

public java.lang.String generateIos()
                             throws InvalidConfigurationException
Generates an IOS string for the timestamp portion of a line.

Returns:
The IOS string for this component.
Throws:
InvalidConfigurationException - if any of the configuration elements are not valid.


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