public interface Message
Message represents data collected during application runtime. It will be sent to back-end system asynchronous for further processing.
Super interface of Event, Heartbeat and Transaction.
Event, Heartbeat, Transaction| 限定符和类型 | 方法和说明 |
|---|---|
void |
addData(String keyValuePairs)
add one or multiple key-value pairs to the message.
|
void |
addData(String key,
Object value)
add one key-value pair to the message.
|
void |
complete()
Complete the message construction.
|
Object |
getData() |
String |
getName()
Message name.
|
String |
getStatus()
Get the message status.
|
long |
getTimestamp()
The time stamp the message was created.
|
String |
getType()
Message type.
|
boolean |
isCompleted()
If the complete() method was called or not.
|
boolean |
isSuccess() |
void |
setStatus(String status)
Set the message status.
|
void |
setStatus(Throwable e)
Set the message status with exception class name.
|
void |
setSuccessStatus() |
void |
setTimestamp(long timestamp) |
void addData(String keyValuePairs)
keyValuePairs - key-value pairs like 'a=1&b=2&...'void addData(String key, Object value)
key - value - void complete()
Object getData()
String getName()
String getStatus()
void setStatus(Throwable e)
e - exception.long getTimestamp()
void setTimestamp(long timestamp)
String getType()
Typical message types are:
boolean isCompleted()
boolean isSuccess()
void setStatus(String status)
status - message status. "0" means success, otherwise error code.void setSuccessStatus()
Copyright © 2022. All rights reserved.