guarana.toolkit.adapter.jbi
Class AsyncHandler

java.lang.Object
  extended by tdg.concurrency.activity.ActiveObject
      extended by guarana.toolkit.adapter.jbi.AsyncHandler
All Implemented Interfaces:
Runnable

public abstract class AsyncHandler
extends tdg.concurrency.activity.ActiveObject

Allows dealing with asynchronous method invocation and remote responses.

Since:
Guaranį SDK 1.0.0
Author:
Rafael Z. Frantz

Constructor Summary
AsyncHandler(String name, guarana.util.remote.RemoteObjectReference replyTo)
          Constructs a new AsyncHandler and exports a future object to the RMI Registry.
 
Method Summary
 void setResult(Message<?> response)
          Sets the result to the future object.
 
Methods inherited from class tdg.concurrency.activity.ActiveObject
getId, getName, run, start, stop, waitUntilStopped
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncHandler

public AsyncHandler(String name,
                    guarana.util.remote.RemoteObjectReference replyTo)
Constructs a new AsyncHandler and exports a future object to the RMI Registry.

Parameters:
name - The name of this handler.
replyTo - The name of the communicator to reply.
See Also:
Future
Method Detail

setResult

public void setResult(Message<?> response)
               throws RemoteException
Sets the result to the future object. If the lookup fails to set the result, the method wait for 100 ms and tries again up to max 10 times.

Parameters:
response - the result message.
Throws:
RemoteException - if any remote exception is raised during this method execution.


Guaranį DSL Home