Top Constructors Methods
sun.tools.attach

public Class AttachProviderImpl

extends HotSpotAttachProvider
Class Inheritance
Imports
com.sun.tools.attach.VirtualMachine, .VirtualMachineDescriptor, .AttachNotSupportedException, java.io.IOException

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public VirtualMachine
attachVirtualMachine(String
The abstract identifier that identifies the Java virtual machine.
vmid
)

Implements abstract com.sun.tools.attach.spi.AttachProvider.attachVirtualMachine.

Attaches to a Java virtual machine.

public VirtualMachine
attachVirtualMachine(VirtualMachineDescriptor
The virtual machine descriptor
vmd
)

Overrides com.sun.tools.attach.spi.AttachProvider.attachVirtualMachine.

Attaches to a Java virtual machine.

public String
name()

Implements abstract com.sun.tools.attach.spi.AttachProvider.name.

Return this provider's name.

public String
type()

Implements abstract com.sun.tools.attach.spi.AttachProvider.type.

Return this provider's type.

Inherited from sun.tools.attach.HotSpotAttachProvider:
checkAttachPermissionlistVirtualMachinestestAttachable

Constructor Detail

AttachProviderImplback to summary
public AttachProviderImpl()

Method Detail

attachVirtualMachineback to summary
public VirtualMachine attachVirtualMachine(String vmid) throws AttachNotSupportedException, IOException

Implements abstract com.sun.tools.attach.spi.AttachProvider.attachVirtualMachine.

Doc from com.sun.tools.attach.spi.AttachProvider.attachVirtualMachine.

Attaches to a Java virtual machine.

A Java virtual machine is identified by an abstract identifier. The nature of this identifier is platform dependent but in many cases it will be the string representation of the process identifier (or pid).

This method parses the identifier and maps the identifier to a Java virtual machine (in an implementation dependent manner). If the identifier cannot be parsed by the provider then an AttachNotSupportedException is thrown. Once parsed this method attempts to attach to the Java virtual machine. If the provider detects that the identifier corresponds to a Java virtual machine that does not exist, or it corresponds to a Java virtual machine that does not support the attach mechanism implemented by this provider, or it detects that the Java virtual machine is a version to which this provider cannot attach, then an AttachNotSupportedException is thrown.

Parameters
vmid:String

The abstract identifier that identifies the Java virtual machine.

Returns:VirtualMachine

VirtualMachine representing the target virtual machine.

Exceptions
AttachNotSupportedException:
If the identifier cannot be parsed, or it corresponds to to a Java virtual machine that does not exist, or it corresponds to a Java virtual machine which this provider cannot attach.
IOException:
If some other I/O error occurs
attachVirtualMachineback to summary
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) throws AttachNotSupportedException, IOException

Overrides com.sun.tools.attach.spi.AttachProvider.attachVirtualMachine.

Doc from com.sun.tools.attach.spi.AttachProvider.attachVirtualMachine.

Attaches to a Java virtual machine.

A Java virtual machine can be described using a VirtualMachineDescriptor. This method invokes the descriptor's provider() method to check that it is equal to this provider. It then attempts to attach to the Java virtual machine.

Parameters
vmd:VirtualMachineDescriptor

The virtual machine descriptor

Returns:VirtualMachine

VirtualMachine representing the target virtual machine.

Exceptions
AttachNotSupportedException:
If the descriptor's provider() method returns a provider that is not this provider, or it does not correspond to a Java virtual machine to which this provider can attach.
IOException:
If some other I/O error occurs
nameback to summary
public String name()

Implements abstract com.sun.tools.attach.spi.AttachProvider.name.

Doc from com.sun.tools.attach.spi.AttachProvider.name.

Return this provider's name.

Returns:String

The name of this provider

typeback to summary
public String type()

Implements abstract com.sun.tools.attach.spi.AttachProvider.type.

Doc from com.sun.tools.attach.spi.AttachProvider.type.

Return this provider's type.

Returns:String

The type of this provider