javax.resource.spi.work
Interface WorkManager


public interface WorkManager

Interface used to associate the resource adapter with objects that implement this interface.


Field Summary
static long IMMEDIATE
          No start delay
static long INDEFINITE
          Indefinite start delay
static long UNKNOWN
          Unknown/unspecified start delay
 
Method Summary
 void doWork(Work work)
          Executes the work, the call blocks until the work completes
 void doWork(Work work, long startTimeout, ExecutionContext ctx, WorkListener listener)
          Executes the work, the call blocks until the work completes
 void scheduleWork(Work work)
          Executes the work, the call returns immediatley
 void scheduleWork(Work work, long startTimeout, ExecutionContext ctx, WorkListener listener)
          Executes the work, the call returns immediately
 long startWork(Work work)
          Executes the work, the call blocks until the work starts
 long startWork(Work work, long startTimeout, ExecutionContext ctx, WorkListener listener)
          Executes the work, the call blocks until the work starts
 

Field Detail

UNKNOWN

static final long UNKNOWN
Unknown/unspecified start delay

See Also:
Constant Field Values

IMMEDIATE

static final long IMMEDIATE
No start delay

See Also:
Constant Field Values

INDEFINITE

static final long INDEFINITE
Indefinite start delay

See Also:
Constant Field Values
Method Detail

doWork

void doWork(Work work)
            throws WorkException
Executes the work, the call blocks until the work completes

Parameters:
work - the work
Throws:
WorkException - a generic error
WorkRejectedException - if the work is rejected
WorkCompletedException - if the work completes with an exception

doWork

void doWork(Work work,
            long startTimeout,
            ExecutionContext ctx,
            WorkListener listener)
            throws WorkException
Executes the work, the call blocks until the work completes

Parameters:
work - the work
startTimeout - the wait before execution
ctx - the execution context
listener - the work listener
Throws:
WorkException - a generic error
WorkRejectedException - if the work is rejected
WorkCompletedException - if the work completes with an exception

startWork

long startWork(Work work)
               throws WorkException
Executes the work, the call blocks until the work starts

Parameters:
work - the work
Returns:
the time elapsed until the work starts
Throws:
WorkException - a generic error
WorkRejectedException - if the work is rejected

startWork

long startWork(Work work,
               long startTimeout,
               ExecutionContext ctx,
               WorkListener listener)
               throws WorkException
Executes the work, the call blocks until the work starts

Parameters:
work - the work
startTimeout - the wait before execution
ctx - the execution context
listener - the work listener
Returns:
the time elapsed until the work starts
Throws:
WorkException - a generic error
WorkRejectedException - if the work is rejected

scheduleWork

void scheduleWork(Work work)
                  throws WorkException
Executes the work, the call returns immediatley

Parameters:
work - the work
Throws:
WorkException - a generic error
WorkRejectedException - if the work is rejected

scheduleWork

void scheduleWork(Work work,
                  long startTimeout,
                  ExecutionContext ctx,
                  WorkListener listener)
                  throws WorkException
Executes the work, the call returns immediately

Parameters:
work - the work
startTimeout - the wait before execution
ctx - the execution context
listener - the work listener
Throws:
WorkException - a generic error
WorkRejectedException - if the work is rejected


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.