Package org.glassfish.admin.monitor.jvm
Class ServerRuntimeStatsProvider
- java.lang.Object
-
- org.glassfish.admin.monitor.jvm.ServerRuntimeStatsProvider
-
@AMXMetadata(type="server-runtime-mon", group="monitoring", isSingleton=true) @ManagedObject @Description("Server Runtime Statistics") public class ServerRuntimeStatsProvider extends ObjectClass providing the MBean for server runtime statisticsThe MBean will be of the format
amx:pp=/mon/server-mon[server],type=server-runtime-monand can be enabled by turning the Jvm monitoring level in the admin console to LOW
-
-
Field Summary
Fields Modifier and Type Field Description static intFAILED_STATEstatic intRUNNING_STATEstatic intSTARTING_STATEstatic intSTOPPED_STATEstatic intSTOPPING_STATE
-
Constructor Summary
Constructors Constructor Description ServerRuntimeStatsProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetStartTime()Gets the start time of the Java virtual machinelonggetState()Gets the state of the server such as Running, Stopped, Failed.longgetUptime()Gets the uptime of the Java virtual machinevoidsetState(int state)
-
-
-
Field Detail
-
STARTING_STATE
public static final int STARTING_STATE
- See Also:
- Constant Field Values
-
RUNNING_STATE
public static final int RUNNING_STATE
- See Also:
- Constant Field Values
-
STOPPING_STATE
public static final int STOPPING_STATE
- See Also:
- Constant Field Values
-
STOPPED_STATE
public static final int STOPPED_STATE
- See Also:
- Constant Field Values
-
FAILED_STATE
public static final int FAILED_STATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUptime
@ManagedAttribute(id="uptime") @Description("uptime of the Java virtual machine in milliseconds") public long getUptime()Gets the uptime of the Java virtual machine- Returns:
- time in milliseconds
-
getStartTime
@ManagedAttribute(id="starttime") @Description("start time of the Java virtual machine") public long getStartTime()Gets the start time of the Java virtual machine- Returns:
- time in milliseconds since the epoch (1st January 1970)
-
getState
@ManagedAttribute(id="state") @Description("state of the server such as Running, Stopped, Failed") public long getState()Gets the state of the server such as Running, Stopped, Failed.- Returns:
- a number representing the state of the server
- See Also:
STARTING_STATE,RUNNING_STATE,STOPPING_STATE,STOPPED_STATE,FAILED_STATE
-
setState
public void setState(int state)
-
-