|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.jmx.SimonInfo
public final class SimonInfo
Value object for retrieving Simon name and type info via Simon MXBean (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()| Field Summary | |
|---|---|
static String |
COUNTER
Type identifier for Counter. |
private String |
name
|
static String |
STOPWATCH
Type identifier for Stopwatch. |
private String |
type
|
static String |
UNKNOWN
Type identifier for unknown Simon. |
| Constructor Summary | |
|---|---|
SimonInfo(String name,
String type)
Class constructor due to JMX requirements. |
|
| Method Summary | |
|---|---|
String |
getName()
Returns fully hierarchical name of Simon. |
String |
getType()
Returns Simon type, either 'stopwatch' or 'counter' strings. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String UNKNOWN
public static final String STOPWATCH
public static final String COUNTER
private String name
private String type
| Constructor Detail |
|---|
@ConstructorProperties(value={"name","type"})
public SimonInfo(String name,
String type)
name - Simon nametype - Simon type ('stopwatch' or 'counter')| Method Detail |
|---|
public String getName()
public String getType()
'stopwatch' or 'counter' strings.
UNKNOWN,
STOPWATCH,
COUNTER
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||