Interface IRWebProcessor

  • All Superinterfaces:
    java.rmi.Remote

    public interface IRWebProcessor
    extends java.rmi.Remote
    IRWebProcessor API has to be implemented by webAppOS web processors. The webAppOS server-side bridge will use IRWebProcessor to delegate web calls to web processors. The communication channel is called Web Processor Bus.
    Author:
    Sergejs Kozlovics
    • Method Detail

      • hasInstructionSet

        boolean hasInstructionSet​(java.lang.String name)
                           throws java.rmi.RemoteException
        Asks the web processor whether it supports the given instruction set.
        Parameters:
        name - the name of the instruction set
        Returns:
        whether the given web processor supports the given instruction set
        Throws:
        java.rmi.RemoteException - on Web Processor Bus error
      • perProjectCachedInstructionSet

        boolean perProjectCachedInstructionSet​(java.lang.String name)
                                        throws java.rmi.RemoteException
        Asks the web processor can create some per-project cache for the given instruction set. If yes, the web caller will constantly use the same web processor, if web calls for the same project_id and instruction set are submitted.
        Parameters:
        name - the name of the instruction set
        Returns:
        whether the given web processor can create some cache for the given instruction set
        Throws:
        java.rmi.RemoteException - on Web Processor Bus error
      • clearCachedInstructionSet

        void clearCachedInstructionSet​(java.lang.String project_id,
                                       java.lang.String instructionSet)
                                throws java.rmi.RemoteException
        Asks the web processor to clear cached instruction set. Normally, called when the project is being closed.
        Parameters:
        project_id - the project_id which is being closed
        instructionSet - the instruction set name, for which to clear the cache
        Throws:
        java.rmi.RemoteException - on Web Processor Bus error
      • startWebCall

        void startWebCall​(IWebCaller.WebCallSeed seed,
                          IWebCaller.WebCallDeclaration declaration)
                   throws java.rmi.RemoteException
        Starts (asynchronously) the given webcall corresponding to the given webcall declaration. The startWebCall must return immediately, thus, the caller (WebCaller from the web server bridge) can continue serving other webcalls. After the webcall is completed, the web processor must inform the Web Processor Bus Service about the completion by calling webProcessorIdle.
        Parameters:
        seed - the call seed containing the information about the call (action name, calling conventions, etc.)
        declaration - the webcall declaration (instructions set, resolved code location, etc.)
        Throws:
        java.rmi.RemoteException - on Web Processor Bus error
      • disconnect

        void disconnect()
                 throws java.rmi.RemoteException
        Informs the web processor that it is being disconnected. The web processor must terminate the web call execution requested earlier via startWebCall (if any in progress).

        This function is intended to be called from the web processor adapter, which was used to connect to this web processor. Since the connection will be lost, disconnect() is expected to throw an exception.

        Throws:
        java.rmi.RemoteException - on Web Processor Bus error