com.ibm.di.connector
Class MemQConnector

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

public class MemQConnector
extends Connector
implements ConnectorInterface

This class is a connector that wraps over the Memory Buffer Queue infrastructure.


Field Summary
 
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
 
Constructor Summary
MemQConnector()
           
 
Method Summary
 void enablePersistence(boolean enable)
           
 Entry getNextEntry()
          Returns the next Entry from the connector.
 String getVersion()
           
 boolean hasMore()
           
 void initialize(Object o)
          Method reads initialisation params ,creates new pipe and calls initDB if persistence is enabled.
 void purgeQueue()
          Purges the queue.
 void putEntry(Entry entry)
          Adds a new entry to the data source
 void selectEntries()
          Prepare the Connector for sequential read.
 void setTimeout(int timeout)
           
 
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, deleteEntry, findEntry, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextClient, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logmsg, modEntry, modEntry, pushback, queryOperations, queryReply, querySchema, queryTables, reconnect, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface, terminate, 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, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminate, terminateServer
 

Constructor Detail

MemQConnector

public MemQConnector()
Method Detail

initialize

public void initialize(Object o)
                throws Exception
Method reads initialisation params ,creates new pipe and calls initDB if persistence is enabled. Checks if user has enabled property to use earlier behavior of MEMQConnector in iterator mode where no new queue will be created if queue does not exist.

Specified by:
initialize in interface ConnectorInterface
Overrides:
initialize in class Connector
Parameters:
o - The connector mode of the Connector. The object should be of type ConnectorMode.
Throws:
Exception

selectEntries

public void selectEntries()
                   throws Exception
Description copied from class: Connector
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:
Exception

getNextEntry

public Entry getNextEntry()
                   throws Exception
Description copied from class: Connector
Returns the next Entry from the connector. The entry is populated with attributes and values from the next entry in the input set.

Specified by:
getNextEntry in interface ConnectorInterface
Overrides:
getNextEntry in class Connector
Returns:
- the next Entry, or null if no more data
Throws:
Exception
See Also:
Connector.selectEntries()

putEntry

public void putEntry(Entry entry)
              throws Exception
Description copied from class: Connector
Adds a new entry to the data source

Specified by:
putEntry in interface ConnectorInterface
Overrides:
putEntry in class Connector
Parameters:
entry - The entry data to add
Throws:
Exception - Any exceptions thrown by the connector's underlying classes

setTimeout

public void setTimeout(int timeout)

enablePersistence

public void enablePersistence(boolean enable)

hasMore

public boolean hasMore()

getVersion

public String getVersion()
Specified by:
getVersion in interface VersionInfoInterface

purgeQueue

public void purgeQueue()
                throws Exception
Purges the queue. Wrapper over the MemBufferQ.purgeQueue()

Throws:
Exception