A VirtualMachineDescriptor
is a container class used to
describe a Java virtual machine. It encapsulates an identifier that identifies
a target virtual machine, and a reference to the AttachProvider
that should be used
when attempting to attach to the virtual machine. The identifier is
implementation-dependent but is typically the process identifier (or pid)
environments where each Java virtual machine runs in its own operating system
process.
A VirtualMachineDescriptor
also has a displayName
.
The display name is typically a human readable string that a tool might
display to a user. For example, a tool that shows a list of Java
virtual machines running on a system might use the display name rather
than the identifier. A VirtualMachineDescriptor
may be
created without a display name. In that case the identifier is
used as the display name.
VirtualMachineDescriptor
instances are typically created by
invoking the VirtualMachine.
method. This returns the complete list of descriptors to describe the
Java virtual machines known to all installed attach providers
.
Modifier and Type | Field and Description |
---|---|
private String | |
private volatile int | |
private String | |
private AttachProvider |
Access | Constructor and Description |
---|---|
public | VirtualMachineDescriptor(AttachProvider
The AttachProvider to attach to the Java virtual machine. provider, String The virtual machine identifier. id, String The display name. displayName)Creates a virtual machine descriptor from the given components. |
public | VirtualMachineDescriptor(AttachProvider
The AttachProvider to attach to the Java virtual machine. provider, String The virtual machine identifier. id)Creates a virtual machine descriptor from the given components. |
Modifier and Type | Method and Description |
---|---|
public String | Returns: The display name component of this descriptor.Return the display name component of this descriptor. |
public boolean | Returns: true if, and only if, the given object is
a VirtualMachineDescriptor that is equal to this
VirtualMachineDescriptor.The object to which this object is to be compared ob)Overrides java. Tests this VirtualMachineDescriptor for equality with another object. |
public int | Returns: A hash-code value for this descriptor.Overrides java. Returns a hash-code value for this VirtualMachineDescriptor. |
public String | Returns: The identifier component of this descriptor.Return the identifier component of this descriptor. |
public AttachProvider | Returns: TheAttachProvider that this descriptor references.Return the |
public String | toString()
Overrides java. Returns the string representation of the |
displayName | back to summary |
---|---|
private String displayName |
hash | back to summary |
---|---|
private volatile int hash |
id | back to summary |
---|---|
private String id |
provider | back to summary |
---|---|
private AttachProvider provider |
VirtualMachineDescriptor | back to summary |
---|---|
public VirtualMachineDescriptor(AttachProvider provider, String id, String displayName) Creates a virtual machine descriptor from the given components.
|
VirtualMachineDescriptor | back to summary |
---|---|
public VirtualMachineDescriptor(AttachProvider provider, String id) Creates a virtual machine descriptor from the given components. This convenience constructor works as if by invoking the three-argument constructor as follows:
That is, it creates a virtual machine descriptor such that the display name is the same as the virtual machine identifier.
|
displayName | back to summary |
---|---|
public String displayName() Return the display name component of this descriptor.
|
equals | back to summary |
---|---|
public boolean equals(Object ob) Overrides java. Tests this VirtualMachineDescriptor for equality with another object. If the given object is not a VirtualMachineDescriptor then this
method returns This method satisfies the general contract of the
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Returns a hash-code value for this VirtualMachineDescriptor. The hash
code is based upon the descriptor's components, and satisfies
the general contract of the
|
id | back to summary |
---|---|
public String id() Return the identifier component of this descriptor.
|
provider | back to summary |
---|---|
public AttachProvider provider() Return the
|
toString | back to summary |
---|---|
public String toString() Overrides java. Returns the string representation of the
|