mandala.jacob.remote.gpf
Class RemoteInvocationObserverProxy

java.lang.Object
  extended bymandala.jacob.remote.AbstractRemote
      extended bymandala.jacob.remote.gpf.AbstractRemoteProxy
          extended bymandala.jacob.remote.gpf.RemoteInvocationObserverProxy
All Implemented Interfaces:
InvocationObserver, Remote, RemoteInvocationObserver, java.io.Serializable

public abstract class RemoteInvocationObserverProxy
extends AbstractRemoteProxy
implements RemoteInvocationObserver

Generic proxy for remote InvocationObserver implementation.

Since:
1.0
Version:
$Revision: 1.4 $
Author:
eipi
See Also:
RemoteInvocationObserver, AbstractRemoteProxy, ExceptionHandler, Serialized Form

Nested Class Summary
 
Nested classes inherited from class mandala.jacob.remote.RemoteInvocationObserver
RemoteInvocationObserver.RemoteInvocationObserverMethods
 
Field Summary
 
Fields inherited from class mandala.jacob.remote.gpf.AbstractRemoteProxy
client, exporter
 
Fields inherited from class mandala.jacob.remote.AbstractRemote
defaultExceptionHandler, exceptionHandler, syslog
 
Constructor Summary
RemoteInvocationObserverProxy(Client client, Exporter exporter, ExceptionHandler exceptionHandler)
           
 
Method Summary
 ThreadOp getCalleeThread()
          Get the thread which is running the method invocation (the "callee").
 boolean isCalleeAvailable()
          Test the usable value of the callee thread.
 boolean isCancelled()
          Returns true if the asynchronous method invocation has been cancelled.
 boolean isInterrupted()
          Returns true if the asynchronous method invocation has been interrupted.
 boolean isResultAvailable()
          Test the usable value of the returned result.
 boolean isStarted()
          Returns true if the asynchronous method invocation is started.
 
Methods inherited from class mandala.jacob.remote.gpf.AbstractRemoteProxy
toString
 
Methods inherited from class mandala.jacob.remote.AbstractRemote
getDefaultExceptionHandler, getExceptionHandler, getSyslog, handleException, setDefaultExceptionHandler, setExceptionHandler, setSyslog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mandala.jacob.remote.Remote
getExceptionHandler, setExceptionHandler
 

Constructor Detail

RemoteInvocationObserverProxy

public RemoteInvocationObserverProxy(Client client,
                                     Exporter exporter,
                                     ExceptionHandler exceptionHandler)
Method Detail

isResultAvailable

public boolean isResultAvailable()
Description copied from interface: InvocationObserver

Test the usable value of the returned result. This method is safe related.

While the result is unavailable, this method returns false and calls to some methods of this class is undefined as specified in their documentation.

Specified by:
isResultAvailable in interface InvocationObserver
Returns:
true if the result is available

isCalleeAvailable

public boolean isCalleeAvailable()
Description copied from interface: InvocationObserver

Test the usable value of the callee thread. This method is safe related.

While the callee thread as not yet been set by the implementation of asynchronous method invocation, this method returns false. Otherwise, it returns true.

This method may return true whereas InvocationObserver.getCalleeThread() returns a null value. This situation means that the callee has been set, has executed the method and is no longer available (it has died for example).

Specified by:
isCalleeAvailable in interface InvocationObserver
Returns:
true if the callee thread has been set by the implementation
See Also:
ResultUpdater.setCalleeThread(ThreadOp)

getCalleeThread

public ThreadOp getCalleeThread()
Description copied from interface: InvocationObserver

Get the thread which is running the method invocation (the "callee"). This method is unsafe related.

While isCalleeAvailable() returns false, the value returned is undefined. Else, the ThreadOp instance referencing the thread which is running the method is returned which can be null if the method is considered terminated.

Specified by:
getCalleeThread in interface InvocationObserver
Returns:
the callee thread.
See Also:
ThreadOp

isStarted

public boolean isStarted()
Description copied from interface: InvocationObserver

Returns true if the asynchronous method invocation is started. This method is safe related

If this method returns false, then the asynchronous method invocation has not start its execution. Otherwise, the method may be currently running or terminated.

Specified by:
isStarted in interface InvocationObserver
Returns:
true if this method has started its execution, false otherwise.

isCancelled

public boolean isCancelled()
Description copied from interface: InvocationObserver

Returns true if the asynchronous method invocation has been cancelled. This method is safe related

Specified by:
isCancelled in interface InvocationObserver
Returns:
a boolean value

isInterrupted

public boolean isInterrupted()
Description copied from interface: InvocationObserver

Returns true if the asynchronous method invocation has been interrupted. This method is safe related

Specified by:
isInterrupted in interface InvocationObserver
Returns:
a boolean value


Mandala help mailing list