Class RemoteControlReader

java.lang.Object
org.jacoco.core.data.ExecutionDataReader
org.jacoco.core.runtime.RemoteControlReader

public class RemoteControlReader extends ExecutionDataReader
ExecutionDataReader with commands added for runtime remote control.
  • Field Details

  • Constructor Details

    • RemoteControlReader

      public RemoteControlReader(InputStream input) throws IOException
      Creates a new reader based on the given input stream. Depending on the nature of the underlying stream input should be buffered as most data is read in single bytes. Should be buffered when used to read execution data from Socket.getInputStream(). Should not be buffered when used only for commands because they are short and this will merely add memory overhead.
      Parameters:
      input - input stream to read commands from
      Throws:
      IOException - if the stream does not have a valid header
  • Method Details

    • readBlock

      protected boolean readBlock(byte blockid) throws IOException
      Description copied from class: ExecutionDataReader
      Reads a block of data identified by the given id. Subclasses may overwrite this method to support additional block types.
      Overrides:
      readBlock in class ExecutionDataReader
      Parameters:
      blockid - block type
      Returns:
      true if there are more blocks to read
      Throws:
      IOException - might be thrown by the underlying input stream
    • setRemoteCommandVisitor

      public void setRemoteCommandVisitor(IRemoteCommandVisitor visitor)
      Sets a listener for agent commands.
      Parameters:
      visitor - visitor to retrieve agent commands
    • readDumpCommand

      private void readDumpCommand() throws IOException
      Throws:
      IOException