APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.tools.attach

public Class VirtualMachineImpl

extends HotSpotVirtualMachine
Class Inheritance
Annotations
@SuppressWarnings:restricted
Imports
com.sun.tools.attach.AgentLoadException, .AttachNotSupportedException, .AttachOperationFailedException, com.sun.tools.attach.spi.AttachProvider, java.io.File, .IOException, .InputStream, java.net.URISyntaxException, java.nio.file.Files, .Path, .Paths, java.util.Optional, java.util.regex.Pattern, sun.jvmstat.monitor.MonitoredHost, .MonitorException

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final Path
private HotSpotVirtualMachine.OperationProperties
private static final Path
private static final Pattern
private static final long
pack-priv String
private static final Path
private static final Path
Inherited from sun.tools.attach.HotSpotVirtualMachine:
VERSION_1VERSION_2

Constructor Summary

AccessConstructor and Description
pack-priv
VirtualMachineImpl(AttachProvider provider, String vmid)

Attaches to the target VM

Method Summary

Modifier and TypeMethod and Description
private static boolean
checkCatchesAndSendQuitTo(int pid, boolean throwIfNotReady)

pack-priv static native void
pack-priv static native void
close(int fd)

pack-priv static native void
connect(int fd, String path)

private File
createAttachFile(long pid, long ns_pid)

public void
detach()

Implements abstract com.sun.tools.attach.VirtualMachine.detach.

Detach from the target VM

pack-priv InputStream
execute(String cmd, Object... args)

Implements abstract sun.tools.attach.HotSpotVirtualMachine.execute.

Execute the given command in the target VM.

private File
findSocketFile(long pid, long ns_pid)

private String
private long
getNamespacePid(long pid)

pack-priv static native int
read(int fd, byte[] buf, int off, int bufLen)

pack-priv static native void
sendQuitTo(int pid)

pack-priv static native int
pack-priv static native void
write(int fd, byte[] buf, int off, int bufLen)

Inherited from sun.tools.attach.HotSpotVirtualMachine:
attachTimeoutcheckNullsdumpHeapexecuteCommandexecuteJCmdgetAgentPropertiesgetDefaultPropsgetSystemPropertiesheapHistoisAPIv2EnabledisStreamingEnabledloadAgentloadAgentLibraryloadAgentPathlocalDataDumpprintFlagprocessCompletionStatusreadIntreadMessageremoteDataDumpsetFlagstartLocalManagementAgentstartManagementAgentwriteCommand

Field Detail

FIELDback to summary
private static final String FIELD
MASKback to summary
private static final String MASK
PROCback to summary
private static final Path PROC
propsback to summary
private HotSpotVirtualMachine.OperationProperties props
ROOT_TMPback to summary
private static final Path ROOT_TMP
SIGNAL_MASK_PATTERNback to summary
private static final Pattern SIGNAL_MASK_PATTERN
SIGQUITback to summary
private static final long SIGQUIT
socket_pathback to summary
pack-priv String socket_path
STATUSback to summary
private static final Path STATUS
TMPDIRback to summary
private static final Path TMPDIR

Constructor Detail

VirtualMachineImplback to summary
pack-priv VirtualMachineImpl(AttachProvider provider, String vmid) throws AttachNotSupportedException, IOException

Attaches to the target VM

Method Detail

checkCatchesAndSendQuitToback to summary
private static boolean checkCatchesAndSendQuitTo(int pid, boolean throwIfNotReady) throws AttachNotSupportedException, IOException
checkPermissionsback to summary
pack-priv static native void checkPermissions(String path) throws IOException
closeback to summary
pack-priv static native void close(int fd) throws IOException
connectback to summary
pack-priv static native void connect(int fd, String path) throws IOException
createAttachFileback to summary
private File createAttachFile(long pid, long ns_pid) throws AttachNotSupportedException, IOException
detachback to summary
public void detach() throws IOException

Implements abstract com.sun.tools.attach.VirtualMachine.detach.

Detach from the target VM

Exceptions
IOException:

Doc from com.sun.tools.attach.VirtualMachine.detach.

If an I/O error occurs

executeback to summary
pack-priv InputStream execute(String cmd, Object... args) throws AgentLoadException, IOException

Implements abstract sun.tools.attach.HotSpotVirtualMachine.execute.

Execute the given command in the target VM.

findSocketFileback to summary
private File findSocketFile(long pid, long ns_pid) throws AttachNotSupportedException, IOException
findTargetProcessTmpDirectoryback to summary
private String findTargetProcessTmpDirectory(long pid) throws IOException
getNamespacePidback to summary
private long getNamespacePid(long pid) throws AttachNotSupportedException, IOException
readback to summary
pack-priv static native int read(int fd, byte[] buf, int off, int bufLen) throws IOException
sendQuitToback to summary
pack-priv static native void sendQuitTo(int pid) throws IOException
socketback to summary
pack-priv static native int socket() throws IOException
writeback to summary
pack-priv static native void write(int fd, byte[] buf, int off, int bufLen) throws IOException
sun.tools.attach back to summary

private Class VirtualMachineImpl.SocketInputStreamImpl

extends SocketInputStream
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
protected int
read(long fd, byte[] bs, int off, int len)

Implements abstract sun.tools.attach.HotSpotVirtualMachine.SocketInputStream.read.

Inherited from sun.tools.attach.HotSpotVirtualMachine.SocketInputStream:
closereadread

Constructor Detail

SocketInputStreamImplback to summary
public SocketInputStreamImpl(long fd)

Method Detail

closeback to summary
protected void close(long fd) throws IOException

Implements abstract sun.tools.attach.HotSpotVirtualMachine.SocketInputStream.close.

Annotations
@Override
readback to summary
protected int read(long fd, byte[] bs, int off, int len) throws IOException

Implements abstract sun.tools.attach.HotSpotVirtualMachine.SocketInputStream.read.

Annotations
@Override
sun.tools.attach back to summary

private Class VirtualMachineImpl.SocketOutputStream

extends Object
implements AttachOutputStream
Class Inheritance
All Implemented Interfaces
sun.tools.attach.HotSpotVirtualMachine.AttachOutputStream

Field Summary

Modifier and TypeField and Description
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
write(byte[] buffer, int offset, int length)

Implements sun.tools.attach.HotSpotVirtualMachine.AttachOutputStream.write.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fdback to summary
private int fd

Constructor Detail

SocketOutputStreamback to summary
public SocketOutputStream(int fd)

Method Detail

writeback to summary
public void write(byte[] buffer, int offset, int length) throws IOException

Implements sun.tools.attach.HotSpotVirtualMachine.AttachOutputStream.write.

Annotations
@Override