public abstract static class VirtualMachine.ForHotSpot extends Object implements VirtualMachine
Modifier and Type | Class and Description |
---|---|
static class |
VirtualMachine.ForHotSpot.OnUnix
A virtual machine implementation for a HotSpot VM running on Unix.
|
VirtualMachine.ForHotSpot
Modifier and Type | Field and Description |
---|---|
protected String |
processId
The target process's id.
|
Modifier | Constructor and Description |
---|---|
protected |
ForHotSpot(String processId)
Creates a new HotSpot-compatible VM implementation.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
connect()
Connects to the target VM.
|
void |
loadAgent(String jarFile,
String argument)
Loads an agent into the represented virtual machine.
|
protected abstract int |
read(byte[] buffer)
Reads from the communication channel.
|
protected abstract void |
write(byte[] buffer)
Writes to the communication channel.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
detach
protected final String processId
protected ForHotSpot(String processId)
processId
- The target process's id.public void loadAgent(String jarFile, String argument) throws IOException
VirtualMachine
loadAgent
in interface VirtualMachine
jarFile
- The jar file to attach.argument
- The argument to provide or null
if no argument should be provided.IOException
- If an I/O exception occurs.protected abstract void connect() throws IOException
IOException
- If an I/O exception occurs.protected abstract int read(byte[] buffer) throws IOException
buffer
- The buffer to read into.IOException
- If an I/O exception occurs.protected abstract void write(byte[] buffer) throws IOException
buffer
- The buffer to write from.IOException
- If an I/O exception occurs.Copyright © 2014–2017. All rights reserved.