Package ghidra.framework.model

# Interface ToolConnection

public interface ToolConnection
Represents a connection between a producer tool and a consumer tool.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `connect(String eventName)`
  Connect the tools for the given event name.
  `void`
  `disconnect(String eventName)`
  Break the connection between the tools for the given event name.
  `PluginTool`
  `getConsumer()`
  Get the tool that consumes an event
  `String[]`
  `getEvents()`
  Get the list of event names that is an intersection between what the producer produces and what the consumers consumes.
  `PluginTool`
  `getProducer()`
  Get the tool that produces an event
  `boolean`
  `isConnected(String eventName)`
  Return whether the tools are connected for the given event name.

- ## Method Details

  - ### getProducer

    PluginTool getProducer()
    Get the tool that produces an event
    Returns:
      the tool

  - ### getConsumer

    PluginTool getConsumer()
    Get the tool that consumes an event
    Returns:
      the tool

  - ### getEvents

    String[] getEvents()
    Get the list of event names that is an intersection between what the producer produces and what the consumers consumes.
    Returns:
      an array of event names

  - ### connect

    void connect(String eventName)
    Connect the tools for the given event name.
    Parameters:
      `eventName` - name of event to connect
    Throws:
      `IllegalArgumentException` - if eventName is not valid for this producer/consumer pair.

  - ### disconnect

    void disconnect(String eventName)
    Break the connection between the tools for the given event name.
    Parameters:
      `eventName` - name of event to disconnect
    Throws:
      `IllegalArgumentException` - if eventName is not valid for this producer/consumer pair.

  - ### isConnected

    boolean isConnected(String eventName)
    Return whether the tools are connected for the given event name.
    Parameters:
      `eventName` - name of event to check
    Returns:
      true if the tools are connected by eventName.