Class AbstractRpcInvocationHandler

    • Constructor Detail

      • AbstractRpcInvocationHandler

        public AbstractRpcInvocationHandler()
    • Method Detail

      • handle

        public Optional<Runnable> handle​(UI ui,
                                         elemental.json.JsonObject invocationJson)
        Description copied from interface: RpcInvocationHandler
        Handles RPC data invocationJson using ui as a context.
        Specified by:
        handle in interface RpcInvocationHandler
        Parameters:
        ui - the UI to handle against, not null
        invocationJson - the RPC data to handle, not null
        Returns:
        an optional runnable
      • allowInvocationWhileInert

        protected boolean allowInvocationWhileInert​(UI ui,
                                                    elemental.json.JsonObject invocationJson)
        Specifies whether RPC invocations are allowed while the node is inert. The default behaviour checks the validity of the polling invocations on the ui.
        Parameters:
        ui - the UI instance that RPC invocation originated from.
        invocationJson - the JsonObject containing invocation properties.
        Returns:
        a boolean indicating that the whether the current invocation is allowed for the ui while the node is inert.
      • allowInert

        protected boolean allowInert​(StateNode node)
      • handleNode

        protected abstract Optional<Runnable> handleNode​(StateNode node,
                                                         elemental.json.JsonObject invocationJson)
        Handle the RPC data invocationJson using target node as a context.
        Parameters:
        node - node to handle invocation with, not null
        invocationJson - the RPC data to handle, not null
        Returns:
        an optional runnable