1package muduo.rpc.test;
2
3import java.net.SocketAddress;
4
5import org.jboss.netty.channel.Channel;
6import org.jboss.netty.channel.ChannelConfig;
7import org.jboss.netty.channel.ChannelFactory;
8import org.jboss.netty.channel.ChannelFuture;
9import org.jboss.netty.channel.ChannelPipeline;
10
11class MockChannel implements Channel {
12
13    Object message;
14
15    @Override
16    public int compareTo(Channel o) {
17        return 0;
18    }
19
20    @Override
21    public Integer getId() {
22        return null;
23    }
24
25    @Override
26    public ChannelFactory getFactory() {
27        return null;
28    }
29
30    @Override
31    public Channel getParent() {
32        return null;
33    }
34
35    @Override
36    public ChannelConfig getConfig() {
37        return null;
38    }
39
40    @Override
41    public ChannelPipeline getPipeline() {
42        return null;
43    }
44
45    @Override
46    public boolean isOpen() {
47        return false;
48    }
49
50    @Override
51    public boolean isBound() {
52        return false;
53    }
54
55    @Override
56    public boolean isConnected() {
57        return false;
58    }
59
60    @Override
61    public SocketAddress getLocalAddress() {
62        return null;
63    }
64
65    @Override
66    public SocketAddress getRemoteAddress() {
67        return null;
68    }
69
70    @Override
71    public ChannelFuture write(Object message) {
72        this.message = message;
73        return null;
74    }
75
76    @Override
77    public ChannelFuture write(Object message, SocketAddress remoteAddress) {
78        return null;
79    }
80
81    @Override
82    public ChannelFuture bind(SocketAddress localAddress) {
83        return null;
84    }
85
86    @Override
87    public ChannelFuture connect(SocketAddress remoteAddress) {
88        return null;
89    }
90
91    @Override
92    public ChannelFuture disconnect() {
93        return null;
94    }
95
96    @Override
97    public ChannelFuture unbind() {
98        return null;
99    }
100
101    @Override
102    public ChannelFuture close() {
103        return null;
104    }
105
106    @Override
107    public ChannelFuture getCloseFuture() {
108        return null;
109    }
110
111    @Override
112    public int getInterestOps() {
113        return 0;
114    }
115
116    @Override
117    public boolean isReadable() {
118        return false;
119    }
120
121    @Override
122    public boolean isWritable() {
123        return false;
124    }
125
126    @Override
127    public ChannelFuture setInterestOps(int interestOps) {
128        return null;
129    }
130
131    @Override
132    public ChannelFuture setReadable(boolean readable) {
133        return null;
134    }
135
136}
137