org.apache.ignite.visor.plugin

## Interface VisorPluginModel

-     public interface VisorPluginModel

  Gateway to Visor functionality from plugins. Plugins will receive model instance from Visor, usually passed into constructor, e.g. `VisorExtensionPoint.VisorExtensionPoint(VisorPluginModel)`.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTopologyListener(VisorTopologyListener lsnr)` Install topology listener.
    `boolean` | `connected()` Whether Visor connected to the grid.
    `<A,R> R` | `execute(Class<? extends ComputeTask<A,R>> taskCls, Collection<UUID> nodeIds, A arg)` Executes given task on this grid projection.
    `<A,R> R` | `execute(String taskName, Collection<UUID> nodeIds, A arg)` Executes given task on this grid projection.
    `IgniteLogger` | `logger()` Get logger.
    `Collection<UUID>` | `nodeIds()`
    `void` | `removeTopologyListener(VisorTopologyListener lsnr)` Uninstall topology listener.

- - ### Method Detail

    - #### connected

          boolean connected()

      Whether Visor connected to the grid.
      Returns:
        `true` if Visor connected to the grid.

    - #### logger

          IgniteLogger logger()

      Get logger.
      Returns:
        Logger.

    - #### addTopologyListener

          void addTopologyListener(VisorTopologyListener lsnr)
                            throws IllegalStateException

      Install topology listener.
      Parameters:
        `lsnr` - Listener to add.
      Throws:
        `IllegalStateException` - If Visor not connected to the grid.

    - #### removeTopologyListener

          void removeTopologyListener(VisorTopologyListener lsnr)
                               throws IllegalStateException

      Uninstall topology listener.
      Parameters:
        `lsnr` - Listener to remove.
      Throws:
        `IllegalStateException` - If Visor not connected to the grid.

    - #### nodeIds

          Collection<UUID> nodeIds()

      Returns:
        Collection of all nodes IDs.

    - #### execute

          <A,R> R execute(Class<? extends ComputeTask<A,R>> taskCls,
                          Collection<UUID> nodeIds,
                          @Nullable
                          A arg)
                   throws IllegalStateException

      Executes given task on this grid projection. For step-by-step explanation of task execution process refer to `ComputeTask` documentation.
      Type Parameters:
        `A` - Argument type.
        `R` - Result type.
      Parameters:
        `taskCls` - Class of the task to execute. If class has `ComputeTaskName` annotation, then task is deployed under a name specified within annotation. Otherwise, full class name is used as task name.
        `nodeIds` - Node IDs on with execute task.
        `arg` - Optional argument of task execution, can be `null`.
      Returns:
        Task result.
      Throws:
        `IllegalStateException` - If Visor not connected to the grid.

    - #### execute

          <A,R> R execute(String taskName,
                          Collection<UUID> nodeIds,
                          @Nullable
                          A arg)
                   throws IllegalStateException

      Executes given task on this grid projection. For step-by-step explanation of task execution process refer to `ComputeTask` documentation.
      Type Parameters:
        `A` - Argument type.
        `R` - Result type.
      Parameters:
        `taskName` - Name of the task to execute.
        `nodeIds` - Node IDs on with execute task.
        `arg` - Optional argument of task execution, can be `null`.
      Returns:
        Task result.
      Throws:
        `IllegalStateException` - If Visor not connected to the grid.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022