Javametrics can be used to send and receive generic monitoring data from your application, as well as to enable or disable existing types of data.
Javametrics public API class. Used to create Topics which can send data to Javametrics. JSON formatted data can also be sent directly using sendJSON.
Get a Topic to send data on. If a topic with the given name already exists then that will be returned to you
- Parameters:
topicName
— the name of the topic to be returned - Returns: Topic
Send data to Javametrics
- Parameters:
topicName
— the name of the topic to send data onpayload
— A JSON object formatted as a String
Returns true if the given topic is enabled
- Parameters:
topicName
— the name of the topic
Add a JavametricsListener, which will be informed of Javametrics events
- Parameters:
jml
— the JavametricsListener to be added
Remove a JavametricsListener
- Parameters:
jml
— the JavametricsListener to be removed - Returns: true if the listener was registered
A Javametrics topic on which data can be emitted. Create a new topic by calling Javametrics.createTopic(..) Topics created this way are registered with the Javametrics agent and are 'on' by default.
Send a message (sends if enabled)
- Parameters:
message
— the message to be emitted
Send a message with a start and end time (sends if enabled)
- Parameters:
startTime
— start time in milliseconds (see System.currentTimeMillis for definition)endTime
— end time in milliseconds (see System.currentTimeMillis for definition)message
— the message to be emitted
Send a timed event with a start and end time (sends if enabled)
- Parameters:
startTime
— start time in milliseconds (see System.currentTimeMillis for definition)endTime
— end time in milliseconds (see System.currentTimeMillis for definition)
Send a JSON formatted String
- Parameters:
payload
— A JSON object formatted as a String
Disable this topic (send methods will do nothing)
Enable this topic
- Returns: true if this topic is enabled
A listener to Javametrics events
Receive data from the Javametrics agent
- Parameters:
pluginName
— - the plugin that sent the datadata
— - the data as a String