Interface IEntryPoint


public interface IEntryPoint
Interface for addon entry point, used to invoke commands.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.json.JSONObject
    invoke(String command)
    Invoke a named command in the addon with the given JSON arguments.
    org.json.JSONObject
    invoke(String command, org.json.JSONObject params)
    Invoke a named command in the addon with the given JSON arguments.
  • Method Details

    • invoke

      org.json.JSONObject invoke(String command) throws Exception
      Invoke a named command in the addon with the given JSON arguments. This method provides a dynamic dispatch mechanism: the host specifies a command name, and the addon implementation decides how to handle it. The returned JSON object may contain results, status information, or error details depending on the command. You can refer to the documenation to know which command is supported by which addon.
      Parameters:
      command - The name of the command to execute.
      Returns:
      JSON-formatted response from the addon. May be null.
      Throws:
      Exception - May throw if the command name is unknown or arguments are invalid.
    • invoke

      org.json.JSONObject invoke(String command, org.json.JSONObject params) throws Exception
      Invoke a named command in the addon with the given JSON arguments. This method provides a dynamic dispatch mechanism: the host specifies a command name and an associated JSON value, and the addon implementation decides how to handle it. The returned JSON object may contain results, status information, or error details depending on the command. You can refer to the documenation to know which command is supported by which addon.
      Parameters:
      command - The name of the command to execute.
      params - JSON-formatted arguments passed to the command.
      Returns:
      JSON-formatted response from the addon. May be null.
      Throws:
      Exception - May throw if the command name is unknown or arguments are invalid.