Package net.bytebuddy.agent
Class VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket.Factory
java.lang.Object
net.bytebuddy.agent.VirtualMachine.ForHotSpot.Connection.Factory.ForSocketFile
net.bytebuddy.agent.VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket.Factory
- All Implemented Interfaces:
VirtualMachine.ForHotSpot.Connection.Factory
- Enclosing class:
VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket
public static class VirtualMachine.ForHotSpot.Connection.ForJnaPosixSocket.Factory
extends VirtualMachine.ForHotSpot.Connection.Factory.ForSocketFile
A factory for a POSIX socket connection to a JVM using JNA.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
A library for reading a Mac user's temporary directory.Nested classes/interfaces inherited from interface net.bytebuddy.agent.VirtualMachine.ForHotSpot.Connection.Factory
VirtualMachine.ForHotSpot.Connection.Factory.ForSocketFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe socket library API. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConnects to the supplied POSIX socket.protected void
Sends a kill signal to the target process.withDefaultTemporaryFolder
(int attempts, long pause, TimeUnit timeUnit) Creates a connection factory for a POSIX socket using JNA while locating the default temporary directory used on the current platform.Methods inherited from class net.bytebuddy.agent.VirtualMachine.ForHotSpot.Connection.Factory.ForSocketFile
connect
-
Field Details
-
library
The socket library API.
-
-
Constructor Details
-
Factory
Creates a connection factory for a POSIX socket using JNA.- Parameters:
temporaryDirectory
- The temporary directory to use.attempts
- The maximum amount of attempts for checking the establishment of a socket connection.pause
- The pause between two checks for an established socket connection.timeUnit
- The time unit of the pause time.
-
-
Method Details
-
withDefaultTemporaryFolder
public static VirtualMachine.ForHotSpot.Connection.Factory withDefaultTemporaryFolder(int attempts, long pause, TimeUnit timeUnit) Creates a connection factory for a POSIX socket using JNA while locating the default temporary directory used on the current platform.- Parameters:
attempts
- The maximum amount of attempts for checking the establishment of a socket connection.pause
- The pause between two checks for an established socket connection.timeUnit
- The time unit of the pause time.- Returns:
- An appropriate connection factory.
-
kill
Description copied from class:VirtualMachine.ForHotSpot.Connection.Factory.ForSocketFile
Sends a kill signal to the target process.- Specified by:
kill
in classVirtualMachine.ForHotSpot.Connection.Factory.ForSocketFile
- Parameters:
processId
- The process id.signal
- The signal to send.
-
doConnect
Description copied from class:VirtualMachine.ForHotSpot.Connection.Factory.ForSocketFile
Connects to the supplied POSIX socket.- Specified by:
doConnect
in classVirtualMachine.ForHotSpot.Connection.Factory.ForSocketFile
- Parameters:
socket
- The socket to connect to.- Returns:
- An active connection to the supplied socket.
-