gov.nist.antd.merlin.util
Class AbstractCallback

java.lang.Object
  |
  +--SSF.OS.ProtocolSession
        |
        +--gov.nist.antd.merlin.util.AbstractCallback
All Implemented Interfaces:
Callback, com.renesys.raceway.DML.Configurable
Direct Known Subclasses:
BackupManager

public abstract class AbstractCallback
extends ProtocolSession
implements Callback

This class represents an implementation of a callback module and includes the registration to the ONICs.

 This class was developed at the National Institute of Standards and
 Technology by employees of the Federal Government in the course of
 their official duties. Pursuant to title 17 Section 105 of the United
 States Code this software is not subject to copyright protection and
 is in the public domain.
 NIST assumes no responsibility whatsoever for its use by other parties,
 and makes no guarantees, expressed or implied, about its quality,
 reliability, or any other characteristic.
 
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.

Author:
borchert
, rouil

Field Summary
 
Fields inherited from class SSF.OS.ProtocolSession
name, use
 
Constructor Summary
AbstractCallback()
          Default constructor
 
Method Summary
abstract  void callback(EventMessage eventMsg)
          This method implements the handler for the los of light detection and recovery.
 void init()
          Initialization routine, called by the ProtocolGraph after instantiation.
abstract  boolean push(ProtocolMessage message, ProtocolSession fromSession)
          Print the message received.
 
Methods inherited from class SSF.OS.ProtocolSession
close, closed, config, debugIdentifier, inGraph, open, opened, pushAfterDelay, pushAfterDelayFailed, setGraph, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCallback

public AbstractCallback()
Default constructor

Method Detail

callback

public abstract void callback(EventMessage eventMsg)
This method implements the handler for the los of light detection and recovery.

Specified by:
callback in interface Callback
Parameters:
eventMsg - The message that will be received.

push

public abstract boolean push(ProtocolMessage message,
                             ProtocolSession fromSession)
                      throws ProtocolException
Print the message received.

Specified by:
push in class ProtocolSession
Parameters:
message - The message received.
fromSession - The protocol session which sent the message.
Returns:
True if the message is pushed. False if it is dropped.
Throws:
ProtocolException - If a protocol session exception occurs.

init

public void init()
          throws ProtocolException
Initialization routine, called by the ProtocolGraph after instantiation. The order of initialization of a set of protocols is unspecified, so other methods (like open()) may be called before init(). Resources (like connection tables) that may be needed by open() should therefore be created in the ProtocolSession constructor. This method register this protocol for managing all ONICs

Overrides:
init in class ProtocolSession
ProtocolException