Package com.ibm.di.connector.gla
Class GLAConnector
- java.lang.Object
-
- com.ibm.di.connector.Connector
-
- 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
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_CORR_IDThe 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
Constructors Constructor Description GLAConnector()The GLAConnector constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.hyades.logging.events.cbe.CommonBaseEventgetCurrentCBEObject()Returns the last taken CBE object.EntrygetNextEntry()This method gets the next CBE object from the queue and creates an Entry.java.lang.StringgetVersion()Returns the connector version.voidinitialize(java.lang.Object obj)This method initializes the connector parameters.voidselectEntries()This method starts the Adapter and fills the queue with CBE objects.voidterminate()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
-
-
Method Detail
-
initialize
public void initialize(java.lang.Object obj) throws java.lang.ExceptionThis 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:
initializein interfaceConnectorInterface- Overrides:
initializein classConnector- 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.ExceptionThis 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:
selectEntriesin interfaceConnectorInterface- Overrides:
selectEntriesin classConnector- 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:
getNextEntryin interfaceConnectorInterface- Overrides:
getNextEntryin classConnector- 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:
getVersionin interfaceVersionInfoInterface- Returns:
- String representing the connector version.
-
terminate
public void terminate() throws java.lang.ExceptionTerminates the Connector and unregisters it from the TDIOutputter's Hashtable.- Specified by:
terminatein interfaceConnectorInterface- Overrides:
terminatein classConnector- 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.
-
-