Class VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<T>

    • Constructor Detail

      • OnPersistentByteChannel

        public OnPersistentByteChannel()
    • Method Detail

      • connect

        protected abstract T connect()
                              throws IOException
        Creates a new connection to the target VM.
        Returns:
        Returns a new connection to the target VM.
        Throws:
        IOException - If an I/O exception occurs.
      • close

        protected abstract void close​(T connection)
                               throws IOException
        Closes the connection to the target VM.
        Parameters:
        connection - The connection to close.
        Throws:
        IOException - If an I/O exception occurs.
      • write

        protected abstract void write​(T connection,
                                      byte[] buffer)
                               throws IOException
        Writes to the target VM.
        Parameters:
        connection - The connection to write to.
        buffer - The buffer to write to.
        Throws:
        IOException - If an I/O exception occurs during writing.
      • read

        protected abstract int read​(T connection,
                                    byte[] buffer)
                             throws IOException
        Reads from the target VM.
        Parameters:
        connection - The connection to read from.
        buffer - The buffer to store the result in.
        Returns:
        The number of byte that were read.
        Throws:
        IOException - If an I/O exception occurs.