From 3ab3efa97049fbfc69075f9ebdefc115babbb3cb Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Tue, 12 Jun 2001 13:37:29 +0000 Subject: [PATCH] Made Executor support a TaskFrame. The TaskFrame is where context/logger/componentManager/typeManager are stored. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269150 13f79535-47bb-0310-9956-ffa450edef68 --- .../components/executor/ExecutionFrame.java | 26 +++++++++++++++++++ .../components/executor/Executor.java | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/ExecutionFrame.java diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/ExecutionFrame.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/ExecutionFrame.java new file mode 100644 index 000000000..22f354ced --- /dev/null +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/ExecutionFrame.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) The Apache Software Foundation. All rights reserved. + * + * This software is published under the terms of the Apache Software License + * version 1.1, a copy of which has been included with this distribution in + * the LICENSE file. + */ +package org.apache.myrmidon.components.executor; + +import org.apache.avalon.framework.component.ComponentManager; +import org.apache.log.Logger; +import org.apache.myrmidon.components.type.TypeManager; +import org.apache.myrmidon.api.TaskContext; + +/** + * Frames in which tasks are executed. + * + * @author Peter Donald + */ +public interface ExecutionFrame +{ + TypeManager getTypeManager(); + Logger getLogger(); + TaskContext getContext(); + ComponentManager getComponentManager(); +} diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/Executor.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/Executor.java index 2195fb9a6..e41dcf9da 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/Executor.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/Executor.java @@ -28,6 +28,6 @@ public interface Executor * @param task the configruation data for task * @exception TaskException if an error occurs */ - void execute( Configuration task, TaskContext context ) + void execute( Configuration task, ExecutionFrame frame ) throws TaskException; }