Class OINode

java.lang.Object
com.nt.udc.ndk.node.DCNode
com.nt.udc.ndk.node.OINode
All Implemented Interfaces:
AdminIfc, ConfigIfc, LoggerIfc, NodeHealthIfc, NodeStateManagementIfc, PropertyIfc, StateManagementIfc
Direct Known Subclasses:
FFOINode, GenevaOINode, JDBCOINode, OIFtpNode, RadiusOINode

public abstract class OINode extends DCNode
This class is the base class for all OI nodes. It provides methods to set the FieldProcessor and Transport components of the node.
  • Field Details

    • processor

      protected DCFieldProcessor processor
      The DCFieldProcessor for this node.
    • transport

      protected OITransport transport
      The OITransport for this node.
    • fpThread

      protected Thread fpThread
      Manages the node's field processor.
    • transThread

      protected Thread transThread
      Manages the node's transport.
  • Constructor Details

    • OINode

      public OINode()
      Default Constructor; instantiates objects necessary to define the DCNodeTypeIfc methods.
    • OINode

      public OINode(String[] args) throws NodeStartException
      Constructor for the class. Calls the super class DCNode with the given array of arguments.
      Subclasses should instantiate the processor and the transport attributes via the appropriate 'set' methods. The DataProvider(s) and DataReceiver(s) must be set, as necessary, for the processor and transport.
      Parameters:
      args - Arguments to be passed to the DCNode super class.
      Throws:
      NodeStartException
    • OINode

      public OINode(String[] args, boolean mtCheck) throws NodeStartException
      Constructor for the class. Calls the super class DCNode with the given array of arguments.
      Subclasses should instantiate the processor and the transport attributes via the appropriate 'set' methods. The DataProvider(s) and DataReceiver(s) must be set, as necessary, for the processor and transport.
      Parameters:
      args - Arguments to be passed to the DCNode super class.
      mtCheck - Parameter to indicate multi-threaded node Note: In case of multi-threaded FFOINode, DCStreamHandler is handled separately.
      Throws:
      NodeStartException
  • Method Details

    • createDCStreamHandlers

      public void createDCStreamHandlers(boolean isMultithreaded, int numThreads, int currThread)
      Creates DCStreamHandler object that this node is using for inter-node communication.
      Parameters:
      isMultithreaded - indicates multi threaded node
      numThreads - number of threads configured
      currThread - current thread
    • createDCStreamHandlers

      public void createDCStreamHandlers(boolean isMultithreaded, int numThreads, boolean mtOrderChecked, int currThread)
      Creates DCStreamHandler object that this node is using for inter-node communication.
      Parameters:
      isMultithreaded - indicates multi threaded node
      numThreads - number of threads configured
      mtOrderChecked - indicates order needed or not
      currThread - current thread
    • createDCStreamHandlers

      public void createDCStreamHandlers()
    • getMajorType

      public String getMajorType()
      Returns the 'Major Type' of this node.
      Specified by:
      getMajorType in class DCNode
      Returns:
      Returns the major-type identifier of this node.
    • setFieldProcessor

      public void setFieldProcessor(DCFieldProcessor fp)
      Sets the DCFieldProcessor for this node.
      Parameters:
      fp - The DCFieldProcessor to be used within this node.
    • setFieldProcessor

      public void setFieldProcessor(DCFieldProcessor fp, int i)
      Sets the DCFieldProcessor for this node at given index.
      Parameters:
      fp - The DCFieldProcessor to be used within this node.
      i - Index to add to list of field processors
    • getFieldProcessor

      public DCFieldProcessor getFieldProcessor()
      Returns the DCFieldProcessor for this node.
      Returns:
      Returns the node's DCFieldProcessor.
    • getFieldProcessor

      public DCFieldProcessor getFieldProcessor(int i)
      Returns the DCFieldProcessor for this node.
      Parameters:
      i - Index to return DCFieldProcessor from fld processors list
      Returns:
      Returns the node's DCFieldProcessor.
    • setTransport

      public void setTransport(OITransport oit)
      Sets the OITransport for this node.
      Parameters:
      oit - The OITransport to be used within this node.
    • setTransport

      public void setTransport(OITransport oit, int i)
      Sets the OITransport for this node.
      Parameters:
      oit - The OITransport to be used within this node.
      i - Index to add transport list
    • getTransport

      public OITransport getTransport()
      Returns the OITransport for this node.
      Returns:
      Returns the node's OITransport.
    • getTransport

      public OITransport getTransport(int i)
      Returns the OITransport for this node.
      Parameters:
      i - Index to return transport
      Returns:
      Returns the node's OITransport.
    • setFieldProcessorThread

      public void setFieldProcessorThread(DCFieldProcessor fp)
      Sets the DCFieldProcessor to run within its own thread.
      Parameters:
      fp - A runnable DCFieldProcessor object.
    • setOIMTManagerThread

      public void setOIMTManagerThread(OIMultiThreadManager oiMtMgr, String name)
      Sets the OIMultiThreadManager to run within its own thread.
      Parameters:
      oiMtMgr - A runnable OIMultiThreadManager object.
    • setOIFileCyclerThread

      public void setOIFileCyclerThread(OIFileCycler oiFileCycler)
      Sets the OIFileCycler to run within its own thread.
      Parameters:
      oiFileCycler - A runnable OIMultiThreadManager object.
    • setFieldProcessorThread

      public void setFieldProcessorThread(DCFieldProcessor fp, int i, String name)
      Sets the DCFieldProcessor to run within its own thread.
      Parameters:
      fp - A runnable DCFieldProcessor object.
      i - Index of a runnable DCFieldProcessor object.
      name - Name of runnable DCFieldProcessor object.
    • getFieldProcessorThread

      public Thread getFieldProcessorThread()
      Returns the thread in which is the FieldProcessor is running.
      Returns:
      Returns DCFieldProcessor's thread.
    • getFieldProcessorThread

      public Thread getFieldProcessorThread(int i)
      Returns the thread in which is the FieldProcessor is running.
      Parameters:
      i - Index of a runnable DCFieldProcessor object.
      Returns:
      Returns DCFieldProcessor's thread.
    • getOIMTManagerThread

      public Thread getOIMTManagerThread()
      Returns the thread in which is the OIMultiThreadManager is running.
      Returns:
      Returns OIMultiThreadManager's thread.
    • getOIFileCyclerThread

      public Thread getOIFileCyclerThread()
      Returns the thread in which is the OIFileCycler is running.
      Returns:
      Returns OIFileCycler's thread.
    • setTransportThread

      public void setTransportThread(OITransport oit)
      Sets the OITransport to run within its own thread.
      Parameters:
      oit - A runnable OITransport object.
    • getTransportThread

      public Thread getTransportThread()
      Returns the thread in which is the OITransport is running.
      Returns:
      Returns OITransport's thread.
    • isNodeStateUsed

      public boolean isNodeStateUsed()
      Returns whether the node state is used (and whether the node can be recovered. Currently disabled for all OI Nodes.
      Specified by:
      isNodeStateUsed in interface NodeStateManagementIfc
      Overrides:
      isNodeStateUsed in class DCNode
      Returns:
      true, if node state is being used
    • isHealthy

      public boolean isHealthy()
      This method is used to check the transport's state of health. The criterion for determining the node's health is based on the transport's health and whether all registered threads are alive. It is to be overridden by subclasses.
      Specified by:
      isHealthy in interface NodeHealthIfc
      Overrides:
      isHealthy in class DCNode
      Returns:
      true if the transport is healthy, false otherwise
    • isMonitorThreadHealthy

      public boolean isMonitorThreadHealthy()
      This method is used to check the nodes general monitoring thread's health. It is to be overridden by subclasses.
      Returns:
      true if the general monitoring thread is healthy, false otherwise
    • getFileRetentionThread

      protected FileRetentionThread getFileRetentionThread() throws NodeStartException
      This method collects the details required for creating FileRetentionThread and creates FileRetentionThread. This method will be used by subclasses like FFOINode for creating FileRetentionThread.
      Returns:
      FileRetentionThread FileRetentionThread will be created invalid input: '&' returned after successful operation. If configured archivefolder doesn't exists or not creatable, NodeStartException will be thrown.
      Throws:
      NodeStartException