Interface Invoke

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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.