Class BsdVirtualMachine
java.lang.Object
com.sun.tools.attach.VirtualMachine
sun.tools.attach.HotSpotVirtualMachine
sun.tools.attach.BsdVirtualMachine
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBsdVirtualMachine(AttachProvider provider, String vmid) Attaches to the target VM -
Method Summary
Modifier and TypeMethodDescription(package private) static voidcheckPermissions(String path) (package private) static voidclose(int fd) (package private) static void(package private) static voidcreateAttachFile(String path) voiddetach()Detach from the target VM(package private) InputStreamExecute the given command in the target VM.private StringfindSocketFile(int pid) (package private) static String(package private) static intread(int fd, byte[] buf, int off, int bufLen) (package private) static voidsendQuitTo(int pid) (package private) static intsocket()(package private) static voidwrite(int fd, byte[] buf, int off, int bufLen) private voidwriteString(int fd, String s) Methods inherited from class HotSpotVirtualMachine
attachTimeout, dumpHeap, executeJCmd, getAgentProperties, getSystemProperties, heapHisto, loadAgent, loadAgentLibrary, loadAgentPath, localDataDump, printFlag, readInt, remoteDataDump, setFlagMethods inherited from class VirtualMachine
attach, attach, equals, hashCode, id, list, loadAgent, loadAgentLibrary, loadAgentPath, provider, toString
-
Field Details
-
tmpdir
-
path
String path -
PROTOCOL_VERSION
- See Also:
-
ATTACH_ERROR_BADVERSION
private static final int ATTACH_ERROR_BADVERSION- See Also:
-
-
Constructor Details
-
BsdVirtualMachine
public BsdVirtualMachine(AttachProvider provider, String vmid) throws AttachNotSupportedException, IOException Attaches to the target VM
-
-
Method Details
-
detach
Detach from the target VM- Specified by:
detachin classVirtualMachine- Throws:
IOException- If an I/O error occurs
-
execute
Execute the given command in the target VM.- Specified by:
executein classHotSpotVirtualMachine- Throws:
AgentLoadExceptionIOException
-
findSocketFile
-
writeString
- Throws:
IOException
-
sendQuitTo
- Throws:
IOException
-
checkPermissions
- Throws:
IOException
-
socket
- Throws:
IOException
-
connect
- Throws:
IOException
-
close
- Throws:
IOException
-
read
- Throws:
IOException
-
write
- Throws:
IOException
-
createAttachFile
-
getTempDir
-