eXo Kernel :: Container Multi-Threaded 2.5.0-CR2

org.exoplatform.container
Class ComponentTask<T>

java.lang.Object
  extended by org.exoplatform.container.ComponentTask<T>

public abstract class ComponentTask<T>
extends Object

This class represents a task to be launched to change the state of a component

Version:
$Id$
Author:
Nicolas Filotto

Constructor Summary
ComponentTask(ConcurrentContainerMT container, DependencyStackListener caller, ComponentTaskType type)
          The main constructor of a task
ComponentTask(String name, ConcurrentContainerMT container, DependencyStackListener caller, ComponentTaskType type)
          The main constructor of a task
 
Method Summary
 T call(ConcurrentContainer.CreationalContextComponentAdapter<?> cCtx)
           
protected abstract  T execute(ConcurrentContainer.CreationalContextComponentAdapter<?> cCtx)
          This is what is actually executed
 DependencyStackListener getCaller()
           
 ConcurrentContainerMT getContainer()
           
 String getName()
           
 ComponentTaskType getType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentTask

public ComponentTask(ConcurrentContainerMT container,
                     DependencyStackListener caller,
                     ComponentTaskType type)
The main constructor of a task


ComponentTask

public ComponentTask(String name,
                     ConcurrentContainerMT container,
                     DependencyStackListener caller,
                     ComponentTaskType type)
The main constructor of a task

Method Detail

getName

public String getName()
Returns:
the name

getContainer

public ConcurrentContainerMT getContainer()
Returns:
the container

getCaller

public DependencyStackListener getCaller()
Returns:
the caller

getType

public ComponentTaskType getType()
Returns:
the type of the task

call

public final T call(ConcurrentContainer.CreationalContextComponentAdapter<?> cCtx)
             throws Exception
Throws:
Exception

execute

protected abstract T execute(ConcurrentContainer.CreationalContextComponentAdapter<?> cCtx)
                      throws Exception
This is what is actually executed

Throws:
Exception

eXo Kernel :: Container Multi-Threaded 2.5.0-CR2

Copyright © 2014 eXo Platform SAS. All Rights Reserved.