org.springframework.jca.work
Class DelegatingWork

java.lang.Object
  extended by org.springframework.jca.work.DelegatingWork
All Implemented Interfaces:
java.lang.Runnable, javax.resource.spi.work.Work

public class DelegatingWork
extends java.lang.Object
implements javax.resource.spi.work.Work

Simple Work adapter that delegates to a given Runnable.

Since:
2.0.3
Author:
Juergen Hoeller
See Also:
Work, Runnable

Field Summary
private  java.lang.Runnable delegate
           
 
Constructor Summary
DelegatingWork(java.lang.Runnable delegate)
          Create a new DelegatingWork.
 
Method Summary
 java.lang.Runnable getDelegate()
          Return the wrapped Runnable implementation.
 void release()
          This implementation is empty, since we expect the Runnable to terminate based on some specific shutdown signal.
 void run()
          Delegates execution to the underlying Runnable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

private final java.lang.Runnable delegate
Constructor Detail

DelegatingWork

public DelegatingWork(java.lang.Runnable delegate)
Create a new DelegatingWork.

Parameters:
delegate - the Runnable implementation to delegate to
Method Detail

getDelegate

public final java.lang.Runnable getDelegate()
Return the wrapped Runnable implementation.


run

public void run()
Delegates execution to the underlying Runnable.

Specified by:
run in interface java.lang.Runnable

release

public void release()
This implementation is empty, since we expect the Runnable to terminate based on some specific shutdown signal.

Specified by:
release in interface javax.resource.spi.work.Work