com.ibm.di.server
Class AssemblyLine

java.lang.Object
  extended by java.lang.Thread
      extended by com.ibm.di.server.Monitor
          extended by com.ibm.di.server.AssemblyLine
All Implemented Interfaces:
RecordPlaybackInterface, TaskInterface, Runnable

public final class AssemblyLine
extends Monitor
implements TaskInterface, RecordPlaybackInterface

This class represents a TDI AssemblyLine. When an AssemblyLine needs to be started the com.ibm.di.server.RS object creates an instance of the AssemblyLine class and then calls the start() method on this instance. Since AssemblyLine inherits (indirectly) from java.lang.Thread this causes the run() method of the AssemblyLine to be called. An alternative method of running AssemblyLines is running them manually. This means that only a single cycle of the AssemblyLine is executed at a time, returning the work Entry result at the end of the cycle. An AssemblyLine can be run in manual mode by using the AssemblyLine constructor which is passed a com.ibm.di.server.TaskCallBlock object. This TaskCallBlock object must have had its AssemblyLine.TCB_RUNMODE_PROPNAME property set to the value of AssemblyLine.RUNMODE_MANUAL. Then a cycle can be executed by invoking the Entry executeCycle(Entry workEntry) AssemblyLine method.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static String OPENTRY_OPERATION
           
static String PROPERTIES_FILE
           
static int RUNMODE_I_MANUAL
           
static int RUNMODE_I_NORMAL
           
static int RUNMODE_I_PLAYBACK
           
static int RUNMODE_I_RECORD
           
static String RUNMODE_MANUAL
           
static String RUNMODE_NORMAL
          These constants are used when passing parameters to the AL in a TCB object.
static String RUNMODE_PLAYBACK
           
static String RUNMODE_RECORD
           
static String[] RUNMODES
           
static String TCB_CP_CHECKPOINTID
           
static String TCB_CP_CHECKPOINTOBJECT
           
static String TCB_CP_DISCARD_IWE
           
static String TCB_CP_FORCECLEAN
           
static String TCB_DEBUG_HOST
           
static String TCB_DEBUG_ONERROR
           
static String TCB_DEBUG_PORT
           
static String TCB_FORCE_REPLYCHANNEL
           
static String TCB_RUNMODE_PROPNAME
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AssemblyLine()
          Constructor for the AssemblyLine object
AssemblyLine(RSInterface parent, String taskName, Object param, Log log)
          Constructor for the AssemblyLine object
 
Method Summary
 void addRuntimeConnector(String name, ConnectorConfig config, boolean executeProlog)
          This method creates an ALComponent from the provided connector config.
 void addRuntimeIterator(String name, ConnectorInterface conn, boolean executeProlog)
          This method inserts a connector interface as an Iterator in the current AL.
 void bailout(Throwable error)
           
 void debug(Object msg)
          Logs a message to the AssemblyLine logfile
 void debugBreak(Object obj)
          This method sends an object for display to the debug panel and waits for a continue/stop message.
 void debugBreakError(Object obj)
          This method forces the debugger to stop if it runs in OnError mode.
 boolean debuggerEnabled()
          Returns status of the debugger session
 void debugMsg(Object obj)
          This method sends an object for display to the debug panel.
 void disableDebug()
          DEBUG METHODS This method disconnects any open debug session.
 void disableDebug(Object msg)
          This method sends a message to the remote UI and closes the debugger connection if it is open.
 void dump(Object o)
          This methods dumps an object to the log file.
 void dumpEntry(Entry entry)
          Prints the contents of an entry to the logfile.
 boolean enableDebug()
          This method invokes enableDebug(-1, null, false);
 boolean enableDebug(int port)
          This method invokes enableDebug(port, null, false);
 boolean enableDebug(int port, String host, boolean onerror)
          This method establishes a debugging session between this AL and a remote debugger client (e.g.
 Entry executeCycle()
          This method call executeCycle with a null initial work and processTCB set to true.
 Entry executeCycle(Entry workEntry)
          This method call executeCycle with the provided work entry and processTCB set to true.
 Entry executeCycle(Entry workEntry, boolean processTCB)
          This method is called by scripts and other classes that run the assemblyline in its own context.
 void executeInitializeAL()
          Internal method used by AssemblyLinePool.
 void executeMainLoop()
           
 void executeMainLoop(int untilState)
           
 void executeTerminateAL()
          Call this method when you want to terminate the AL that was started in Cycle mode.
 void executeWithALPool()
          Used if there is a Server Mode Connector.
 Object getConfig(String name)
          getConfig returns a named value from the AssemblyLine's configuration.
 AssemblyLineConfig getConfigClone()
           
 String getConfigStr(String name)
          getConfigStr returns a named string value from the AssemblyLine's configuration.
 AssemblyLineComponent getConnector(String name)
          Returns the AssemblyLineComponent with the given name.
 int getConnectorIndex(String name)
          Returns a connectors index
 int getConnectorIndex2(String name)
          Returns a connectors index
 ArrayList getConnectors()
          Gets the connectors attribute of the AssemblyLine object
 String getCurrentState()
          Returns the current assemblyline step position.
 int getCurrentStep()
           
 String getDatabase()
          Returns the database path/url where obj is recorded/played back.
 Switchboard getEventHandler()
           
 Log getLog()
          Gets the log attribute of the AssemblyLine object
 String getLogCategory()
          Returns the log4j category name used by this assemblyline.
 String getLogFilePath()
          Returns the logfile path relative to the working directory.
 String getNullBehavior()
          Gets the nullBehavior attribute of the AssemblyLine object
 String getNullBehaviorValue()
          Gets the nullBehaviorValue attribute of the AssemblyLine object
 String getNullDefinition()
          Gets the nullDefinition attribute of the AssemblyLine object
 String getNullDefinitionValue()
          Gets the nullDefinitionValue attribute of the AssemblyLine object
 Entry getOpEntry()
          Returns the operational entry
 Object getParam(String name)
          getParam returns the value for a user-defined parameter.
 RSInterface getParent()
          This method returns the RSInterface (main) object.
 String getPerfStats(String component)
           
 boolean getResetCheckpoint()
          Returns whether this assemblyline will force a clear of it's checkpoint store.
 Entry getResult()
          This method returns the result entry object.
 int getRunMode()
          Returns the runMode for the AL.
 ScriptEngine getScriptEngine()
          getScriptEngine returns the ScriptEngine object for the AssemblyLine.
 String getShortName()
          This method returns the short name of this AL.
 TaskStatistics getStats()
          This method returns the TaskStatistics object for this AssemblyLine.
 boolean getTerminationRequested()
          Returns the status of termination requested flag
 String getTombstoneUserMessage()
           
 Entry getUserCheckpoint()
          This method returns the user entry from the checkpoint store.
 Entry getWork()
          This method returns the initial work entry object.
 int hashCode()
           
 boolean hasServerModeConnector()
          Checks if this assemblyline contains an enabled server mode connector.
 void initExecuteProlog()
          This method is automatically called for AssemblyLines running in manual mode by the startAL() method.
 void initScriptEngine()
          This method creates the script engine instance.
 boolean isPlaying()
          Returns true if runMode == 2.
 boolean isPlaying(Object obj)
          Returns true if the object obj should be played back from server store.
 boolean isRecording()
          Returns true if runMode == 1.
 boolean isRecording(Object obj)
          Returns true if the object obj should be recorded.
 boolean isRestarting()
          Returns true if the AssemblyLine is in the process of restarting.
 AssemblyLineComponent loadConnector(BaseConfiguration config)
          This method enables the user to load an AssemblyLine component given a configuration.
 void logmonitor(String msg)
          Logs a message to the monitor.
 void logmsg(Object msg)
          Logs a message to the AssemblyLine logfile
 void logmsg(String level, String msg)
          This method logs a message with the specified level to the AssemblyLine log.
 void logPerfStats()
          Dumps a formatted message to the logfile the contents of a performance entry.
 void removeRuntimeConnector(String name)
          This methods removes a runtime connector from the AL.
 void resetIterators()
           
 void run()
          The run method kicks off the thread and starts AssemblyLine execution.
 void saveParams()
          This method saves the current AL params to the file configured in the AL settings
 void setConfig(String name, Object value)
          setConfig sets a named parameter value in the AssemblyLine's configuration.
 void setIgnoreInputComponents(boolean value)
           
 boolean setLogCategory(String categoryName)
          Sets the log4j category name used when requesting a logger.
 boolean setNextConnector(AssemblyLineComponent alc)
          Sets the next connector to execute.
 boolean setNextConnector(AssemblyLineComponent alc, boolean continueAfter)
           
 void setParam(String name, Object value)
          setParam sets the value for the user-defined parameter.
 void setPerfEnabled()
           
 void setResetCheckpoint(boolean resetCheckpointStore)
          Sets the reset-checkpoint flag.
 void setTombstoneUserMessage(String aUserMessage)
           
 Exception setUserCheckpoint(Entry cp)
          This method writes the user entry to the checkpoint store.
 void setWork(Entry entry)
          This method sets the initial work entry object.
 void shutdown()
          Request controlled shutdown of assemblyline
 void startPerfRecording(String component)
          Starts Performance Recording
 String stopPerfRecording(String component)
          Stops Performance Recording
 void terminate()
          Closes the connector and releases resources.
 boolean wasRestarted()
          Returns true if the AssemblyLine was restarted.
 
Methods inherited from class com.ibm.di.server.Monitor
addActionListener, addThread, allThreadsStopped, fireListener, removeActionListener, removeThread, runningALs, runningEHs, setMonitorMessage, threadStarted, threadStopped
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RUNMODE_NORMAL

public static final String RUNMODE_NORMAL
These constants are used when passing parameters to the AL in a TCB object.

See Also:
Constant Field Values

RUNMODE_RECORD

public static final String RUNMODE_RECORD
See Also:
Constant Field Values

RUNMODE_PLAYBACK

public static final String RUNMODE_PLAYBACK
See Also:
Constant Field Values

RUNMODE_MANUAL

public static final String RUNMODE_MANUAL
See Also:
Constant Field Values

RUNMODES

public static final String[] RUNMODES

RUNMODE_I_NORMAL

public static final int RUNMODE_I_NORMAL
See Also:
Constant Field Values

RUNMODE_I_RECORD

public static final int RUNMODE_I_RECORD
See Also:
Constant Field Values

RUNMODE_I_PLAYBACK

public static final int RUNMODE_I_PLAYBACK
See Also:
Constant Field Values

RUNMODE_I_MANUAL

public static final int RUNMODE_I_MANUAL
See Also:
Constant Field Values

TCB_RUNMODE_PROPNAME

public static final String TCB_RUNMODE_PROPNAME
See Also:
Constant Field Values

TCB_CP_FORCECLEAN

public static final String TCB_CP_FORCECLEAN
See Also:
Constant Field Values

TCB_CP_CHECKPOINTID

public static final String TCB_CP_CHECKPOINTID
See Also:
Constant Field Values

TCB_CP_CHECKPOINTOBJECT

public static final String TCB_CP_CHECKPOINTOBJECT
See Also:
Constant Field Values

TCB_CP_DISCARD_IWE

public static final String TCB_CP_DISCARD_IWE
See Also:
Constant Field Values

TCB_FORCE_REPLYCHANNEL

public static final String TCB_FORCE_REPLYCHANNEL
See Also:
Constant Field Values

OPENTRY_OPERATION

public static final String OPENTRY_OPERATION
See Also:
Constant Field Values

TCB_DEBUG_PORT

public static final String TCB_DEBUG_PORT
See Also:
Constant Field Values

TCB_DEBUG_HOST

public static final String TCB_DEBUG_HOST
See Also:
Constant Field Values

TCB_DEBUG_ONERROR

public static final String TCB_DEBUG_ONERROR
See Also:
Constant Field Values

PROPERTIES_FILE

public static final String PROPERTIES_FILE
See Also:
Constant Field Values
Constructor Detail

AssemblyLine

public AssemblyLine()
Constructor for the AssemblyLine object


AssemblyLine

public AssemblyLine(RSInterface parent,
                    String taskName,
                    Object param,
                    Log log)
             throws Exception
Constructor for the AssemblyLine object

Parameters:
parent - RSInterface of caller/creator
taskName - Name of assemblyline to run
param - Optional parameter(s)
log - Optional Log object for logging
Throws:
Exception - Thrown if taskName is an unknown assemblyline or if any of the connectors cannot be initialized
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setWork

public void setWork(Entry entry)
This method sets the initial work entry object. On the first/next cycle of the AssemblyLine, this object will present itself as the "work" object in the AssemblyLine. Any Iterators will be ignored for that cycle.

Parameters:
entry - The initial work entry

setParam

public void setParam(String name,
                     Object value)
setParam sets the value for the user-defined parameter. The user-defined parameter list is persisted between runs in the file specified in the AssemblyLine settings panel. This file is a simple text file with a "keyword:value" pair on each line.

Parameters:
name - The user-defined parameter name
value - The value associated with name

setConfig

public void setConfig(String name,
                      Object value)
setConfig sets a named parameter value in the AssemblyLine's configuration. The AssemblyLine configuration is not persisted between runs.

Parameters:
name - The AssemblyLine configuration parameter name
value - The value associated with name

getParent

public RSInterface getParent()
This method returns the RSInterface (main) object.

Specified by:
getParent in interface TaskInterface
Returns:
The main thread

getResult

public Entry getResult()
This method returns the result entry object. This object is a copy of the working entry as it were when the AssemblyLine finished processing the connectors.

Specified by:
getResult in interface TaskInterface
Returns:
The last "work" entry object

getWork

public Entry getWork()
This method returns the initial work entry object. If there are no Iterators in the AssemblyLine then this object should be set with the setWork method.

Specified by:
getWork in interface TaskInterface
Returns:
The initial work entry object

getLogFilePath

public String getLogFilePath()
Returns the logfile path relative to the working directory.

Returns:
The logfile path to which this AssemblyLine is logging information

getParam

public Object getParam(String name)
getParam returns the value for a user-defined parameter. The user-defined parameter list is persisted between runs in the file specified in the AssemblyLine settings panel. This file is a simple text file with a "keyword:value" pair on each line.

Parameters:
name - The user-defined parameter name
Returns:
The value or null if the parameter is undefined

getConfig

public Object getConfig(String name)
getConfig returns a named value from the AssemblyLine's configuration.

Specified by:
getConfig in interface TaskInterface
Parameters:
name - The AssemblyLine parameter name
Returns:
The value or null if the parameter is undefined

getConfigStr

public String getConfigStr(String name)
getConfigStr returns a named string value from the AssemblyLine's configuration.

Parameters:
name - The AssemblyLine parameter name
Returns:
The value or null if the parameter is undefined
See Also:
getConfig(java.lang.String)

getScriptEngine

public ScriptEngine getScriptEngine()
getScriptEngine returns the ScriptEngine object for the AssemblyLine. The ScriptEngine object allows you to define additional beans and also execute script code on the fly.

Specified by:
getScriptEngine in interface TaskInterface
Returns:
The com.ibm.di.script.ScriptEngine object

getStats

public TaskStatistics getStats()
This method returns the TaskStatistics object for this AssemblyLine.

Returns:
The accumulated TaskStatistics object

getConnector

public AssemblyLineComponent getConnector(String name)
Returns the AssemblyLineComponent with the given name. Mostly for internal use, when scripting you already have this object available using the name.

Specified by:
getConnector in interface TaskInterface
Parameters:
name - The connector name as specified in the configuration
Returns:
The AssemblyLineComponent

getConnectorIndex

public int getConnectorIndex(String name)
                      throws Exception
Returns a connectors index

Parameters:
name - The connector name as specified in the configuration
Returns:
The connectors index
Throws:
Exception

getConnectors

public ArrayList getConnectors()
Gets the connectors attribute of the AssemblyLine object

Returns:
The connectors value

getLog

public Log getLog()
Gets the log attribute of the AssemblyLine object

Specified by:
getLog in interface TaskInterface
Returns:
The log value

getNullBehavior

public String getNullBehavior()
Gets the nullBehavior attribute of the AssemblyLine object

Specified by:
getNullBehavior in interface TaskInterface
Returns:
The nullBehavior value

getNullBehaviorValue

public String getNullBehaviorValue()
Gets the nullBehaviorValue attribute of the AssemblyLine object

Specified by:
getNullBehaviorValue in interface TaskInterface
Returns:
The nullBehaviorValue value

getNullDefinition

public String getNullDefinition()
Gets the nullDefinition attribute of the AssemblyLine object

Specified by:
getNullDefinition in interface TaskInterface
Returns:
The nullDefinition value

getNullDefinitionValue

public String getNullDefinitionValue()
Gets the nullDefinitionValue attribute of the AssemblyLine object

Specified by:
getNullDefinitionValue in interface TaskInterface
Returns:
The nullDefinitionValue value

run

public void run()
The run method kicks off the thread and starts AssemblyLine execution.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

hasServerModeConnector

public boolean hasServerModeConnector()
Checks if this assemblyline contains an enabled server mode connector.

Returns:
true if the AL contains an enabled server mode connector.

terminate

public void terminate()
               throws Exception
Closes the connector and releases resources.

Throws:
Exception

addRuntimeIterator

public void addRuntimeIterator(String name,
                               ConnectorInterface conn,
                               boolean executeProlog)
                        throws Exception
This method inserts a connector interface as an Iterator in the current AL. The name parameter must match a connector in the AL config. The config is cloned and changed to Iterator mode and inherits from Virtual connector to force the ALComponent to use the provided connector interface. No initialize() is called for the connector. This method must be called AFTER the AL has loaded its connectors.

Throws:
Exception

addRuntimeConnector

public void addRuntimeConnector(String name,
                                ConnectorConfig config,
                                boolean executeProlog)
                         throws Exception
This method creates an ALComponent from the provided connector config. The connector must be Iterator or Server mode.

Throws:
Exception

removeRuntimeConnector

public void removeRuntimeConnector(String name)
                            throws Exception
This methods removes a runtime connector from the AL.

Throws:
Exception

loadConnector

public AssemblyLineComponent loadConnector(BaseConfiguration config)
                                    throws Exception
This method enables the user to load an AssemblyLine component given a configuration. This method differs from the system.loadConnector() in that it returns a complete AL connector with attribute maps and hooks enabled. The returned connector is not registered in the scripting environment and is not inserted into the general flow of the AL.

Parameters:
config - The component configuration (e.g. ConnectorConfig, FunctionConfig etc).
Returns:
The AssemblyLine component
Throws:
Exception

logmsg

public void logmsg(Object msg)
Logs a message to the AssemblyLine logfile

Specified by:
logmsg in interface TaskInterface
Parameters:
msg - The message

logmsg

public void logmsg(String level,
                   String msg)
This method logs a message with the specified level to the AssemblyLine log.

Parameters:
level - Loglevel. Legal values are FATAL, ERROR, WARN, INFO, DEBUG. Unrecognized keyword means DEBUG.
msg - The message

debug

public void debug(Object msg)
Logs a message to the AssemblyLine logfile

Parameters:
msg - The message

logmonitor

public void logmonitor(String msg)
Logs a message to the monitor. The monitor may be a Metamerge Monitor instance or a topic on the JMS system bus (if one is configured)

Parameters:
msg - The message

dump

public void dump(Object o)
This methods dumps an object to the log file.

Parameters:
o - The object to dump

dumpEntry

public void dumpEntry(Entry entry)
Prints the contents of an entry to the logfile.

Parameters:
entry - The entry object to print

disableDebug

public void disableDebug()
DEBUG METHODS This method disconnects any open debug session.


disableDebug

public void disableDebug(Object msg)
This method sends a message to the remote UI and closes the debugger connection if it is open.

Parameters:
msg - Message to be sent

enableDebug

public boolean enableDebug()
This method invokes enableDebug(-1, null, false);

Returns:
true if connection succeeded, false otherwise

enableDebug

public boolean enableDebug(int port)
This method invokes enableDebug(port, null, false);

Parameters:
port - The TCP port number of the remote debugger client
Returns:
True if a debug session was established (or already was established)

enableDebug

public boolean enableDebug(int port,
                           String host,
                           boolean onerror)
This method establishes a debugging session between this AL and a remote debugger client (e.g. CE).

Parameters:
port - The TCP port number of the remote debugger client
Returns:
True if a debug session was established (or already was established)

debuggerEnabled

public boolean debuggerEnabled()
Returns status of the debugger session

Returns:
true if there is a debugger session active, false if not

debugMsg

public void debugMsg(Object obj)
              throws Exception
This method sends an object for display to the debug panel.

Specified by:
debugMsg in interface TaskInterface
Parameters:
obj - The object to display. This object must be Serializable
Throws:
Exception - Serialization exception

debugBreak

public void debugBreak(Object obj)
                throws Exception
This method sends an object for display to the debug panel and waits for a continue/stop message. If a stop message is received an exception is thrown to signal termination of the AssemblyLine.

Specified by:
debugBreak in interface TaskInterface
Parameters:
obj - The object to display
Throws:
Exception - Serialization exception

debugBreakError

public void debugBreakError(Object obj)
                     throws Exception
This method forces the debugger to stop if it runs in OnError mode. Otherwise this method is identical to debugBreak(Object obj).

Parameters:
obj - The error
Throws:
Exception - Serialization exception

initScriptEngine

public void initScriptEngine()
                      throws Exception
This method creates the script engine instance. Main beans are registered and and user defined scripts are included from the library.

Throws:
Exception - Script engine exceptions

saveParams

public void saveParams()
This method saves the current AL params to the file configured in the AL settings


wasRestarted

public boolean wasRestarted()
Returns true if the AssemblyLine was restarted.


isRestarting

public boolean isRestarting()
Returns true if the AssemblyLine is in the process of restarting.


shutdown

public void shutdown()
Request controlled shutdown of assemblyline


getTerminationRequested

public boolean getTerminationRequested()
Returns the status of termination requested flag


getLogCategory

public String getLogCategory()
Returns the log4j category name used by this assemblyline.


setLogCategory

public boolean setLogCategory(String categoryName)
Sets the log4j category name used when requesting a logger. If a logger object has been provided to the AL already this method returns false to signal that setting the value has no effect.

Parameters:
categoryName - The logj4 category name
Returns:
True if setting the value will have effect.

executeInitializeAL

public void executeInitializeAL()
Internal method used by AssemblyLinePool.


executeMainLoop

public void executeMainLoop()

executeMainLoop

public void executeMainLoop(int untilState)

executeTerminateAL

public void executeTerminateAL()
                        throws Exception
Call this method when you want to terminate the AL that was started in Cycle mode.

Throws:
Exception

resetIterators

public void resetIterators()
                    throws Throwable
Throws:
Throwable

initExecuteProlog

public void initExecuteProlog()
                       throws Exception
This method is automatically called for AssemblyLines running in manual mode by the startAL() method.

Throws:
Exception

executeCycle

public Entry executeCycle()
                   throws Throwable
This method call executeCycle with a null initial work and processTCB set to true.

Throws:
Throwable

executeCycle

public Entry executeCycle(Entry workEntry)
                   throws Throwable
This method call executeCycle with the provided work entry and processTCB set to true.

Throws:
Throwable

executeCycle

public Entry executeCycle(Entry workEntry,
                          boolean processTCB)
                   throws Throwable
This method is called by scripts and other classes that run the assemblyline in its own context. The AL must be created in "Cycle" mode to execute this method. If the workEntry is provided then this becomes the work entry and any iterators in the AL is not called. If the AL contains iterator(s) and you don't provide a work entry, the AL will keep returning results as long as the iterator(s) return data. At end of data, a null entry is returned.

Parameters:
workEntry - The work entry to use, or null to use an empty work entry/iterator entry
processTCB - If true, the AL's call/return attribute maps are applied to the provided entry and returned entry
Returns:
The work entry at the end of the cycle
Throws:
Exception - when method is called and AL was not started in "Cycle" mode or this method is called after having returned a null entry (e.g. end of iteration)
Throwable

getCurrentState

public String getCurrentState()
Returns the current assemblyline step position.


bailout

public void bailout(Throwable error)

getConnectorIndex2

public int getConnectorIndex2(String name)
                       throws Exception
Returns a connectors index

Parameters:
name - The connector name as specified in the configuration
Returns:
The connectors index
Throws:
Exception

getUserCheckpoint

public Entry getUserCheckpoint()
                        throws Exception
This method returns the user entry from the checkpoint store.

Throws:
Exception

setUserCheckpoint

public Exception setUserCheckpoint(Entry cp)
                            throws Exception
This method writes the user entry to the checkpoint store.

Throws:
Exception

getRunMode

public int getRunMode()
Returns the runMode for the AL.


getResetCheckpoint

public boolean getResetCheckpoint()
Returns whether this assemblyline will force a clear of it's checkpoint store. If the flag is true then the assemblyline will force a clear of the checkpoint identifier provided either by a runtime parameter or by the internal configured checkpoint id.


setResetCheckpoint

public void setResetCheckpoint(boolean resetCheckpointStore)
Sets the reset-checkpoint flag. See getResetCheckpoint() for an explanation.


isRecording

public boolean isRecording()
Returns true if runMode == 1.


isPlaying

public boolean isPlaying()
Returns true if runMode == 2.


isRecording

public boolean isRecording(Object obj)
Returns true if the object obj should be recorded.

Specified by:
isRecording in interface RecordPlaybackInterface

isPlaying

public boolean isPlaying(Object obj)
Returns true if the object obj should be played back from server store.

Specified by:
isPlaying in interface RecordPlaybackInterface

getDatabase

public String getDatabase()
Returns the database path/url where obj is recorded/played back.

Specified by:
getDatabase in interface RecordPlaybackInterface

getShortName

public String getShortName()
This method returns the short name of this AL.

Returns:
The name without the "AssemblyLines/" prefix.

executeWithALPool

public void executeWithALPool()
Used if there is a Server Mode Connector. Create an AssemblyLinePool and use this for executing


getEventHandler

public Switchboard getEventHandler()

setIgnoreInputComponents

public void setIgnoreInputComponents(boolean value)

getCurrentStep

public int getCurrentStep()

setNextConnector

public boolean setNextConnector(AssemblyLineComponent alc)
                         throws Exception
Sets the next connector to execute.

Parameters:
alc - The connector to execute
Returns:
Returns true if the next connector to execute is set. Otherwise, false is returned.
Throws:
Exception

setNextConnector

public boolean setNextConnector(AssemblyLineComponent alc,
                                boolean continueAfter)
                         throws Exception
Throws:
Exception

getConfigClone

public AssemblyLineConfig getConfigClone()
                                  throws Exception
Throws:
Exception

setTombstoneUserMessage

public void setTombstoneUserMessage(String aUserMessage)

getTombstoneUserMessage

public String getTombstoneUserMessage()

getOpEntry

public Entry getOpEntry()
Returns the operational entry


startPerfRecording

public void startPerfRecording(String component)
Starts Performance Recording

Parameters:
component - Unique ComponentID

stopPerfRecording

public String stopPerfRecording(String component)
Stops Performance Recording

Parameters:
component - Unique ComponentID

getPerfStats

public String getPerfStats(String component)

logPerfStats

public void logPerfStats()
Dumps a formatted message to the logfile the contents of a performance entry.

See Also:
dump(java.lang.Object)

setPerfEnabled

public void setPerfEnabled()