mandala.rami
Interface CallbackManager

All Known Implementing Classes:
CallbackManagerImpl

public interface CallbackManager

This class defines methods to manage Callback instances related to AsynchronousReference.

Each instance has a global object scope default Callback instance but a local thread scope default Callback instance may also be set.

If multiple callbacks are needed, see CallbackList.

Version:
1.0
Author:
eipi
See Also:
AsynchronousReference, Callback, CallbackList

Method Summary
 Callback getCallback()
          Returns the local thread scope Callback if it exists, returns the global object scope Callback otherwise.
 Callback getGlobalCallback()
          Returns this global object scope Callback.
 Callback getLocalCallback()
          Returns the local thread scope Callback.
 void setGlobalCallback(Callback callback)
          Sets this global object scope Callback.
 void setLocalCallback(Callback callback)
          Sets the local thread scope Callback.
 

Method Detail

getGlobalCallback

public Callback getGlobalCallback()

Returns this global object scope Callback.

The Callback returns is the one which is associated to this instance.

Returns:
this global object scope Callback.
See Also:
Callback

setGlobalCallback

public void setGlobalCallback(Callback callback)

Sets this global object scope Callback.

After this call, this instance is associated to the given Callback.

Parameters:
callback - the global object scope Callback to set.

getLocalCallback

public Callback getLocalCallback()

Returns the local thread scope Callback.

The Callback returns is the one which is associated to the caller thread of this method.

Returns:
the local thread scope Callback.
See Also:
Callback

setLocalCallback

public void setLocalCallback(Callback callback)

Sets the local thread scope Callback.

After this call, the caller thread of this method is associate to the given Callback.

Parameters:
callback - the local thread scope Callback

getCallback

public Callback getCallback()
Returns the local thread scope Callback if it exists, returns the global object scope Callback otherwise.

Returns the Callback associated with the caller thread of this method if it exists, returns the Callback associated with this instance otherwise.

Returns:
the local thread scope Callback if it exists, returns the global object scope Callback otherwise.


Mandala help mailing list