public static class VirtualMachine.ForHotSpot.OnUnix extends VirtualMachine.ForHotSpot
VirtualMachine.ForHotSpot.OnUnixVirtualMachine.ForHotSpotprocessId| Constructor and Description |
|---|
OnUnix(String processId,
Object socket,
int attempts,
long pause,
long timeout,
TimeUnit timeUnit)
Creates a new VM implementation for a HotSpot VM running on Unix.
|
| Modifier and Type | Method and Description |
|---|---|
static Class<?> |
assertAvailability()
Asserts the availability of this virtual machine implementation.
|
static VirtualMachine |
attach(String processId)
Attaches to the supplied VM process.
|
protected void |
connect()
Connects to the target VM.
|
void |
detach()
Detaches this virtual machine representation.
|
int |
read(byte[] buffer)
Reads from the communication channel.
|
void |
write(byte[] buffer)
Writes to the communication channel.
|
loadAgentpublic OnUnix(String processId, Object socket, int attempts, long pause, long timeout, TimeUnit timeUnit)
processId - The process id of the target VM.socket - The Unix socket to use for communication.attempts - The number of attempts to connect.pause - The pause time between two VMs.timeout - The socket timeout.timeUnit - The time unit of the pause time.public static Class<?> assertAvailability() throws Throwable
Throwable is thrown.Throwable - If this VM does not support POSIX sockets or is not running on a HotSpot VM.public static VirtualMachine attach(String processId) throws IOException
processId - The process id of the target VM.IOException - If an I/O exception occurs.protected void connect()
throws IOException
VirtualMachine.ForHotSpotconnect in class VirtualMachine.ForHotSpotIOException - If an I/O exception occurs.public int read(byte[] buffer)
throws IOException
VirtualMachine.ForHotSpotread in class VirtualMachine.ForHotSpotbuffer - The buffer to read into.IOException - If an I/O exception occurs.public void write(byte[] buffer)
throws IOException
VirtualMachine.ForHotSpotwrite in class VirtualMachine.ForHotSpotbuffer - The buffer to write from.IOException - If an I/O exception occurs.public void detach()
throws IOException
VirtualMachineIOException - If an I/O exception occurs.Copyright © 2014–2017. All rights reserved.