Package com.ibm.di.server
Class LoopComponent
- java.lang.Object
-
- com.ibm.di.server.AssemblyLineComponent
-
- com.ibm.di.server.BranchingComponent
-
- com.ibm.di.server.LoopComponent
-
- All Implemented Interfaces:
java.util.Map
public class LoopComponent extends BranchingComponent
This class is used by an AssemblyLine to mark the beginning of a loop
-
-
Field Summary
-
Fields inherited from class com.ibm.di.server.BranchingComponent
branchingConfig, psc, value
-
Fields inherited from class com.ibm.di.server.AssemblyLineComponent
addmap, CHECKPOINT_GETS, connConfig, connector, connPool, END_OF_DATA, handler, HOOKS_INVOKED, imap, INITIALIZE, initializeCount, LAST_CONN, LAST_ERROR, log, modmap, name, NUM_ADD, NUM_CALLREPLY, NUM_DELETE, NUM_ERRORS, NUM_GET, NUM_GET_TRIES, NUM_GETCLIENT, NUM_GETCLIENT_TRIES, NUM_IGNORED, NUM_LOOKUP, NUM_MODIFY, NUM_NOCHANGE, NUM_SKIPPED, parent, pooledConnector, SELECT, stats, SUCCESSFUL
-
-
Constructor Summary
Constructors Constructor Description LoopComponent(AssemblyLine parent, java.lang.String name, LoopConfig config)Constructor for the LoopComponent object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Entry meta)If necessary, move a value from the stored Attribute values to the work EntryvoidcheckConnectorInit(Entry work)Check what to do with our connector when we enter the loop.voidcheckLoopAttribute(Entry work)Copy values from work entry attributevoidclose()Releases resource.AssemblyLineComponentgetAssemblyLineComponent()Returns the associated AssemblyLineComponent with the Connector.ConnectorConfiggetConfiguration()Returns the LoopConnector Config.intgetLoopType()Returns the source for this loop component (e.g.EntrygetNextEntry(Entry meta)Returns the next Entry if this is a Connector loopintgetType()Returns the type of this component.voidinitialize()This method initializes the LoopComponentvoidsetConnectorParam(java.lang.String param, java.lang.Object value)Used for setting the connector Param.voidsetConnectorParams(Entry work)Executes the attribute map for the connector paramsvoidsetFirstLoop(boolean value)Set the internal firstLoop variable to the parameter value.booleanwillExecute(Entry work)This method will execute the Loop condition/connector and determine whether there are more loops to do.-
Methods inherited from class com.ibm.di.server.BranchingComponent
add1, checkWillExecute, componentCount, evaluateCondition, evaluateConditions, getBaseConfiguration, getBranchType, isExecuted, trigger, trigger, trigger
-
Methods inherited from class com.ibm.di.server.AssemblyLineComponent
callreply, checkInitialize, checkTerminate, clear, componentInitialized, containsKey, containsValue, debug, delete, deleteEntry, delta, doConnectorInitialize, doConnectorTerminate, doConnectorTerminate, dumpEntry, dumpObjects, entrySet, executeOperation, expandParameters, failBack, failOver, get, getConfig, getConnector, getConnectorParam, getCriteria, getCurrent, getDebug, getDuplicateEntryCount, getFirstDuplicateEntry, getHandler, getLastEntry, getLastReadEntry, getLog, getName, getnext, getnext, getnextClient, getNextDuplicateEntry, getRestartInfoEntry, getSimulatingState, getStats, handleException, handleSuccess, isCheckpointRestartEnabled, isDeltaMode, isEmpty, isEnabled, isExceptionFatal, isFailOvered, keySet, logmsg, lookup, lookup, mapEntry, modify, pushback, put, putAll, reconnect, remove, reply, resetStatus, setCriteria, setCriteria, setCurrent, setDebug, setDuplicateEntryCount, setErrorObject, setName, setRestartInfoEntry, setSimulatingState, setSuccessful, size, toString, triggerImpl, update, useAttributeMap, useAttributeMap, useAttributeMap, useInputMap, useMap, useMap, useOutputMap, values, verifySchema, wasConfigurationModified, wasSuccessful
-
-
-
-
Constructor Detail
-
LoopComponent
public LoopComponent(AssemblyLine parent, java.lang.String name, LoopConfig config) throws java.lang.Exception
Constructor for the LoopComponent object- Parameters:
parent- The AssemblyLine this LoopComponent belongs inname- The name of this LoopComponentconfig- The configuration for this LoopComponent- Throws:
java.lang.Exception- Any Exception that might be thrown
-
-
Method Detail
-
initialize
public void initialize() throws java.lang.ExceptionThis method initializes the LoopComponent- Overrides:
initializein classBranchingComponent- Throws:
java.lang.Exception- If this is a Collection Loop, and attribute names are missing
-
getNextEntry
public Entry getNextEntry(Entry meta) throws java.lang.Exception
Returns the next Entry if this is a Connector loop- Parameters:
meta- The work Entry- Returns:
- The next Entry
- Throws:
java.lang.Exception- Any Exception thrown by the Connector
-
setFirstLoop
public void setFirstLoop(boolean value)
Set the internal firstLoop variable to the parameter value. Used to decide if this LoopComponent should begin a new Loop, or continue the old Loop- Parameters:
value- The value to set
-
getLoopType
public int getLoopType()
Returns the source for this loop component (e.g. LoopConfig.LOOP_CONDITIONS/CONNECTOR_FC/COLLECTION)- Returns:
- An int containing the loop type.
-
willExecute
public boolean willExecute(Entry work) throws java.lang.Exception
This method will execute the Loop condition/connector and determine whether there are more loops to do.- Overrides:
willExecutein classBranchingComponent- Parameters:
work- The work Entry- Returns:
- true if there are more loops to do
- Throws:
java.lang.Exception- if a problem occurs
-
getType
public int getType()
Returns the type of this component.- Overrides:
getTypein classBranchingComponent- Returns:
- ServerConstants.TYPE_LOOP
-
checkLoopAttribute
public void checkLoopAttribute(Entry work)
Copy values from work entry attribute- Parameters:
work- The work Entry
-
checkConnectorInit
public void checkConnectorInit(Entry work) throws java.lang.Exception
Check what to do with our connector when we enter the loop.- Parameters:
work- The work Entry- Throws:
java.lang.Exception- if a problem occurs
-
setConnectorParams
public void setConnectorParams(Entry work) throws java.lang.Exception
Executes the attribute map for the connector params- Parameters:
work- The work Entry- Throws:
java.lang.Exception- if a problem occurs
-
add
public void add(Entry meta) throws java.lang.Exception
If necessary, move a value from the stored Attribute values to the work Entry- Overrides:
addin classBranchingComponent- Parameters:
meta- The work Entry- Throws:
java.lang.Exception- if a problem occurs
-
close
public void close() throws java.lang.ExceptionReleases resource.- Overrides:
closein classBranchingComponent- Throws:
java.lang.Exception- if a problem occurs.
-
getAssemblyLineComponent
public AssemblyLineComponent getAssemblyLineComponent()
Returns the associated AssemblyLineComponent with the Connector. If this is not a Connector LoopComponent, returns null.- Returns:
- an AssemblyLineComponent, or null
- Since:
- 7.0
-
getConfiguration
public ConnectorConfig getConfiguration()
Returns the LoopConnector Config.- Overrides:
getConfigurationin classBranchingComponent- Returns:
- null
- Since:
- 7.1.1.
-
setConnectorParam
public void setConnectorParam(java.lang.String param, java.lang.Object value)Used for setting the connector Param.- Overrides:
setConnectorParamin classAssemblyLineComponent- Parameters:
param- The parameter namevalue- The parameter value- Since:
- 7.1.1.
-
-