Package net.bytebuddy.agent
Class VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe
- java.lang.Object
-
- net.bytebuddy.agent.VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,VirtualMachine.ForHotSpot.Connection
- Enclosing interface:
- VirtualMachine.ForHotSpot.Connection
public static class VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe extends java.lang.Object implements VirtualMachine.ForHotSpot.Connection
Implements a connection for a Windows named pipe in JNA.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.Factory
A factory for establishing a connection to a JVM using a named pipe in JNA.protected static class
VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.NamedPipeResponse
A response that is sent via a named pipe.protected static interface
VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.WindowsAttachLibrary
A library for interacting with Windows.protected static interface
VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.WindowsLibrary
A library for interacting with Windows.-
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>, VirtualMachine.ForHotSpot.Connection.Response
-
-
Field Summary
Fields Modifier and Type Field Description private VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.WindowsAttachLibrary
attachLibrary
The library to use for communicating with Windows attachment extension that is included as a DLL.private com.sun.jna.platform.win32.WinDef.LPVOID
code
A pointer to the code that was injected into the target process.private VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.WindowsLibrary
library
The library to use for communicating with Windows native functions.private static int
MEM_RELEASE
Indicates a memory release.private com.sun.jna.platform.win32.WinNT.HANDLE
process
The handle of the target VM's process.private java.security.SecureRandom
random
A source of random values being used for generating pipe names.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForJnaWindowsNamedPipe(VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.WindowsLibrary library, VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.WindowsAttachLibrary attachLibrary, com.sun.jna.platform.win32.WinNT.HANDLE process, com.sun.jna.platform.win32.WinDef.LPVOID code)
Creates a new connection via a named pipe.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private com.sun.jna.platform.win32.WinBase.SECURITY_ATTRIBUTES
createSecurityAttributesToAllowMediumIntegrity()
CustomWinBase.SECURITY_ATTRIBUTES
is required here to "get" Medium Integrity Level.VirtualMachine.ForHotSpot.Connection.Response
execute(java.lang.String protocol, java.lang.String... argument)
Executes a command on the current connection.
-
-
-
Field Detail
-
MEM_RELEASE
private static final int MEM_RELEASE
Indicates a memory release.- See Also:
- Constant Field Values
-
library
private final VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.WindowsLibrary library
The library to use for communicating with Windows native functions.
-
attachLibrary
private final VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.WindowsAttachLibrary attachLibrary
The library to use for communicating with Windows attachment extension that is included as a DLL.
-
process
private final com.sun.jna.platform.win32.WinNT.HANDLE process
The handle of the target VM's process.
-
code
private final com.sun.jna.platform.win32.WinDef.LPVOID code
A pointer to the code that was injected into the target process.
-
random
private final java.security.SecureRandom random
A source of random values being used for generating pipe names.
-
-
Constructor Detail
-
ForJnaWindowsNamedPipe
protected ForJnaWindowsNamedPipe(VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.WindowsLibrary library, VirtualMachine.ForHotSpot.Connection.ForJnaWindowsNamedPipe.WindowsAttachLibrary attachLibrary, com.sun.jna.platform.win32.WinNT.HANDLE process, com.sun.jna.platform.win32.WinDef.LPVOID code)
Creates a new connection via a named pipe.- Parameters:
library
- The library to use for communicating with Windows native functions.attachLibrary
- The library to use for communicating with Windows attachment extension that is included as a DLL.process
- The handle of the target VM's process.code
- A pointer to the code that was injected into the target process.
-
-
Method Detail
-
execute
public VirtualMachine.ForHotSpot.Connection.Response execute(java.lang.String protocol, java.lang.String... argument)
Executes a command on the current connection.- Specified by:
execute
in interfaceVirtualMachine.ForHotSpot.Connection
- Parameters:
protocol
- The target VMs protocol version for the attach API.argument
- The arguments to send to the target VM.- Returns:
- The response of the target JVM.
-
createSecurityAttributesToAllowMediumIntegrity
private com.sun.jna.platform.win32.WinBase.SECURITY_ATTRIBUTES createSecurityAttributesToAllowMediumIntegrity()
CustomWinBase.SECURITY_ATTRIBUTES
is required here to "get" Medium Integrity Level. In order to allow Medium Integrity Level clients to open and use a NamedPipe created by an High Integrity Level process.- Returns:
- A security attributes object that gives everyone read and write access.
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-