
org.objectweb.fractal.task.deployment.lib.AbstractRequireInstanceProviderTask Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of task-deployment Show documentation
Show all versions of task-deployment Show documentation
This module provides facilities for deployment tasks.
The newest version!
/*====================================================================
ObjectWeb Deployment Framework
Copyright (C) 2004-2006 INRIA - USTL - LIFL - GOAL
Copyright (C) 2006-2007 STMicroelectronics
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
Initial developer(s): Philippe Merle, Frederic Briclet.
Contributor(s): Eric Bruneton.
====================================================================
$Id: AbstractRequireInstanceProviderTask.java 3624 2007-07-24 14:50:38Z apace $
====================================================================*/
package org.objectweb.fractal.task.deployment.lib;
import org.objectweb.fractal.task.core.AbstractTask;
import org.objectweb.fractal.task.core.TaskMap;
import org.objectweb.fractal.task.deployment.api.InstanceProviderTask;
import org.objectweb.fractal.task.deployment.api.RequireInstanceProviderTask;
/**
* AbstractRequireInstanceProviderTask implements RequireInstanceProviderTask.
*
* Subclasses must implement: - public void execute(Object context) throws
* Exception; - public Object getResult(); - public void setResult(Object
* result);
*
* @author Philippe Merle
* @author Frederic Briclet
*
* @version 0.2
*/
public abstract class AbstractRequireInstanceProviderTask extends AbstractTask
implements RequireInstanceProviderTask {
// ==================================================================
//
// Internal state.
//
// ==================================================================
/** Reference to the component instance provider task. */
private TaskMap.TaskHole instanceProviderTask;
// ==================================================================
//
// Constructor.
//
// ==================================================================
/** The default constructor. */
public AbstractRequireInstanceProviderTask() {
// Call the default AbstractTask constructor.
super();
}
// ==================================================================
//
// Public methods for
// org.objectweb.deployment.scheduling.component.api.RequireInstanceProviderTask
//
// ==================================================================
/**
* Return the component instance provider task.
*
* @return The component instance provider task.
*/
public InstanceProviderTask getInstanceProviderTask() {
return (instanceProviderTask) == null ? null
: (InstanceProviderTask) instanceProviderTask.getTask();
}
/**
* Set the component instance provider task.
*
* @param task -
* The component instance provider task.
*/
public void setInstanceProviderTask(TaskMap.TaskHole task) {
if (instanceProviderTask != null)
removePreviousTask(instanceProviderTask);
instanceProviderTask = task;
if (instanceProviderTask != null)
addPreviousTask(instanceProviderTask);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy