RealtimeConfigConfiguration.java
1.39 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.dianping.cat.consumer;
import java.util.ArrayList;
import java.util.List;
import org.unidal.lookup.configuration.AbstractResourceConfigurator;
import org.unidal.lookup.configuration.Component;
import com.dianping.cat.analysis.MessageAnalyzer;
import com.dianping.cat.analysis.MessageAnalyzerManager;
import com.dianping.cat.consumer.event.EventAnalyzer;
import com.dianping.cat.consumer.top.TopAnalyzer;
import com.dianping.cat.consumer.transaction.Configurator;
import com.dianping.cat.consumer.transaction.TransactionAnalyzer;
import com.dianping.cat.consumer.transaction.TransactionAnalyzerTest;
public class RealtimeConfigConfiguration extends AbstractResourceConfigurator {
public static void main(String[] args) {
generatePlexusComponentsXmlFile(new Configurator());
}
protected Class<?> getTestClass() {
return TransactionAnalyzerTest.class;
}
@Override
public List<Component> defineComponents() {
List<Component> all = new ArrayList<Component>();
return all;
}
public static class MockMessageAnalyzerManager implements MessageAnalyzerManager {
@Override
public List<String> getAnalyzerNames() {
List<String> list = new ArrayList<String>();
list.add(TransactionAnalyzer.ID);
list.add(EventAnalyzer.ID);
list.add(TopAnalyzer.ID);
return list;
}
@Override
public List<MessageAnalyzer> getAnalyzer(String name, long startTime) {
return null;
}
}
}