SSF.OS.OSPFv2.test
Class Configurator

java.lang.Object
  |
  +--SSF.OS.ProtocolSession
        |
        +--SSF.OS.OSPFv2.test.Configurator
All Implemented Interfaces:
com.renesys.raceway.DML.Configurable

public class Configurator
extends SSF.OS.ProtocolSession

Implements a pseudo-protocol, which updates an OSPF session at times, configured in the DML file. The utility can be configured as follows:

   ProtocolSession[ name configurator use SSF.OS.OSPF.test.Configurator 
       update [
           time 


Inner Class Summary
 class Configurator.UpdateEvent
          Container class for a single update event
 
Field Summary
private  java.lang.String[] area_values
          the configuration keys for an OSPF area configuration
private  java.util.Vector configEvents
          the configuration events
private  java.util.Enumeration EventQueue
          the queue with pending events
private  java.lang.String[] if_values
          the configuration keys for an OSPF interface configuration
private  SSF.OS.ProtocolSession ospfSession
          reference to the associated ospf-session
private  Configurator.UpdateEvent pendingEvent
          the event, which is coming up next
private  SSF.OS.Timer timer
          the event timer
 
Fields inherited from class SSF.OS.ProtocolSession
inGraph, name, use
 
Constructor Summary
Configurator()
          Constructor
 
Method Summary
 void config(com.renesys.raceway.DML.Configuration cfg)
          Configures this ProtocolSession according to the DML config
private  Configurator.UpdateEvent getNextEvent()
          Receives the next event from the event queue
 void init()
          Initializes the Configurator and starts all timers
 boolean push(SSF.OS.ProtocolMessage message, SSF.OS.ProtocolSession fromSession)
          push method - must be implemented, since this is a ProtocolSession.
private  void sendMessage(com.renesys.raceway.DML.Configuration cfgUpdate)
          Sends a configuration update to OSPF
private  void timerEvent()
          The callback method of the timer
 
Methods inherited from class SSF.OS.ProtocolSession
close, closed, debugIdentifier, inGraph, open, opened, pushAfterDelay, pushAfterDelayFailed, setGraph, version
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

ospfSession

private SSF.OS.ProtocolSession ospfSession
reference to the associated ospf-session

configEvents

private java.util.Vector configEvents
the configuration events

EventQueue

private java.util.Enumeration EventQueue
the queue with pending events

pendingEvent

private Configurator.UpdateEvent pendingEvent
the event, which is coming up next

timer

private SSF.OS.Timer timer
the event timer

area_values

private java.lang.String[] area_values
the configuration keys for an OSPF area configuration

if_values

private java.lang.String[] if_values
the configuration keys for an OSPF interface configuration
Constructor Detail

Configurator

public Configurator()
Constructor
Method Detail

config

public void config(com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
Configures this ProtocolSession according to the DML config
Overrides:
config in class SSF.OS.ProtocolSession

init

public void init()
          throws SSF.OS.ProtocolException
Initializes the Configurator and starts all timers
Overrides:
init in class SSF.OS.ProtocolSession

getNextEvent

private Configurator.UpdateEvent getNextEvent()
Receives the next event from the event queue

timerEvent

private void timerEvent()
The callback method of the timer

sendMessage

private void sendMessage(com.renesys.raceway.DML.Configuration cfgUpdate)
                  throws SSF.OS.ProtocolException
Sends a configuration update to OSPF

push

public boolean push(SSF.OS.ProtocolMessage message,
                    SSF.OS.ProtocolSession fromSession)
             throws SSF.OS.ProtocolException
push method - must be implemented, since this is a ProtocolSession. This method must never be called.
Overrides:
push in class SSF.OS.ProtocolSession