Package net.bytebuddy.agent
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 class
A factory for a POSIX socket connection to a JVM using JNA.protected static interface
A JNA library binding for POSIX sockets.Nested classes/interfaces inherited from interface net.bytebuddy.agent.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
ConstructorsModifierConstructorDescriptionprotected
ForJnaPosixSocket
(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 net.bytebuddy.agent.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.OnPersistentByteChannel
Creates a new connection to the target VM.- Specified by:
connect
in classVirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>
- Returns:
- Returns a new connection to the target VM.
-
read
Description copied from class:VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel
Reads from the target VM.- Specified by:
read
in 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.OnPersistentByteChannel
Writes to the target VM.- Specified by:
write
in 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.OnPersistentByteChannel
Closes the connection to the target VM.- Specified by:
close
in classVirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<Integer>
- Parameters:
handle
- The connection to close.
-
close
public void close()
-