com.caucho.jca.ra
Class WorkManagerImpl

java.lang.Object
  extended by com.caucho.jca.ra.WorkManagerImpl
All Implemented Interfaces:
WorkManager

@Module
public class WorkManagerImpl
extends java.lang.Object
implements WorkManager

Implementation of the work manager.


Field Summary
 
Fields inherited from interface javax.resource.spi.work.WorkManager
IMMEDIATE, INDEFINITE, UNKNOWN
 
Method Summary
 void destroy()
          Closes the work manager.
 void doWork(Work work)
          Accepts a work instance for processing.
 void doWork(Work work, long startTimeout, ExecutionContext context, WorkListener listener)
          Accepts a work instance for processing.
 void scheduleWork(Work work)
          Schedules a work instance.
 void scheduleWork(Work work, long startTimeout, ExecutionContext context, WorkListener listener)
          Schedules a work instance.
 long startWork(Work work)
          Accepts a work instance for processing.
 long startWork(Work work, long startTimeout, ExecutionContext context, WorkListener listener)
          Accepts a work instance for processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doWork

public void doWork(Work work)
            throws WorkException
Accepts a work instance for processing. The call blocks until the work instance completes.

Specified by:
doWork in interface WorkManager
Throws:
WorkException

doWork

public void doWork(Work work,
                   long startTimeout,
                   ExecutionContext context,
                   WorkListener listener)
            throws WorkException
Accepts a work instance for processing. The call blocks until the work instance completes.

Specified by:
doWork in interface WorkManager
Throws:
WorkException

startWork

public long startWork(Work work)
               throws WorkException
Accepts a work instance for processing. The call blocks until the work instance starts, but does not wait not until the completion.

Specified by:
startWork in interface WorkManager
Throws:
WorkException

startWork

public long startWork(Work work,
                      long startTimeout,
                      ExecutionContext context,
                      WorkListener listener)
               throws WorkException
Accepts a work instance for processing. The call blocks until the work instance starts, but does not wait not until the completion.

Specified by:
startWork in interface WorkManager
Throws:
WorkException

scheduleWork

public void scheduleWork(Work work)
                  throws WorkException
Schedules a work instance.

Specified by:
scheduleWork in interface WorkManager
Throws:
WorkException

scheduleWork

public void scheduleWork(Work work,
                         long startTimeout,
                         ExecutionContext context,
                         WorkListener listener)
                  throws WorkException
Schedules a work instance.

Specified by:
scheduleWork in interface WorkManager
Throws:
WorkException

destroy

public void destroy()
Closes the work manager.