##### Coverage Report - com.ctrip.apollo.cat.NullMessageManager

Classes in this File | Line Coverage | Branch Coverage | Complexity
NullMessageManager |
0% | 0/21
N/A | N/A
| 1.0625;1.062

1 |  |
     package com.ctrip.apollo.cat;
2 |  |
3 |  |
     import java.io.IOException;
4 |  |
5 |  |
     import org.codehaus.plexus.logging.LogEnabled;
6 |  |
     import org.codehaus.plexus.logging.Logger;
7 |  |
     import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
8 |  |
     import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
9 |  |
     import org.unidal.lookup.ContainerHolder;
10 |  |
     import org.unidal.lookup.annotation.Inject;
11 |  |
12 |  |
     import com.dianping.cat.message.Message;
13 |  |
     import com.dianping.cat.message.Transaction;
14 |  |
     import com.dianping.cat.message.internal.MessageIdFactory;
15 |  |
     import com.dianping.cat.message.spi.MessageManager;
16 |  |
     import com.dianping.cat.message.spi.MessageTree;
17 |  |
18 | 0 |
     public class NullMessageManager extends ContainerHolder
19 |  |
         implements
20 |  |
           MessageManager,
21 |  |
           Initializable,
22 |  |
           LogEnabled {
23 |  |
24 |  |
       @Inject
25 |  |
       private MessageIdFactory m_factory;
26 |  |
27 |  |
       @Override
28 |  |
       public void enableLogging(Logger logger) {
29 |  |
30 | 0 |
       }
31 |  |
32 |  |
       @Override
33 |  |
       public void initialize() throws InitializationException {
34 |  |
         try {
35 | 0 |
           m_factory.initialize("localhost");
36 | 0 |
         } catch (IOException e) {
37 | 0 |
           e.printStackTrace();
38 | 0 |
         }
39 | 0 |
       }
40 |  |
41 |  |
       @Override
42 |  |
       public void add(Message message) {
43 |  |
44 | 0 |
       }
45 |  |
46 |  |
       @Override
47 |  |
       public void end(Transaction transaction) {
48 |  |
49 | 0 |
       }
50 |  |
51 |  |
       @Override
52 |  |
       public Transaction getPeekTransaction() {
53 | 0 |
         return null;
54 |  |
       }
55 |  |
56 |  |
       @Override
57 |  |
       public MessageTree getThreadLocalMessageTree() {
58 | 0 |
         return null;
59 |  |
       }
60 |  |
61 |  |
       @Override
62 |  |
       public boolean hasContext() {
63 | 0 |
         return false;
64 |  |
       }
65 |  |
66 |  |
       @Override
67 |  |
       public boolean isMessageEnabled() {
68 | 0 |
         return false;
69 |  |
       }
70 |  |
71 |  |
       @Override
72 |  |
       public boolean isCatEnabled() {
73 | 0 |
         return false;
74 |  |
       }
75 |  |
76 |  |
       @Override
77 |  |
       public boolean isTraceMode() {
78 | 0 |
         return false;
79 |  |
       }
80 |  |
81 |  |
       @Override
82 |  |
       public void reset() {
83 |  |
84 | 0 |
       }
85 |  |
86 |  |
       @Override
87 |  |
       public void setTraceMode(boolean traceMode) {
88 |  |
89 | 0 |
       }
90 |  |
91 |  |
       @Override
92 |  |
       public void setup() {
93 |  |
94 | 0 |
       }
95 |  |
96 |  |
       @Override
97 |  |
       public void start(Transaction transaction, boolean forked) {
98 |  |
99 | 0 |
       }
100 |  |
101 |  |
       @Override
102 |  |
       public void bind(String tag, String title) {
103 |  |
104 | 0 |
       }
105 |  |
106 |  |
       @Override
107 |  |
       public String getDomain() {
108 | 0 |
         return null;
109 |  |
       }
110 |  |
111 |  |
     }