Interface Connector

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean connect()
      Connects to an SSH agent if there is one running.
      default byte[] rpc​(byte command)
      Performs a remote call sending only a command without any parameters to the SSH agent and returns the result.
      byte[] rpc​(byte command, byte[] message)
      Performs a remote call to the SSH agent and returns the result.
    • Method Detail

      • connect

        boolean connect()
                 throws IOException
        Connects to an SSH agent if there is one running. If called when already connected just returns true.
        Returns:
        true if an SSH agent is available and connected, if no SSH agent is available
        Throws:
        IOException - if connecting to the SSH agent failed
      • rpc

        byte[] rpc​(byte command,
                   byte[] message)
            throws IOException
        Performs a remote call to the SSH agent and returns the result.
        Parameters:
        command - to send
        message - to send; must have at least 5 bytes, and must have 5 unused bytes at the front.
        Returns:
        the result received
        Throws:
        IOException - if an error occurs
      • rpc

        default byte[] rpc​(byte command)
                    throws IOException
        Performs a remote call sending only a command without any parameters to the SSH agent and returns the result.
        Parameters:
        command - to send
        Returns:
        the result received
        Throws:
        IOException - if an error occurs