org.springframework.scheduling.commonj
Class DelegatingWork

java.lang.Object
  extended by org.springframework.scheduling.commonj.DelegatingWork
All Implemented Interfaces:
commonj.work.Work, Runnable

public class DelegatingWork
extends Object
implements commonj.work.Work

Simple Work adapter that delegates to a given Runnable.

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

Constructor Summary
DelegatingWork(Runnable delegate)
          Create a new DelegatingWork.
 
Method Summary
 Runnable getDelegate()
          Return the wrapped Runnable implementation.
 boolean isDaemon()
          This implementation delegates to SchedulingAwareRunnable.isLongLived(), if available.
 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
 

Constructor Detail

DelegatingWork

public DelegatingWork(Runnable delegate)
Create a new DelegatingWork.

Parameters:
delegate - the Runnable implementation to delegate to (may be a SchedulingAwareRunnable for extended support)
See Also:
SchedulingAwareRunnable, isDaemon()
Method Detail

getDelegate

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


run

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

Specified by:
run in interface Runnable

isDaemon

public boolean isDaemon()
This implementation delegates to SchedulingAwareRunnable.isLongLived(), if available.

Specified by:
isDaemon in interface commonj.work.Work

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 commonj.work.Work


Copyright © 2002-2008 The Spring Framework.