Package org.opensolaris.os.dtrace
Class Probe
- java.lang.Object
-
- org.opensolaris.os.dtrace.Probe
-
- All Implemented Interfaces:
java.io.Serializable
public final class Probe extends java.lang.Object implements java.io.Serializable
AProbeDescription
identifying a single probe combined with information about the identified probe.Immutable. Supports persistence using
XMLEncoder
.
-
-
Constructor Summary
Constructors Constructor Description Probe(ProbeDescription probeDescription, ProbeInfo probeInfo)
Creates aProbe
instance with the given identifying description and associated probe information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Compares the specified object with thisProbe
instance for equality.ProbeDescription
getDescription()
Gets the probe description identifying a single probe described by this instance.ProbeInfo
getInfo()
Gets information including attributes and argument types of the probe identified bygetDescription()
.int
hashCode()
Overridden to ensure that equal instances have equal hash codes.java.lang.String
toString()
Returns a string representation of thisProbe
useful for logging and not intended for display.
-
-
-
Constructor Detail
-
Probe
public Probe(ProbeDescription probeDescription, ProbeInfo probeInfo)
Creates aProbe
instance with the given identifying description and associated probe information. Supports XML persistence.- Parameters:
probeDescription
- probe description that identifies a single DTrace probeprobeInfo
- information about the identified probe,null
indicating that the information could not be obtained- Throws:
java.lang.NullPointerException
- if the given probe description isnull
-
-
Method Detail
-
getDescription
public ProbeDescription getDescription()
Gets the probe description identifying a single probe described by this instance.- Returns:
- non-null probe description matching a single probe on the system
-
getInfo
public ProbeInfo getInfo()
Gets information including attributes and argument types of the probe identified bygetDescription()
.- Returns:
- information about the probe identified by
getDescription()
, ornull
if that information could not be obtained for any reason
-
equals
public boolean equals(java.lang.Object o)
Compares the specified object with thisProbe
instance for equality. Defines equality as having the same probe description.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
if and only if the specified object is also aProbe
and both instances return equal values fromgetDescription()
.
-
hashCode
public int hashCode()
Overridden to ensure that equal instances have equal hash codes.- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
Returns a string representation of thisProbe
useful for logging and not intended for display. The exact details of the representation are unspecified and subject to change, but the following format may be regarded as typical:class-name[property1 = value1, property2 = value2]
- Overrides:
toString
in classjava.lang.Object
-
-