com.ibm.di.connector.gla
Class GLAConnector

java.lang.Object
  extended by com.ibm.di.connector.Connector
      extended by com.ibm.di.connector.gla.GLAConnector
All Implemented Interfaces:
ConnectorInterface, VersionInfoInterface

public class GLAConnector
extends Connector
implements ConnectorInterface

This is the GLAConnector class. GLAConnector is used to process a log file and transform its contents to CommonBaseEvent objects. The Connector needs an adapter configuration file to be provided as a Connector parameter. The Connector than uses the GLA run-time to validate and start the given configuration file. The Connector uses a specially made outputter, called TDIOutputter, to receive the generated from the log file CBE objects. The TDIOutputter must be configured to the adapter configuration file. For more information about configuring the Connector and the TDIOutputter refer to the GLAConnector documentation.


Field Summary
static java.lang.String DEFAULT_CORR_ID
          The default correlation ID is used from both the GLAConnector and the TDIOutputter.
 
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
 
Constructor Summary
GLAConnector()
          The GLAConnector constructor.
 
Method Summary
 org.eclipse.hyades.logging.events.cbe.CommonBaseEvent getCurrentCBEObject()
          Returns the last taken CBE object.
 Entry getNextEntry()
          This method gets the next CBE object from the queue and creates an Entry.
 java.lang.String getVersion()
          Returns the connector version.
 void initialize(java.lang.Object obj)
          This method initializes the connector parameters.
 void selectEntries()
          This method starts the Adapter and fills the queue with CBE objects.
 void terminate()
          Terminates the Connector and unregisters it from the TDIOutputter's Hashtable.
 
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, deleteEntry, extractExceptionInformation, findEntry, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextClient, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, getUI, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logError, logmsg, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, querySchema, queryTables, reconnect, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setDebugMode, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface, terminateServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.di.connector.ConnectorInterface
deleteEntry, findEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer
 

Field Detail

DEFAULT_CORR_ID

public static final java.lang.String DEFAULT_CORR_ID
The default correlation ID is used from both the GLAConnector and the TDIOutputter. It is used if one (or both) of the Connector correlationID or the Outputter tdi_correlation_id parameter is not set.

See Also:
Constant Field Values
Constructor Detail

GLAConnector

public GLAConnector()
The GLAConnector constructor. It sets the mode of the connector. The only supported mode is Iterator.

Method Detail

initialize

public void initialize(java.lang.Object obj)
                throws java.lang.Exception
This method initializes the connector parameters. It gets the "configFile" parameter and checks if it has any assigned value. If no value is assigned then an Exception is thrown. Then the "correlationID" of the Connector is taken. If no value is specified to this parameter than automatically a default value is used.

Specified by:
initialize in interface ConnectorInterface
Overrides:
initialize in class Connector
Parameters:
obj - not used.
Throws:
java.lang.Exception - An Exception is thrown if some of the requred parameters is missing.

selectEntries

public void selectEntries()
                   throws java.lang.Exception
This method starts the Adapter and fills the queue with CBE objects. Before starting the Adapter a validation is made to ensure that the configuration adapter file is valid.

Specified by:
selectEntries in interface ConnectorInterface
Overrides:
selectEntries in class Connector
Throws:
java.lang.Exception - If the configuration adapter file is not valid or an error occurs during execution.

getNextEntry

public Entry getNextEntry()
                   throws java.lang.Exception
This method gets the next CBE object from the queue and creates an Entry. To the Entry is set an attribute with name "rawCBEObject" and value the CBE object. Also to the same Entry object are added the CommonBaseEvent properties as (name,value) pair. This Entry is passed to the AssemblyLine.

Specified by:
getNextEntry in interface ConnectorInterface
Overrides:
getNextEntry in class Connector
Returns:
Entry object containing the next CBE object.
Throws:
java.lang.Exception - if an error occurs.
See Also:
ConnectorInterface.selectEntries()

getVersion

public java.lang.String getVersion()
Returns the connector version.

Specified by:
getVersion in interface VersionInfoInterface
Returns:
String representing the connector version.

terminate

public void terminate()
               throws java.lang.Exception
Terminates the Connector and unregisters it from the TDIOutputter's Hashtable.

Specified by:
terminate in interface ConnectorInterface
Overrides:
terminate in class Connector
Throws:
java.lang.Exception - : never

getCurrentCBEObject

public org.eclipse.hyades.logging.events.cbe.CommonBaseEvent getCurrentCBEObject()
Returns the last taken CBE object. Users may use this method to get the current CBE object.

Returns:
CBE object which is last taken from the Queue.