HeartbeatExtenstion.java
849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.dianping.cat.status;
import java.util.HashMap;
import java.util.Map;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
public class HeartbeatExtenstion implements StatusExtension, Initializable {
@Override
public String getId() {
return "MyTestId";
}
@Override
public String getDescription() {
return "MyDescription";
}
@Override
public Map<String, String> getProperties() {
Map<String, String> maps = new HashMap<String, String>();
maps.put("key1", String.valueOf(1));
maps.put("key2", String.valueOf(2));
maps.put("key3", String.valueOf(3));
return maps;
}
@Override
public void initialize() throws InitializationException {
StatusExtensionRegister.getInstance().register(this);
}
}