1 package org
.argeo
.slc
.core
.runtime
;
4 import java
.util
.Properties
;
6 import org
.apache
.commons
.logging
.Log
;
7 import org
.apache
.commons
.logging
.LogFactory
;
8 import org
.argeo
.slc
.execution
.ExecutionModulesManager
;
9 import org
.argeo
.slc
.process
.SlcExecution
;
10 import org
.argeo
.slc
.runtime
.SlcApplication
;
11 import org
.argeo
.slc
.runtime
.SlcExecutionContext
;
13 public abstract class AbstractAgent
{
14 private final static Log log
= LogFactory
.getLog(AbstractAgent
.class);
16 // private SlcApplication<SlcExecutionContext> slcApplication;
18 private ExecutionModulesManager modulesManager
;
20 protected void runSlcExecution(final SlcExecution slcExecution
) {
21 modulesManager
.process(slcExecution
);
22 // Thread thread = new Thread("SlcExecution " + slcExecution.getUuid()) {
23 // public void run() {
24 // Properties props = new Properties();
25 // Map<String, String> attributes = slcExecution.getAttributes();
26 // for (String key : attributes.keySet()) {
27 // props.setProperty(key, attributes.get(key));
28 // if (log.isTraceEnabled())
29 // log.trace(key + "=" + props.getProperty(key));
31 // slcApplication.execute(slcExecution, props, null, null);
32 // log.debug("Thread for SLC execution #" + slcExecution.getUuid()
39 public void setModulesManager(ExecutionModulesManager modulesManager
) {
40 this.modulesManager
= modulesManager
;
44 // public void setSlcApplication(
45 // SlcApplication<SlcExecutionContext> application) {
46 // this.slcApplication = application;