org.ow2.util.execution.helper
Class RunnableHelper<T>

java.lang.Object
  extended by org.ow2.util.execution.helper.RunnableHelper<T>
Type Parameters:
T - execution result type.
All Implemented Interfaces:
IRunner<T>

public final class RunnableHelper<T>
extends java.lang.Object
implements IRunner<T>

Helps to run blocks of code under a controlled environment.

Author:
Guillaume Sauthier

Constructor Summary
RunnableHelper()
           
 
Method Summary
 ExecutionResult<T> execute(java.lang.ClassLoader loader, IExecution<T> exec)
          Run a code block in the context of a given ClassLoader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunnableHelper

public RunnableHelper()
Method Detail

execute

public ExecutionResult<T> execute(java.lang.ClassLoader loader,
                                  IExecution<T> exec)
Run a code block in the context of a given ClassLoader.

Specified by:
execute in interface IRunner<T>
Parameters:
loader - The ClassLoader to be used as TCCL.
exec - code block.
Returns:
the result of this execution.


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