com.ibm.di.server
Class EndBranchComponent

java.lang.Object
  extended by com.ibm.di.server.AssemblyLineComponent
      extended by com.ibm.di.server.EndBranchComponent

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, handler, imap, INITIALIZE, log, modmap, name, parent, pooledConnector, restartCycle, reusingConnector, SELECT, stats
 
Constructor Summary
EndBranchComponent(AssemblyLine parent, BranchingComponent bc)
          The Constructor for the EndBranchComponent
 
Method Summary
 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(String oper, Throwable e, Entry meta)
          Any errors during execution of add() ends up here.
 void initialize()
          This method does nothing.
 boolean trigger(String oper, Entry work)
          NOOP.
 boolean trigger(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, debug, delete, deleteEntry, delta, doConnectorInitialize, doConnectorTerminate, dumpEntry, dumpObjects, expandParameters, getBaseConfiguration, getConfig, getConfiguration, getConnector, getConnectorParam, getCriteria, getCurrent, getDebug, getDuplicateEntryCount, getFirstDuplicateEntry, getHandler, getLastEntry, getLastReadEntry, getLog, getName, getnext, getnext, getnextClient, getNextDuplicateEntry, getRestartInfoEntry, getStats, handleSuccess, isCheckpointRestartEnabled, isDeltaMode, isEnabled, isExceptionFatal, logmsg, lookup, lookup, mapEntry, modify, pushback, reconnect, reply, setConnectorParam, setCriteria, setCriteria, setCurrent, setDebug, setDuplicateEntryCount, setErrorObject, setName, setRestartInfoEntry, trigger, update, verifySchema, wasConfigurationModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndBranchComponent

public EndBranchComponent(AssemblyLine parent,
                          BranchingComponent bc)
The Constructor for the EndBranchComponent

Parameters:
parent - The AssemblyLine that contains this EndBranchComponent
bc - The BranchingComponent that this is an end for
Method Detail

initialize

public void initialize()
This method does nothing.

Overrides:
initialize in class AssemblyLineComponent

willExecute

public boolean willExecute(Entry work)
This method always returns true. Our test is performed in the add operation.

Overrides:
willExecute in class AssemblyLineComponent
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 class AssemblyLineComponent
Returns:
The type value (ServerConstants.TYPE_BRANCH)

add

public void add(Entry meta)
         throws 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 class AssemblyLineComponent
Parameters:
meta - The work entry (not used)
Throws:
Exception - the component is not initialized or the underlying Connector raised an error or some of the user-defined hooks raised an error

getParentBranchType

public int getParentBranchType()
Returns the type of the original branch to which this end branch belongs


handleException

public void handleException(String oper,
                            Throwable e,
                            Entry meta)
                     throws Exception
Any errors during execution of add() ends up here. We dont have error hooks so we just rethrow the exception.

Overrides:
handleException in class AssemblyLineComponent
Parameters:
oper - Not used.
e - Exception
meta - Not used.
Throws:
Exception - The "e" exception

trigger

public boolean trigger(String oper,
                       Entry work,
                       Entry conn)
NOOP. This component has no triggers.

Overrides:
trigger in class AssemblyLineComponent
Parameters:
oper - Not used.
work - Not used.
conn - Not used.
Returns:
Not used.

trigger

public boolean trigger(String oper,
                       Entry work)
NOOP. This component has no triggers.

Overrides:
trigger in class AssemblyLineComponent
Parameters:
oper - Not used.
work - Not used.
Returns:
Not used.

close

public void close()
           throws Exception
Release resources.

Overrides:
close in class AssemblyLineComponent
Throws:
Exception - None