Interface RemoteCommand

    • Method Detail

      • setRemoteScriptingEngineHandler

        void setRemoteScriptingEngineHandler​(RemoteScriptingEngineHandler value)
        Sets the application context.
        Parameters:
        value - the context
      • getRemoteScriptingEngineHandler

        RemoteScriptingEngineHandler getRemoteScriptingEngineHandler()
        Returns the application context.
        Returns:
        the context, null if none set
      • parse

        String parse​(Properties header)
        Parses the header information.
        Parameters:
        header - the header
        Returns:
        null if successfully parsed, otherwise error message
      • setRequest

        void setRequest​(boolean value)
        Sets whether the command is a request or response.
        Parameters:
        value - true if request
      • isRequest

        boolean isRequest()
        Returns whether the command is a request or response.
        Returns:
        true if request
      • setRequestPayload

        void setRequestPayload​(byte[] value)
        Sets the payload for the request.
        Parameters:
        value - the payload
      • getRequestPayload

        byte[] getRequestPayload()
        Returns the payload of the request, if any.
        Returns:
        the payload
      • getRequestPayloadObjects

        Object[] getRequestPayloadObjects()
        Returns the objects that represent the request payload.
        Returns:
        the objects
      • assembleRequest

        String assembleRequest​(RemoteCommandProcessor processor)
        Assembles the command into a string, including any payload.
        Parameters:
        processor - the command processor to use for formatting
        Returns:
        the generated string, null if failed to assemble
      • handleRequest

        void handleRequest​(RemoteScriptingEngine engine,
                           RemoteCommandProcessor processor,
                           RequestHandler handler)
        Handles the request.
        Parameters:
        engine - the remote engine handling the request
        processor - the command processor to use for formatting
        handler - for handling the request
      • beforeSendRequest

        void beforeSendRequest()
        Hook method before sending the request.
      • afterSendRequest

        void afterSendRequest​(String error)
        Hook method after sending the request.
        Parameters:
        error - null if successful, otherwise error message