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.SerializableAProbeDescriptionidentifying 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 aProbeinstance with the given identifying description and associated probe information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Compares the specified object with thisProbeinstance for equality.ProbeDescriptiongetDescription()Gets the probe description identifying a single probe described by this instance.ProbeInfogetInfo()Gets information including attributes and argument types of the probe identified bygetDescription().inthashCode()Overridden to ensure that equal instances have equal hash codes.java.lang.StringtoString()Returns a string representation of thisProbeuseful for logging and not intended for display.
-
-
-
Constructor Detail
-
Probe
public Probe(ProbeDescription probeDescription, ProbeInfo probeInfo)
Creates aProbeinstance 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,nullindicating 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(), ornullif that information could not be obtained for any reason
-
equals
public boolean equals(java.lang.Object o)
Compares the specified object with thisProbeinstance for equality. Defines equality as having the same probe description.- Overrides:
equalsin classjava.lang.Object- Returns:
trueif and only if the specified object is also aProbeand both instances return equal values fromgetDescription().
-
hashCode
public int hashCode()
Overridden to ensure that equal instances have equal hash codes.- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Returns a string representation of thisProbeuseful 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:
toStringin classjava.lang.Object
-
-