net.sf.asyncobjects.util.callbacks
Class RunnableAdapter

java.lang.Object
  extended by net.sf.asyncobjects.util.callbacks.RunnableAdapter
All Implemented Interfaces:
ExplicitSharing

public abstract class RunnableAdapter
extends Object
implements ExplicitSharing

A runnable adapter that allows using anonymouns inner classes for implementing the ARunnable interface.

Author:
const

Nested Class Summary
 class RunnableAdapter.InternalRunnableAdapter
          An internal class that addapt Adapter calss to asynchronous interface.
 
Constructor Summary
RunnableAdapter()
           
 
Method Summary
 ARunnable export()
           
protected abstract  void run()
          Run action
static ARunnable wrap(Runnable r)
          Wrap Runnable object into asynchronous object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunnableAdapter

public RunnableAdapter()
Method Detail

run

protected abstract void run()
                     throws Throwable
Run action

Throws:
Throwable - if there is a problem
See Also:
Runnable.run()

wrap

public static ARunnable wrap(Runnable r)
Wrap Runnable object into asynchronous object.

Parameters:
r - a runnable object
Returns:
async object that wraps it

export

public final ARunnable export()
Returns:
an action exported as asynchronous interface


Copyright 2002-2007 Constantine Plotnikov. All Rights Reserved.