*
Metamerge logo
Search

Advanced Search
*
*
*
* HOME DOCUMENTS & RESOURCES DOWNLOADS EARLY TECH ACCESS SUPPORT FAQ KNOWN ISSUES OLD VERSIONS

 

*

 


com.architech
Class rscTask

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.architech.rsMonitor
              |
              +--com.architech.rscTask
All Implemented Interfaces:
Runnable, com.architech.TaskInterface

public class rscTask
extends com.architech.rsMonitor
implements com.architech.TaskInterface

Description of the Class

Author:
bjorn@metamerge.com

Fields inherited from class com.architech.rsMonitor
actionListener, monitoredThreads
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
rscTask()
          Constructor for the rscTask object
rscTask(com.architech.RSInterface parent, String taskName, Object conn, com.architech.rsLog log)
          Constructor for the rscTask object
rscTask(com.architech.RSInterface parent, String taskName, TreeMap config)
          Constructor for the rscTask object
 
Method Summary
 void close()
          The close method terminates all connectors
 void debug(Object msg)
          Logs a message to the assembly line logfile
 void debugBreak(Object obj)
          This method sends an object for display to the debug panel and waits for a continue/stop message.
 boolean debuggerEnabled()
          Description of the Method
 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)
          Description of the Method
 void dumpEntry(Entry entry)
          Prints the contents of an entry to the logfile.
 boolean enableDebug()
          This method connects to Metamerge Admin debug panel.
 boolean enableDebug(int port)
          Description of the Method
 Object getConfig(String name)
          getConfig returns a named value from the assembly line's configuration.
 rscTaskComponent getConnector(String name)
          Returns a connector object from the
 ArrayList getConnectors()
          Gets the connectors attribute of the rscTask object
 com.architech.rsLog getLog()
          Gets the log attribute of the rscTask object
 String getLogFilePath()
          Returns the logfile path relative to the working directory.
 String getNullBehavior()
          Gets the nullBehavior attribute of the rscTask object
 String getNullBehaviorValue()
          Gets the nullBehaviorValue attribute of the rscTask object
 Object getParam(String name)
          getParam returns the value for a user-defined parameter.
 com.architech.RSInterface getParent()
          This method returns the RSInterface (main) object.
 Entry getResult()
          This method returns the result entry object.
 com.architech.script.scriptEngine getScriptEngine()
          getScriptEngine returns the scriptEngine object for the assembly line.
 com.architech.rsStats getStats()
          This method returns the statistics object.
 Entry getWork()
          This method returns the initial work entry object.
 void initConnectors()
          This method initializes all connectors and prepares them for the assembly line run.
protected  void initScriptEngine()
          Description of the Method
 void loadConnectors()
          This method loads all connectors and prepares them for the assembly line run.
 void loadScript(String name, boolean forceInclude)
          This method includes a script in the current script engine context.
 void logmonitor(String msg)
          Logs a message to the monitor.
 void logmsg(Object msg)
          Logs a message to the assembly line logfile
 void run()
          The run method kicks off the thread and starts assembly line execution.
 void runTask()
          This method is called from the run() method to perform the main loop.
 void setConfig(String name, Object value)
          setConfig sets a named parameter value in the assembly line's configuration.
 void setParam(String name, Object value)
          setParam sets the value for the user-defined parameter.
 void setWork(Entry entry)
          This method sets the initial work entry object.
 void terminate()
          Description of the Method
 
Methods inherited from class com.architech.rsMonitor
addActionListener, addThread, fireListener, removeActionListener, removeThread, setMonitorMessage, threadStarted, threadStopped
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

rscTask

public rscTask(com.architech.RSInterface parent,
               String taskName,
               Object conn,
               com.architech.rsLog log)
        throws Exception
Constructor for the rscTask object
Parameters:
parent - Description of Parameter
taskName - Description of Parameter
conn - Description of Parameter
log - Description of Parameter
Throws:
Exception - Description of Exception

rscTask

public rscTask(com.architech.RSInterface parent,
               String taskName,
               TreeMap config)
        throws Exception
Constructor for the rscTask object
Parameters:
parent - Description of Parameter
taskName - Description of Parameter
config - Description of Parameter
Throws:
Exception - Description of Exception

rscTask

public rscTask()
Constructor for the rscTask object
Method Detail

setWork

public void setWork(Entry entry)
This method sets the initial work entry object. When no iterators are present in the assembly line this object will present itself as the "work" object in the assembly line.
Parameters:
entry - The initiali 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 assembly line 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 assembly line'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 com.architech.RSInterface getParent()
This method returns the RSInterface (main) object.
Specified by:
getParent in interface com.architech.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 assembly line finished processing the connectors.
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 assembly line then this object should be set with the setWork method.
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 assembly line 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 assembly line 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 assembly line's configuration.
Specified by:
getConfig in interface com.architech.TaskInterface
Parameters:
name - The assemblyline parameter name
Returns:
The value or null if the parameter is undefined

getScriptEngine

public com.architech.script.scriptEngine getScriptEngine()
getScriptEngine returns the scriptEngine object for the assembly line. The scriptEngine object allows you to define additional beans and also execute script code on the fly.
Specified by:
getScriptEngine in interface com.architech.TaskInterface
Returns:
The com.architech.script.scriptEngine object

getStats

public com.architech.rsStats getStats()
This method returns the statistics object.
Returns:
The accumulated statistics object

getConnector

public rscTaskComponent getConnector(String name)
Returns a connector object from the
Specified by:
getConnector in interface com.architech.TaskInterface
Parameters:
name - The connector name as specified in the configuration
Returns:
The connector value

getConnectors

public ArrayList getConnectors()
Gets the connectors attribute of the rscTask object
Returns:
The connectors value

getLog

public com.architech.rsLog getLog()
Gets the log attribute of the rscTask object
Specified by:
getLog in interface com.architech.TaskInterface
Returns:
The log value

getNullBehavior

public String getNullBehavior()
Gets the nullBehavior attribute of the rscTask object
Specified by:
getNullBehavior in interface com.architech.TaskInterface
Returns:
The nullBehavior value

getNullBehaviorValue

public String getNullBehaviorValue()
Gets the nullBehaviorValue attribute of the rscTask object
Specified by:
getNullBehaviorValue in interface com.architech.TaskInterface
Returns:
The nullBehaviorValue value

run

public void run()
The run method kicks off the thread and starts assembly line execution.
Overrides:
run in class Thread

close

public void close()
The close method terminates all connectors

terminate

public void terminate()
Description of the Method

loadConnectors

public void loadConnectors()
                    throws Exception
This method loads all connectors and prepares them for the assembly line run.
Throws:
Exception - Description of Exception

initConnectors

public void initConnectors()
                    throws Exception
This method initializes all connectors and prepares them for the assembly line run.
Throws:
Exception - Description of Exception

runTask

public void runTask()
             throws Exception
This method is called from the run() method to perform the main loop.
Throws:
Exception - Description of Exception

logmsg

public void logmsg(Object msg)
Logs a message to the assembly line logfile
Specified by:
logmsg in interface com.architech.TaskInterface
Parameters:
msg - The message

debug

public void debug(Object msg)
Logs a message to the assembly line 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

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)
Description of the Method
Parameters:
msg - Description of Parameter

enableDebug

public boolean enableDebug()
This method connects to Metamerge Admin debug panel.
Returns:
true if connection succeeded, false otherwise

enableDebug

public boolean enableDebug(int port)
Description of the Method
Parameters:
port - Description of Parameter
Returns:
Description of the Returned Value

debuggerEnabled

public boolean debuggerEnabled()
Description of the Method
Returns:
Description of the Returned Value

debugMsg

public void debugMsg(Object obj)
              throws Exception
This method sends an object for display to the debug panel.
Specified by:
debugMsg in interface com.architech.TaskInterface
Parameters:
obj - The object to display. This object must be Serializable
Throws:
Exception - Description of 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 assembly line.
Specified by:
debugBreak in interface com.architech.TaskInterface
Parameters:
obj - The object to display
Throws:
Exception - Description of Exception

loadScript

public void loadScript(String name,
                       boolean forceInclude)
                throws Exception
This method includes a script in the current script engine context. Use this method to dynamically make functions and variables available in the script context.
Parameters:
name - The script library name
forceInclude - Force inclusion of the script (in case autoinclude is false)
Throws:
Exception - Description of Exception

initScriptEngine

protected void initScriptEngine()
                         throws Exception
Description of the Method
Throws:
Exception - Description of Exception


Copyright © 1999-2001 Metamerge AS. All Rights Reserved.
*

 

  Metamerge Integrator version 4.6 ©Copyright Metamerge AS 2000-2002 Last edited 2002-05-07 contact us