Class LDAPLoader

java.lang.Object
com.nt.udc.ndk.node.LDAPLoader
All Implemented Interfaces:
EPFileLoader, Runnable

public class LDAPLoader extends Object implements EPFileLoader, Runnable
FileLoader for LDAP lookup
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an LDAPLoader object using the given loader config object.
    LDAPLoader(LDAPLoaderConfig ldConfig, String filePath)
    Creates an LDAPLoader object using the given loader config object, and the specified output file.
  • Method Summary

    Modifier and Type
    Method
    Description
    Allows inquisition on the file to which this loader is writing data.
    This method returns a string key which can be used inside an NPL program to address the "table" which will be holding the data provided by this loader, e.g.
    Allows inquisition on the EPFileLoaderConfig which configures this loader.
    boolean
    Used to help determine the health of the node using this loader.
    static void
    main(String[] argv)
     
    void
    run()
     
    void
    setFilePath(String filePath)
    This method is called by the user of the loader object which implements EPFileLoader to specify the file where the loader will write its data using the enhancer file format.
    void
    User of the loader object will call this method to specify an EPFileLoaderConfig which will know how to configure this loader.
    void
    Shutsdown any thread associated with this loader.
    void
    Starts any thread associated with this loader.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LDAPLoader

      public LDAPLoader(LDAPLoaderConfig ldConfig)
      Creates an LDAPLoader object using the given loader config object. The output file path need to be specified for a loader created using this constructor.
      Parameters:
      ldConfig - LDAPLoaderConfig object
    • LDAPLoader

      public LDAPLoader(LDAPLoaderConfig ldConfig, String filePath)
      Creates an LDAPLoader object using the given loader config object, and the specified output file.
      Parameters:
      ldConfig - LDAPLoaderConfig object
      filePath - file to which data will be loaded bu this loader.
  • Method Details

    • main

      public static void main(String[] argv)
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • isHealthy

      public boolean isHealthy()
      Used to help determine the health of the node using this loader.
    • setFilePath

      public void setFilePath(String filePath)
      This method is called by the user of the loader object which implements EPFileLoader to specify the file where the loader will write its data using the enhancer file format.
      Specified by:
      setFilePath in interface EPFileLoader
    • getFilePath

      public String getFilePath()
      Allows inquisition on the file to which this loader is writing data.
      Specified by:
      getFilePath in interface EPFileLoader
    • setLoaderConfig

      public void setLoaderConfig(EPFileLoaderConfig loaderConfig)
      User of the loader object will call this method to specify an EPFileLoaderConfig which will know how to configure this loader.
      Specified by:
      setLoaderConfig in interface EPFileLoader
    • getLoaderConfig

      public EPFileLoaderConfig getLoaderConfig()
      Allows inquisition on the EPFileLoaderConfig which configures this loader.
      Specified by:
      getLoaderConfig in interface EPFileLoader
    • getKey

      public String getKey()
      This method returns a string key which can be used inside an NPL program to address the "table" which will be holding the data provided by this loader, e.g. lookup(table-key, field-key)
      Specified by:
      getKey in interface EPFileLoader
    • start

      public void start()
      Starts any thread associated with this loader.
      Specified by:
      start in interface EPFileLoader
    • shutdown

      public void shutdown()
      Shutsdown any thread associated with this loader.
      Specified by:
      shutdown in interface EPFileLoader