org.objectweb.fractal.task.core.internal
Class BasicTaskFactory

java.lang.Object
  extended by org.objectweb.fractal.task.core.internal.BasicTaskFactory
All Implemented Interfaces:
org.objectweb.fractal.api.control.BindingController, CompositeTaskFactory, PrimitiveTaskFactory, TaskFactory

public class BasicTaskFactory
extends java.lang.Object
implements TaskFactory, org.objectweb.fractal.api.control.BindingController

Basic TaskFactory component. This component simply delegates requests to its compositeTaskFactoryItf client interface or its primitiveTaskFactoryItf client interface.


Field Summary
static java.lang.String COMPOSITE_TASK_FACTORY_ITF_NAME
          The name of the client interface bound to the CompositeTaskFactory.
 CompositeTaskFactory compositeTaskFactoryItf
          The client interface bound to the CompositeTaskFactory.
static java.lang.String PRIMITIVE_TASK_FACTORY_ITF_NAME
          The name of the client interface bound to the PrimitiveTaskFactory.
 PrimitiveTaskFactory primitiveTaskFactoryItf
          The client interface bound to the PrimitiveTaskFactory.
 
Fields inherited from interface org.objectweb.fractal.task.core.TaskFactory
EXPORT_ALL
 
Constructor Summary
BasicTaskFactory()
           
 
Method Summary
 void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
           
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String clientItfName)
           
 org.objectweb.fractal.api.Component newCompositeTask(java.util.Collection<org.objectweb.fractal.api.Component> subTasks, java.lang.String compositionName, java.util.Map<java.lang.Object,java.lang.Object> context, java.lang.Object... parameters)
          Creates a composite task component.
 org.objectweb.fractal.api.Component newCompositeTask(java.util.Collection<org.objectweb.fractal.api.Component> subTasks, java.lang.String compositionName, java.lang.String compositeName, java.util.Map<java.lang.Object,java.lang.Object> context, java.lang.Object... parameters)
          Creates a composite task component.
 org.objectweb.fractal.api.Component newPrimitiveTask(java.lang.Object implementation, java.lang.Object... parameters)
          Creates a primitive task component.
 void unbindFc(java.lang.String clientItfName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPOSITE_TASK_FACTORY_ITF_NAME

public static final java.lang.String COMPOSITE_TASK_FACTORY_ITF_NAME
The name of the client interface bound to the CompositeTaskFactory.

See Also:
Constant Field Values

compositeTaskFactoryItf

public CompositeTaskFactory compositeTaskFactoryItf
The client interface bound to the CompositeTaskFactory.


PRIMITIVE_TASK_FACTORY_ITF_NAME

public static final java.lang.String PRIMITIVE_TASK_FACTORY_ITF_NAME
The name of the client interface bound to the PrimitiveTaskFactory.

See Also:
Constant Field Values

primitiveTaskFactoryItf

public PrimitiveTaskFactory primitiveTaskFactoryItf
The client interface bound to the PrimitiveTaskFactory.

Constructor Detail

BasicTaskFactory

public BasicTaskFactory()
Method Detail

newCompositeTask

public org.objectweb.fractal.api.Component newCompositeTask(java.util.Collection<org.objectweb.fractal.api.Component> subTasks,
                                                            java.lang.String compositionName,
                                                            java.util.Map<java.lang.Object,java.lang.Object> context,
                                                            java.lang.Object... parameters)
                                                     throws TaskException
Description copied from interface: CompositeTaskFactory
Creates a composite task component.

Specified by:
newCompositeTask in interface CompositeTaskFactory
Parameters:
subTasks - the sub tasks of the composite task.
compositionName - the name of the composition schema to apply to the created composite.
context - context.
parameters - the parameters of the composition schema.
Returns:
a composite task component that contains the given sub tasks bound as described in the composition schema.
Throws:
TaskException - if an error occurs.

newCompositeTask

public org.objectweb.fractal.api.Component newCompositeTask(java.util.Collection<org.objectweb.fractal.api.Component> subTasks,
                                                            java.lang.String compositionName,
                                                            java.lang.String compositeName,
                                                            java.util.Map<java.lang.Object,java.lang.Object> context,
                                                            java.lang.Object... parameters)
                                                     throws TaskException
Description copied from interface: CompositeTaskFactory
Creates a composite task component.

Specified by:
newCompositeTask in interface CompositeTaskFactory
Parameters:
subTasks - the sub tasks of the composite task.
compositionName - the name of the composition schema to apply to the created composite.
compositeName - the name of the created composite.
context - context.
parameters - the parameters of the composition schema.
Returns:
a composite task component that contains the given sub tasks bound as described in the composition schema.
Throws:
TaskException - if an error occurs.

newPrimitiveTask

public org.objectweb.fractal.api.Component newPrimitiveTask(java.lang.Object implementation,
                                                            java.lang.Object... parameters)
                                                     throws TaskException
Description copied from interface: PrimitiveTaskFactory
Creates a primitive task component.

Specified by:
newPrimitiveTask in interface PrimitiveTaskFactory
Parameters:
implementation - the implementation of the task.
parameters - the parameters of the task.
Returns:
a task component.
Throws:
TaskException - if an error occurs while instantiating the task.

listFc

public java.lang.String[] listFc()
Specified by:
listFc in interface org.objectweb.fractal.api.control.BindingController

bindFc

public void bindFc(java.lang.String clientItfName,
                   java.lang.Object serverItf)
            throws org.objectweb.fractal.api.NoSuchInterfaceException,
                   org.objectweb.fractal.api.control.IllegalBindingException,
                   org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
bindFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException

lookupFc

public java.lang.Object lookupFc(java.lang.String clientItfName)
                          throws org.objectweb.fractal.api.NoSuchInterfaceException
Specified by:
lookupFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException

unbindFc

public void unbindFc(java.lang.String clientItfName)
              throws org.objectweb.fractal.api.NoSuchInterfaceException,
                     org.objectweb.fractal.api.control.IllegalBindingException,
                     org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
unbindFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException


Copyright © 2007-2009 ObjectWeb Consortium. All Rights Reserved.