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 void
add(Entry meta)
This method is called by the hosting AssemblyLine.void
close()
Release resources.int
getParentBranchType()
Returns the type of the original branch to which this end branch belongs.int
getType()
This method returns the AL component type (ServerConstants.TYPE_BRANCH)void
handleException(java.lang.String oper, java.lang.Throwable e, Entry meta)
Any errors during execution of add() ends up here.void
initialize()
This method does nothing.boolean
trigger(java.lang.String oper, Entry work)
NOOP.boolean
trigger(java.lang.String oper, Entry work, Entry conn)
NOOP.boolean
willExecute(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:
initialize
in classAssemblyLineComponent
-
willExecute
public boolean willExecute(Entry work)
This method always returns true. Our test is performed in the add operation.- Overrides:
willExecute
in 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:
getType
in 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:
add
in 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.Exception
Any errors during execution of add() ends up here. We don't have error hooks so we just rethrow the exception.- Overrides:
handleException
in 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:
trigger
in 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:
trigger
in classAssemblyLineComponent
- Parameters:
oper
- Not used.work
- Not used.- Returns:
- false
-
close
public void close() throws java.lang.Exception
Release resources.- Overrides:
close
in classAssemblyLineComponent
- Throws:
java.lang.Exception
- None
-
-