T
- The connection representation.public abstract static class VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<T> extends Object implements VirtualMachine.ForHotSpot.Connection
VirtualMachine.ForHotSpot.Connection.Factory, VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket, VirtualMachine.ForHotSpot.Connection.ForJnaSolarisDoor, VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe, VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<T>
Constructor and Description |
---|
OnPersistentByteChannel() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
close(T connection)
Closes the connection to the target VM.
|
protected abstract T |
connect()
Creates a new connection to the target VM.
|
VirtualMachine.ForHotSpot.Connection.Response |
execute(String protocol,
String... argument)
Executes a command on the current connection.
|
protected abstract int |
read(T connection,
byte[] buffer)
Reads from the target VM.
|
protected abstract void |
write(T connection,
byte[] buffer)
Writes to the target VM.
|
public VirtualMachine.ForHotSpot.Connection.Response execute(String protocol, String... argument) throws IOException
execute
in interface VirtualMachine.ForHotSpot.Connection
protocol
- The target VMs protocol version for the attach API.argument
- The arguments to send to the target VM.IOException
- If an I/O error occurred.protected abstract T connect() throws IOException
IOException
- If an I/O exception occurs.protected abstract void close(T connection) throws IOException
connection
- The connection to close.IOException
- If an I/O exception occurs.protected abstract void write(T connection, byte[] buffer) throws IOException
connection
- The connection to write to.buffer
- The buffer to write to.IOException
- If an I/O exception occurs during writing.protected abstract int read(T connection, byte[] buffer) throws IOException
connection
- The connection to read from.buffer
- The buffer to store the result in.IOException
- If an I/O exception occurs.Copyright © 2014–2025. All rights reserved.