SSF.OS.OSPFv2.test
Class Reset

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

public class Reset
extends SSF.OS.ProtocolSession

Implements a pseudo-protocol, which restarts an OSPF router at given times. The protocol can be configured as follows:

   ProtocolSession[ name reset use SSF.OS.OSPF.test.Reset
       stop  10.0
       start 20.0
       stop  30.0
       start 40.0
       ...
   ]
 


Inner Class Summary
(package private)  class Reset.ResetTimer
          Stops and starts an OSPF session.
(package private)  class Reset.TimerConfiguration
          Holds the configuration of a single timer.
 
Field Summary
private  Logger log
          Logger for this class.
private  SSF.OS.ProtocolSession ospfSession
          Reference to the associated OSPF Session.
private static int START
          Indicates, that the OSPF session should be started.
private static int STOP
          Indicates, that the OSPF session should be stopped.
private  java.util.Vector timerConfig
          Stores the timer events from the configuration for later initialization of timers.
private  java.util.Vector timers
          Stores all the timers used for starting and stopping OSPF.
 
Fields inherited from class SSF.OS.ProtocolSession
inGraph, name, use
 
Constructor Summary
Reset()
          Standard constructor.
 
Method Summary
 void config(com.renesys.raceway.DML.Configuration cfg)
          Configure this protocol session.
 void init()
          Initialize this protocol session.
 boolean push(SSF.OS.ProtocolMessage message, SSF.OS.ProtocolSession fromSession)
          Is called by other protocols for the exchange of protocol messages.
 
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. This field is set in the init() method.

timers

private java.util.Vector timers
Stores all the timers used for starting and stopping OSPF.

timerConfig

private java.util.Vector timerConfig
Stores the timer events from the configuration for later initialization of timers.

log

private Logger log
Logger for this class.

STOP

private static final int STOP
Indicates, that the OSPF session should be stopped.

START

private static final int START
Indicates, that the OSPF session should be started.
Constructor Detail

Reset

public Reset()
Standard constructor.
Method Detail

config

public void config(com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
Configure this protocol session.
Overrides:
config in class SSF.OS.ProtocolSession
Parameters:
cfg - DML configuration for this protocol session.
Throws:
com.renesys.raceway.DML.configException -  

init

public void init()
          throws SSF.OS.ProtocolException
Initialize this protocol session. All the timers are started here.
Overrides:
init in class SSF.OS.ProtocolSession
Throws:
SSF.OS.ProtocolException -  

push

public boolean push(SSF.OS.ProtocolMessage message,
                    SSF.OS.ProtocolSession fromSession)
             throws SSF.OS.ProtocolException
Is called by other protocols for the exchange of protocol messages. Must not be called, because this protocol session does not handle any messages.
Overrides:
push in class SSF.OS.ProtocolSession
Throws:
SSF.OS.ProtocolException -