Class TpaeIFCDConnector

    • Constructor Detail

      • TpaeIFCDConnector

        public TpaeIFCDConnector()
        Default constructor.
    • Method Detail

      • initialize

        public void initialize​(java.lang.Object obj)
                        throws java.lang.Exception
        Initialize the connector. The connector may be passed a parameter of any kind by the user. It is up to the connector to determine whether this object can be used or not. The parameter is typically provided by a user script. When an AssemblyLine initializes it's Connectors, they are passed a ConnectorMode object.
        Specified by:
        initialize in interface ConnectorInterface
        Overrides:
        initialize in class Connector
        Parameters:
        obj - User provided parameter
        Throws:
        java.lang.Exception - if the initialization of this connector fails.
      • getNextClient

        public ConnectorInterface getNextClient()
                                         throws java.lang.Exception
        Server mode - return a clone of self that handles the next client instance when running in server mode. The returned connector may be used in its own thread to handle a "client" request so if the returned instance is returned more than once it must be thread safe.
        Specified by:
        getNextClient in interface ConnectorInterface
        Overrides:
        getNextClient in class Connector
        Returns:
        the clone of itself
        Throws:
        java.lang.Exception - if an error occurs.
      • selectEntries

        public void selectEntries()
                           throws java.lang.Exception
        Prepare the Connector for sequential read. If necessary, create a result set to be used for getNextEntry(). When the Connector is used as an Iterator in an AssemblyLine, this method will be called. Default is an empty method.
        Specified by:
        selectEntries in interface ConnectorInterface
        Overrides:
        selectEntries in class Connector
        Throws:
        java.lang.Exception - if an error occurs.
      • getNextEntry

        public Entry getNextEntry()
                           throws java.lang.Exception
        Returns the next Entry from the connector. The entry is populated with attributes and values from the next entry in the input set.

        Example:

         var ctor = input.getConnector();
         var entry = ctor.getNextEntry();
         
         for (; entry != null; entry = ctor.getNextEntry()) {
                main.logmsg("Read entry...");
                main.dumpEntry(entry);
         }
         
        Specified by:
        getNextEntry in interface ConnectorInterface
        Overrides:
        getNextEntry in class Connector
        Returns:
        - the next Entry, or null if no more data
        Throws:
        java.lang.Exception - if an error occurs.
        See Also:
        ConnectorInterface.selectEntries()
      • terminate

        public void terminate()
                       throws java.lang.Exception
        Terminate the connector. This function closes all connection and releases all resources used by the connector. This function also calls the parser's closeParser() method if a parser is active.
        Specified by:
        terminate in interface ConnectorInterface
        Overrides:
        terminate in class Connector
        Throws:
        java.lang.Exception - if an error occurs.
      • getVersion

        public java.lang.String getVersion()
        Version information.
        Specified by:
        getVersion in interface VersionInfoInterface
        Returns:
        version information