gov.nasa.gsfc.drl.rtstps.core
Class RtStpsNode

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.RtStpsNode
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
AbstractChannel, AbstractService, FrameSenderNode, HDF5Output, NullChannel, PacketPipeline, PdsOutput, RDROutput

public abstract class RtStpsNode
extends java.lang.Object
implements java.lang.Cloneable

This is the base class for all nodes in the RT-STPS system.


Field Summary
protected  java.lang.String linkName
          Every public node should have a unique name so that it can be linked to other nodes.
protected  java.util.Collection<StatusItem> statusItemList
          A list of StatusItem objects.
protected  java.lang.String typeName
          This is a class name for the derived node type.
 
Constructor Summary
protected RtStpsNode(java.lang.String elementName)
          A constructor.
protected RtStpsNode(java.lang.String elementName, java.lang.String linkName)
          A constructor.
 
Method Summary
 void clear()
          Clear items in the StatusItemList.
 java.lang.Object clone()
           
abstract  void finishSetup(Configuration configuration)
          Finish the setup.
 java.lang.String getElementName()
          Get the element name.
 java.lang.String getLinkName()
          Get the link name.
 java.util.Collection<StatusItem> getStatusItems()
          Get the status item list, which is a collection of StatusItem objects.
abstract  void load(org.w3c.dom.Element element, Configuration configuration)
          Configure from an XML document.
 void setLinkName(java.lang.String name)
          Set the link name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

linkName

protected java.lang.String linkName
Every public node should have a unique name so that it can be linked to other nodes.


typeName

protected java.lang.String typeName
This is a class name for the derived node type. It is also the element name in the XML setup file. It must be unique for each node type.


statusItemList

protected java.util.Collection<StatusItem> statusItemList
A list of StatusItem objects. If this derived node collects status, then create a statusItemList and add StatusItem objects to it. By default, it does not create a statusItemList.

Constructor Detail

RtStpsNode

protected RtStpsNode(java.lang.String elementName)
A constructor.

Parameters:
elementName - The XML element name. Also the class name.

RtStpsNode

protected RtStpsNode(java.lang.String elementName,
                     java.lang.String linkName)
A constructor.

Parameters:
elementName - The XML element name. Also the class name.
linkName - The link name. Also the object name.
Method Detail

getLinkName

public final java.lang.String getLinkName()
Get the link name. It is used to link this node to other nodes.


getElementName

public final java.lang.String getElementName()
Get the element name. It is also the class type name.


setLinkName

public final void setLinkName(java.lang.String name)
Set the link name. Every node must have a unique name.


load

public abstract void load(org.w3c.dom.Element element,
                          Configuration configuration)
                   throws RtStpsException
Configure from an XML document. You cannot assume that any other stps nodes have been created.

Throws:
RtStpsException

finishSetup

public abstract void finishSetup(Configuration configuration)
                          throws RtStpsException
Finish the setup. When this method is called, you may assume all nodes have been created and exist by name in the map, and all standard links have been resolved. This is a last chance to prepare for data flow.

Throws:
RtStpsException

getStatusItems

public final java.util.Collection<StatusItem> getStatusItems()
Get the status item list, which is a collection of StatusItem objects. An RtStpsNode is not required to collect status.


clear

public final void clear()
Clear items in the StatusItemList.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException