guarana.toolkit.adapter.proxy
Interface IStubFuture

All Superinterfaces:
Remote
All Known Implementing Classes:
Future

public interface IStubFuture
extends Remote

A basic interface for asynchronous responses.

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

Method Summary
 void addRemoteObserver(guarana.util.observer.remote.IRemoteObsever observer)
          Adds a remote observer to the future stub.
 void destroy()
          Unbind and removes this object from the RMI Registry if it is bound.
 String getId()
          Returns the unique ID that identifies this future.
 Message<?> getResult()
          Returns the response message from this future.
 boolean isDone()
          Checks if the future contains the response message.
 void setResult(Message<?> message)
          Sets a response message to this future.
 

Method Detail

getId

String getId()
             throws RemoteException
Returns the unique ID that identifies this future.

Returns:
the future id.
Throws:
RemoteException - if any remote exception is raised during this method execution.

getResult

Message<?> getResult()
                     throws RemoteException
Returns the response message from this future.

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

setResult

void setResult(Message<?> message)
               throws RemoteException
Sets a response message to this future. When the result is set this future object is ready to be returned.

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

isDone

boolean isDone()
               throws RemoteException
Checks if the future contains the response message.

Returns:
True if this future contains the response message; otherwise, False.
Throws:
RemoteException - if any remote exception is raised during this method execution.

addRemoteObserver

void addRemoteObserver(guarana.util.observer.remote.IRemoteObsever observer)
                       throws RemoteException
Adds a remote observer to the future stub.

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

destroy

void destroy()
             throws RemoteException,
                    NotBoundException,
                    AccessException,
                    NoSuchObjectException
Unbind and removes this object from the RMI Registry if it is bound.

Throws:
RemoteException - if a remote exception is raised during this method execution.
NotBoundException - if an attempt is made to lookup or unbind in the registry a name that has no associated binding.
AccessException - if the method was invoked from a non-local host, then an AccessException is thrown.
NoSuchObjectException - if an attempt is made to invoke a method on an object that no longer exists in the remote virtual machine.


Guaranį DSL Home