Class VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket
java.lang.Object
net.bytebuddy.agent.VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>
net.bytebuddy.agent.VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket
- All Implemented Interfaces:
Closeable, AutoCloseable, VirtualMachine.ForHotSpot.Connection
- Enclosing interface:
VirtualMachine.ForHotSpot.Connection
public static class VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket
extends VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>
Implements a connection for a POSIX socket in JNA.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA factory for a POSIX socket connection to a JVM using JNA.protected static interfaceA JNA library binding for POSIX sockets.Nested classes/interfaces inherited from interface VirtualMachine.ForHotSpot.Connection
VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket, VirtualMachine.ForHotSpot.Connection.ForJnaSolarisDoor, VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe, VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<T> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForJnaPosixSocket(VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket.PosixLibrary library, File socket) Creates a connection for a virtual POSIX socket implemented in JNA. -
Method Summary
Methods inherited from class VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel
execute
-
Field Details
-
library
The JNA library to use. -
socket
The POSIX socket.
-
-
Constructor Details
-
ForJnaPosixSocket
protected ForJnaPosixSocket(VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket.PosixLibrary library, File socket) Creates a connection for a virtual POSIX socket implemented in JNA.- Parameters:
library- The JNA library to use.socket- The POSIX socket.
-
-
Method Details
-
connect
Description copied from class:VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannelCreates a new connection to the target VM.- Specified by:
connectin classVirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>- Returns:
- Returns a new connection to the target VM.
-
read
Description copied from class:VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannelReads from the target VM.- Specified by:
readin classVirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>- Parameters:
handle- The connection to read from.buffer- The buffer to store the result in.- Returns:
- The number of byte that were read.
-
write
Description copied from class:VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannelWrites to the target VM.- Specified by:
writein classVirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>- Parameters:
handle- The connection to write to.buffer- The buffer to write to.
-
close
Description copied from class:VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannelCloses the connection to the target VM.- Specified by:
closein classVirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>- Parameters:
handle- The connection to close.
-
close
public void close()
-