gnu.cajo.invoke
Interface Invoke

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
RemoteInvoke
All Known Implementing Classes:
AsyncMethod, AuditorItem, ClientProxy, DynamicObject, HashedProxy, Implements, InterceptorItem, MonitorItem, Nice, ProxyLoader, Queue, Remote, Wrapper, Zedmobject, ZippedProxy

public interface Invoke
extends java.io.Serializable

The generic inter-component communication interface, and foundation for this paradigm. This provides a standard communication interface between objects. It is used to pass arguments to, and recieve synchronous responses from, the receiving object.

The implementation is so extrmely simple, it's included here:

 public interface Invoke extends Serializable {
   Object invoke(String method, Object args[]) throws Exception;
 }

Version:
1.0, 01-Nov-99 Initial release
Author:
John Catherino

Method Summary
 java.lang.Object invoke(java.lang.String method, java.lang.Object args)
          Used by other objects to pass data into this object, and receive synchronous data responses from it, if any.
 

Method Detail

invoke

java.lang.Object invoke(java.lang.String method,
                        java.lang.Object args)
                        throws java.lang.Exception
Used by other objects to pass data into this object, and receive synchronous data responses from it, if any. The invocation may, or may not contain inbound data. It may, or may not, return a data object response. The functionality of this method is completely application specific. This interface serves only to define the format of communication between items.

Note: this method could be called reentrantly, by many objects, simultaneously. If this would cause a problem, the critical sections of this item's method must be synchronized. In general, synchronising the whole method is strongly discouraged, as it could block multiple clients far too generally.

Parameters:
method - The name of the method to be invoked on the object, except in extremely special circumstances, it should not be null.
args - The data relevant to the invocation. It can be a single object, an array or objects, or simply null.
Returns:
Any synchronous data defined by a subclass' implementation, it can be an array of of objects, or possibly null
Throws:
java.lang.Exception - As needed by the application. Note: subclasses of Exception can be thrown, to allow clients the opportunity to catch only specific types, these exceptions could also contain application specific methods, and fields, to supplement the error information.