com.foxsmart.csu.example
Class NoRouterExample

java.lang.Object
  extended by com.foxsmart.csu.example.NoRouterExample
Direct Known Subclasses:
UpdateRouterBannersNR, UpdateStaticRouteNR

public abstract class NoRouterExample
extends java.lang.Object

The NoRouterExample provides a base class for CSU example programs that don't have access to a router but want to simulate communication with a router using a configuration that comes from a file.


Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
NoRouterExample()
           
 
Method Summary
protected static CiscoRouterConfig readRouterConfig(java.lang.String configFileName)
          Reads a router configuration from a file.
protected static void writeRouterConfig(CiscoRouterConfig routerConfig, java.lang.String configFile)
          Writes a router configuration to a file.
protected static void writeRouterConfig(java.lang.String routerConfig, java.lang.String configFile)
          Writes a router configuration in the form of a string to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
Constructor Detail

NoRouterExample

public NoRouterExample()
Method Detail

readRouterConfig

protected static CiscoRouterConfig readRouterConfig(java.lang.String configFileName)
                                             throws java.lang.Exception
Reads a router configuration from a file.

Parameters:
configFileName - the filename of the file that contains the router configuration.
Returns:
the router configuration.
Throws:
java.lang.Exception - if any problems were encountered.

writeRouterConfig

protected static void writeRouterConfig(CiscoRouterConfig routerConfig,
                                        java.lang.String configFile)
                                 throws java.lang.Exception
Writes a router configuration to a file.

Parameters:
routerConfig - the configuration to write.
configFile - the config file name.
Throws:
java.lang.Exception - if any problems were encountered.

writeRouterConfig

protected static void writeRouterConfig(java.lang.String routerConfig,
                                        java.lang.String configFile)
                                 throws java.lang.Exception
Writes a router configuration in the form of a string to a file.

Parameters:
routerConfig - the configuration to write in the form of a string.
configFile - the config file name.
Throws:
java.lang.Exception - if any problems were encountered.


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