java.lang.Object
jdk.management.jfr.EventTypeInfo
public final class EventTypeInfo extends Object
Management representation of an
EventType
.- Since:
- 9
- See Also:
EventType
-
Method Summary
Modifier and Type Method Description static EventTypeInfo
from(CompositeData cd)
Returns anEventType
represented by the specifiedCompositeData
List<String>
getCategoryNames()
Returns the list of human-readable names that makes up the category for thisEventTypeInfo
(for example,"Java Virtual Machine"
or"Garbage Collector"
).String
getDescription()
Returns a short sentence or two describing the event type associated with thisEventTypeInfo
, for example"Garbage collection performed by the JVM""
.long
getId()
Returns the unique ID for the event type associated with thisEventTypeInfo
, not guaranteed to be the same for different Java Virtual Machines (JVMs) instances.String
getLabel()
Returns the label, a human-readable name, associated with the event type for thisEventTypeInfo
(for example,"Garbage Collection"
).String
getName()
Returns the name for the event type associated with thisEventTypeInfo
(for example,"jdk.GarbageCollection"
).List<SettingDescriptorInfo>
getSettingDescriptors()
Returns settings for the event type associated with thisEventTypeInfo
.String
toString()
Returns a description of thisEventTypeInfo
.
-
Method Details
-
getLabel
Returns the label, a human-readable name, associated with the event type for thisEventTypeInfo
(for example,"Garbage Collection"
).- Returns:
- the label, or
null
if a label is not set - See Also:
EventType.getLabel()
-
getCategoryNames
Returns the list of human-readable names that makes up the category for thisEventTypeInfo
(for example,"Java Virtual Machine"
or"Garbage Collector"
).- Returns:
- an immutable list of category names, or a list with the name
"Uncategorized"
if no category has been set - See Also:
EventType.getCategoryNames()
,Category
-
getId
public long getId()Returns the unique ID for the event type associated with thisEventTypeInfo
, not guaranteed to be the same for different Java Virtual Machines (JVMs) instances.- Returns:
- the ID
- See Also:
EventType.getId()
-
getName
Returns the name for the event type associated with thisEventTypeInfo
(for example,"jdk.GarbageCollection"
).- Returns:
- the name, not
null
- See Also:
EventType.getName()
-
getDescription
Returns a short sentence or two describing the event type associated with thisEventTypeInfo
, for example"Garbage collection performed by the JVM""
.- Returns:
- the description, or
null
if no description exists - See Also:
EventType.getDescription()
-
getSettingDescriptors
Returns settings for the event type associated with thisEventTypeInfo
.- Returns:
- the settings, not
null
- See Also:
EventType.getSettingDescriptors()
-
toString
Returns a description of thisEventTypeInfo
. -
from
Returns anEventType
represented by the specifiedCompositeData
The supplied
CompositeData
must have the following item names and item types to be valid.The name and type the specified CompositeData must contain Name Type id Long
name String
label String
description String
category ArrayType(1, SimpleType.STRING)
settings javax.management.openmbean.CompositeData[]
whose element type is the mapped type forSettingDescriptorInfo
as specified in theSettingDescriptorInfo.from(javax.management.openmbean.CompositeData)
method.- Parameters:
cd
-CompositeData
representing theEventTypeInfo
to return- Returns:
- an
EventTypeInfo
, ornull
ifcd
isnull
- Throws:
IllegalArgumentException
- ifcd
does not represent a validEventTypeInfo
-