Class AgentConnector

All Implemented Interfaces:
Iterable<ComponentType>, Channel, ComponentType, Eligible, Manager
Direct Known Subclasses:
GuestAgentClient, VmopAgentClient

public abstract class AgentConnector extends QemuConnector
A component that handles the communication with an agent running in the VM.

If the log level for this class is set to fine, the messages exchanged on the socket are logged.

  • Field Details

  • Constructor Details

    • AgentConnector

      public AgentConnector(Channel componentChannel) throws IOException
      Instantiates a new agent connector.
      Parameters:
      componentChannel - the component channel
      Throws:
      IOException - Signals that an I/O exception has occurred.
  • Method Details

    • configureConnection

      protected void configureConnection(List<String> command, String chardev)
      Extracts the channel id and the socket path from the QEMU command line.
      Parameters:
      command - the command
      chardev - the chardev
    • onVserportChanged

      When the virtual serial port with the configured channel id has been opened call agentConnected().
      Parameters:
      event - the event
    • agentConnected

      protected void agentConnected()
      Called when the agent in the VM opens the connection.

      The default implementation does nothing.

    • agentDisconnected

      protected void agentDisconnected()
      Called when the agent in the VM closes the connection.

      The default implementation does nothing.