MCPcopy Create free account
hub / github.com/dianping/cat / Message

Interface Message

cat-client/src/main/java/com/dianping/cat/message/Message.java:38–140  ·  view source on GitHub ↗

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 . @see com.dianping.cat.message.Transaction @see com.dia

Source from the content-addressed store, hash-verified

36 * @author Frankie Wu
37 */
38public interface Message {
39 public static final String SUCCESS = "0";
40
41 /**
42 * add one or multiple key-value pairs to the message.
43 *
44 * @param keyValuePairs
45 * key-value pairs like 'a=1&b=2&...'
46 */
47 public void addData(String keyValuePairs);
48
49 /**
50 * add one key-value pair to the message.
51 *
52 * @param key
53 * @param value
54 */
55 public void addData(String key, Object value);
56
57 /**
58 * Complete the message construction.
59 */
60 public void complete();
61
62 /**
63 * @return key value pairs data
64 */
65 public Object getData();
66
67 /**
68 * Message name.
69 *
70 * @return message name
71 */
72 public String getName();
73
74 /**
75 * Get the message status.
76 *
77 * @return message status. "0" means success, otherwise error code.
78 */
79 public String getStatus();
80
81 /**
82 * The time stamp the message was created.
83 *
84 * @return message creation time stamp in milliseconds
85 */
86 public long getTimestamp();
87
88 /**
89 * Message type.
90 *
91 * <p>
92 * Typical message types are:
93 * <ul>
94 * <li>URL: maps to one method of an action</li>
95 * <li>Service: maps to one method of service call</li>

Callers 68

logCatTransactionMethod · 0.65
beginLogMethod · 0.65
add_dataMethod · 0.65
__add_dataMethod · 0.65
completeMethod · 0.65
addDataForTransactionFunction · 0.65
logHeartbeatOfErlangFunction · 0.65
newAggregatorMetricFunction · 0.65
encodeLineMethod · 0.65
readMethod · 0.65
encodeMethod · 0.65
dataMethod · 0.65

Implementers 1

AbstractMessagecat-client/src/main/java/com/dianping/

Calls

no outgoing calls

Tested by

no test coverage detected