Package com.ibm.di.server
Class EndBranchComponent
- java.lang.Object
-
- com.ibm.di.server.AssemblyLineComponent
-
- com.ibm.di.server.EndBranchComponent
-
- All Implemented Interfaces:
java.util.Map
public class EndBranchComponent extends AssemblyLineComponent
The EndBranchComponent is an internal component that is associated with a BranchComponent. Its job is to check if we are in an if/else-if/else construct and skip any else-if/else type branch components based on the execute status of the associated BranchComponent.
-
-
Field Summary
-
Fields inherited from class com.ibm.di.server.AssemblyLineComponent
addmap, CHECKPOINT_GETS, config, 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 EndBranchComponent(AssemblyLine parent, BranchingComponent bc)The Constructor for the EndBranchComponent
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Entry meta)This method is called by the hosting AssemblyLine.voidclose()Release resources.intgetParentBranchType()Returns the type of the original branch to which this end branch belongs.intgetType()This method returns the AL component type (ServerConstants.TYPE_BRANCH)voidhandleException(java.lang.String oper, java.lang.Throwable e, Entry meta)Any errors during execution of add() ends up here.voidinitialize()This method does nothing.booleantrigger(java.lang.String oper, Entry work)NOOP.booleantrigger(java.lang.String oper, Entry work, Entry conn)NOOP.booleanwillExecute(Entry work)This method always returns true.-
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, getBaseConfiguration, getConfig, getConfiguration, getConnector, getConnectorParam, getCriteria, getCurrent, getDebug, getDuplicateEntryCount, getFirstDuplicateEntry, getHandler, getLastEntry, getLastReadEntry, getLog, getName, getnext, getnext, getnextClient, getNextDuplicateEntry, getRestartInfoEntry, getSimulatingState, getStats, handleSuccess, isCheckpointRestartEnabled, isDeltaMode, isEmpty, isEnabled, isExceptionFatal, isFailOvered, keySet, logmsg, lookup, lookup, mapEntry, modify, pushback, put, putAll, reconnect, remove, reply, resetStatus, setConnectorParam, setCriteria, setCriteria, setCurrent, setDebug, setDuplicateEntryCount, setErrorObject, setName, setRestartInfoEntry, setSimulatingState, setSuccessful, size, toString, trigger, triggerImpl, update, useAttributeMap, useAttributeMap, useAttributeMap, useInputMap, useMap, useMap, useOutputMap, values, verifySchema, wasConfigurationModified, wasSuccessful
-
-
-
-
Constructor Detail
-
EndBranchComponent
public EndBranchComponent(AssemblyLine parent, BranchingComponent bc)
The Constructor for the EndBranchComponent- Parameters:
parent- The AssemblyLine that contains this EndBranchComponentbc- The BranchingComponent that this is an end for
-
-
Method Detail
-
initialize
public void initialize()
This method does nothing.- Overrides:
initializein classAssemblyLineComponent
-
willExecute
public boolean willExecute(Entry work)
This method always returns true. Our test is performed in the add operation.- Overrides:
willExecutein classAssemblyLineComponent- Parameters:
work- The work Entry. Not used.- Returns:
- true
-
getType
public int getType()
This method returns the AL component type (ServerConstants.TYPE_BRANCH)- Overrides:
getTypein classAssemblyLineComponent- Returns:
- The type value (ServerConstants.TYPE_BRANCH)
-
add
public void add(Entry meta) throws java.lang.Exception
This method is called by the hosting AssemblyLine. Check for if/else-if/else construct and set the next connector to execute based on branch type and execution status.- Overrides:
addin classAssemblyLineComponent- Parameters:
meta- The work entry (not used)- Throws:
java.lang.Exception- if a problem occurs
-
getParentBranchType
public int getParentBranchType()
Returns the type of the original branch to which this end branch belongs.- Returns:
- the type of the parrent branch
-
handleException
public void handleException(java.lang.String oper, java.lang.Throwable e, Entry meta) throws java.lang.ExceptionAny errors during execution of add() ends up here. We don't have error hooks so we just rethrow the exception.- Overrides:
handleExceptionin classAssemblyLineComponent- Parameters:
oper- Not used.e- Exceptionmeta- Not used.- Throws:
java.lang.Exception- The "e" exception
-
trigger
public boolean trigger(java.lang.String oper, Entry work, Entry conn)NOOP. This component has no triggers.- Overrides:
triggerin classAssemblyLineComponent- Parameters:
oper- Not used.work- Not used.conn- Not used.- Returns:
- false
-
trigger
public boolean trigger(java.lang.String oper, Entry work)NOOP. This component has no triggers.- Overrides:
triggerin classAssemblyLineComponent- Parameters:
oper- Not used.work- Not used.- Returns:
- false
-
close
public void close() throws java.lang.ExceptionRelease resources.- Overrides:
closein classAssemblyLineComponent- Throws:
java.lang.Exception- None
-
-