public static class VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket extends VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>
Modifier and Type | Class and Description |
---|---|
static class |
VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket.Factory
A factory for a POSIX socket connection to a JVM using JNA.
|
protected static interface |
VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket.PosixLibrary
A JNA library binding for Posix sockets.
|
VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket, VirtualMachine.ForHotSpot.Connection.ForJnaSolarisDoor, VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe, VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<T>
Modifier | Constructor and Description |
---|---|
protected |
ForJnaPosixSocket(VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket.PosixLibrary library,
File socket)
Creates a connection for a virtual posix socket implemented in JNA.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
close(Integer handle)
Closes the connection to the target VM.
|
protected Integer |
connect()
Creates a new connection to the target VM.
|
protected int |
read(Integer handle,
byte[] buffer)
Reads from the target VM.
|
protected void |
write(Integer handle,
byte[] buffer)
Writes to the target VM.
|
execute
protected ForJnaPosixSocket(VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket.PosixLibrary library, File socket)
library
- The JNA library to use.socket
- The POSIX socket.protected Integer connect()
VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel
connect
in class VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>
protected int read(Integer handle, byte[] buffer)
VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel
read
in class VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>
handle
- The connection to read from.buffer
- The buffer to store the result in.protected void write(Integer handle, byte[] buffer)
VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel
write
in class VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>
handle
- The connection to write to.buffer
- The buffer to write to.protected void close(Integer handle)
VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel
close
in class VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>
handle
- The connection to close.public void close()
Copyright © 2014–2021. All rights reserved.