All Superinterfaces:
RequestWatcher
All Known Implementing Classes:
SendRequestHandle

public interface Request extends RequestWatcher
Represents an asynchronous request.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancels the request.
    get()
    Blocks until the request is complete and returns the result.
    Returns the error that occurred during request execution, if any.
    void
    onError(org.python.core.PyObject func)
    Registers a callback to be executed when the request fails.
    void
    onSuccess(org.python.core.PyObject func)
    Registers a callback to be executed when the request completes successfully.

    Methods inherited from interface com.inductiveautomation.ignition.common.script.message.RequestWatcher

    block, compose
  • Method Details

    • get

      Object get() throws Exception
      Blocks until the request is complete and returns the result.
      Returns:
      The result of the request.
      Throws:
      Exception - If an error occurred during request execution.
    • cancel

      void cancel()
      Cancels the request.
    • getError

      Exception getError()
      Returns the error that occurred during request execution, if any.
      Returns:
      The exception, or null if no error occurred.
    • onSuccess

      void onSuccess(org.python.core.PyObject func)
      Registers a callback to be executed when the request completes successfully.
      Parameters:
      func - The Python function to call with the result.
    • onError

      void onError(org.python.core.PyObject func)
      Registers a callback to be executed when the request fails.
      Parameters:
      func - The Python function to call with the exception.