public final class SimonInfo extends Object
SimonManagerMXBean
).
This value object make possible to retrieve list of all instantiated Simons together with
their types, so no multiple roundtrips are needed.
Example: Following example shows usage of SimonInfo object to find out Simon type through jmx.
System.out.println("List of stopwatch Simons:"); for (SimonInfo si : simon.getSimonInfos()) { if (si.getType().equals(SimonInfo.STOPWATCH)) { System.out.println(" " + si.getName()); } }
SimonManagerMXBean.getSimonInfos()
Modifier and Type | Field and Description |
---|---|
static String |
COUNTER
Type identifier for Counter.
|
static String |
STOPWATCH
Type identifier for Stopwatch.
|
static String |
UNKNOWN
Type identifier for unknown Simon.
|
Constructor and Description |
---|
SimonInfo(String name,
String type)
Class constructor due to JMX requirements.
|
public static final String UNKNOWN
public static final String STOPWATCH
public static final String COUNTER
@ConstructorProperties(value={"name","type"}) public SimonInfo(String name, String type)
name
- Simon nametype
- Simon type ('stopwatch'
or 'counter'
)Copyright © 2019. All rights reserved.