org.apache.servicemix.executors
Class WorkManagerWrapper

java.lang.Object
  extended by org.apache.servicemix.executors.WorkManagerWrapper
All Implemented Interfaces:
WorkManager

public class WorkManagerWrapper
extends Object
implements WorkManager

This helper class is a simple wrapper around the Executor interface to provide a WorkManager. Note that the implementation is really simplistic and all calls will delegate to the execute method of the internal Executor.

Author:
Guillaume Nodet

Field Summary
 
Fields inherited from interface javax.resource.spi.work.WorkManager
IMMEDIATE, INDEFINITE, UNKNOWN
 
Constructor Summary
WorkManagerWrapper(Executor executor)
           
 
Method Summary
 void doWork(Work work)
           
 void doWork(Work work, long startTimeout, ExecutionContext execContext, WorkListener workListener)
           
 void scheduleWork(Work work)
           
 void scheduleWork(Work work, long startTimeout, ExecutionContext execContext, WorkListener workListener)
           
 long startWork(Work work)
           
 long startWork(Work work, long startTimeout, ExecutionContext execContext, WorkListener workListener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkManagerWrapper

public WorkManagerWrapper(Executor executor)
Method Detail

doWork

public void doWork(Work work)
            throws WorkException
Specified by:
doWork in interface WorkManager
Throws:
WorkException

doWork

public void doWork(Work work,
                   long startTimeout,
                   ExecutionContext execContext,
                   WorkListener workListener)
            throws WorkException
Specified by:
doWork in interface WorkManager
Throws:
WorkException

scheduleWork

public void scheduleWork(Work work)
                  throws WorkException
Specified by:
scheduleWork in interface WorkManager
Throws:
WorkException

scheduleWork

public void scheduleWork(Work work,
                         long startTimeout,
                         ExecutionContext execContext,
                         WorkListener workListener)
                  throws WorkException
Specified by:
scheduleWork in interface WorkManager
Throws:
WorkException

startWork

public long startWork(Work work)
               throws WorkException
Specified by:
startWork in interface WorkManager
Throws:
WorkException

startWork

public long startWork(Work work,
                      long startTimeout,
                      ExecutionContext execContext,
                      WorkListener workListener)
               throws WorkException
Specified by:
startWork in interface WorkManager
Throws:
WorkException


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.