*
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:
java.lang.Runnable, com.architech.TaskInterface

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


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()
           
rscTask(com.architech.RSInterface parent, java.lang.String taskName, java.lang.Object conn, com.architech.rsLog log)
           
rscTask(com.architech.RSInterface parent, java.lang.String taskName, java.util.TreeMap config)
           
 
Method Summary
 void close()
          The close method terminates all connectors
 void debugBreak(java.lang.Object obj)
          This method sends an object for display to the debug panel and waits for a continue/stop message.
 void debugMsg(java.lang.Object obj)
          This method sends an object for display to the debug panel.
 void disableDebug()
          This method disconnects any open debug session.
 void dumpEntry(Entry entry)
          Prints the contents of an entry to the logfile.
 boolean enableDebug()
          This method connects to Metamerge Admin debug panel.
 java.lang.Object getConfig(java.lang.String name)
          getConfig returns a named value from the assembly line's configuration.
 rscTaskComponent getConnector(java.lang.String name)
          Returns a connector object from the
 com.architech.rsLog getLog()
           
 java.lang.String getLogFilePath()
          Returns the logfile path relative to the working directory.
 java.lang.Object getParam(java.lang.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.
 void loadScript(java.lang.String name, boolean forceInclude)
          This method includes a script in the current script engine context.
 void logmonitor(java.lang.String msg)
          Logs a message to the monitor.
 void logmsg(java.lang.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(java.lang.String name, java.lang.Object value)
          setConfig sets a named parameter value in the assembly line's configuration.
 void setParam(java.lang.String name, java.lang.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()
           
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

rscTask

public rscTask(com.architech.RSInterface parent,
               java.lang.String taskName,
               java.lang.Object conn,
               com.architech.rsLog log)
        throws java.lang.Exception

rscTask

public rscTask(com.architech.RSInterface parent,
               java.lang.String taskName,
               java.util.TreeMap config)
        throws java.lang.Exception

rscTask

public rscTask()
Method Detail

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

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

getLogFilePath

public java.lang.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 java.lang.Object getParam(java.lang.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

setParam

public void setParam(java.lang.String name,
                     java.lang.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

getConfig

public java.lang.Object getConfig(java.lang.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

setConfig

public void setConfig(java.lang.String name,
                      java.lang.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

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

run

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

close

public void close()
The close method terminates all connectors

terminate

public void terminate()

initConnectors

public void initConnectors()
                    throws java.lang.Exception
This method initializes all connectors and prepares them for the assembly line run.

runTask

public void runTask()
             throws java.lang.Exception
This method is called from the run() method to perform the main loop.

getStats

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

logmsg

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

logmonitor

public void logmonitor(java.lang.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

getConnector

public rscTaskComponent getConnector(java.lang.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

getLog

public com.architech.rsLog getLog()
Specified by:
getLog in interface com.architech.TaskInterface

disableDebug

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

enableDebug

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

debugMsg

public void debugMsg(java.lang.Object obj)
              throws java.lang.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

debugBreak

public void debugBreak(java.lang.Object obj)
                throws java.lang.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

loadScript

public void loadScript(java.lang.String name,
                       boolean forceInclude)
                throws java.lang.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)


*
  Metamerge Integrator version 4.5 ©Copyright Metamerge AS 2000-2002 Last edited 2002-04-30 contact us