1420c9859SShuo Chenpackage muduo.rpc.test; 2420c9859SShuo Chen 3420c9859SShuo Chenimport java.net.SocketAddress; 4420c9859SShuo Chen 5420c9859SShuo Chenimport org.jboss.netty.channel.Channel; 6420c9859SShuo Chenimport org.jboss.netty.channel.ChannelConfig; 7420c9859SShuo Chenimport org.jboss.netty.channel.ChannelFactory; 8420c9859SShuo Chenimport org.jboss.netty.channel.ChannelFuture; 9420c9859SShuo Chenimport org.jboss.netty.channel.ChannelPipeline; 10420c9859SShuo Chen 11420c9859SShuo Chenclass MockChannel implements Channel { 12420c9859SShuo Chen 13420c9859SShuo Chen Object message; 14420c9859SShuo Chen 15420c9859SShuo Chen @Override 16420c9859SShuo Chen public int compareTo(Channel o) { 17420c9859SShuo Chen return 0; 18420c9859SShuo Chen } 19420c9859SShuo Chen 20420c9859SShuo Chen @Override 21420c9859SShuo Chen public Integer getId() { 22420c9859SShuo Chen return null; 23420c9859SShuo Chen } 24420c9859SShuo Chen 25420c9859SShuo Chen @Override 26420c9859SShuo Chen public ChannelFactory getFactory() { 27420c9859SShuo Chen return null; 28420c9859SShuo Chen } 29420c9859SShuo Chen 30420c9859SShuo Chen @Override 31420c9859SShuo Chen public Channel getParent() { 32420c9859SShuo Chen return null; 33420c9859SShuo Chen } 34420c9859SShuo Chen 35420c9859SShuo Chen @Override 36420c9859SShuo Chen public ChannelConfig getConfig() { 37420c9859SShuo Chen return null; 38420c9859SShuo Chen } 39420c9859SShuo Chen 40420c9859SShuo Chen @Override 41420c9859SShuo Chen public ChannelPipeline getPipeline() { 42420c9859SShuo Chen return null; 43420c9859SShuo Chen } 44420c9859SShuo Chen 45420c9859SShuo Chen @Override 46420c9859SShuo Chen public boolean isOpen() { 47420c9859SShuo Chen return false; 48420c9859SShuo Chen } 49420c9859SShuo Chen 50420c9859SShuo Chen @Override 51420c9859SShuo Chen public boolean isBound() { 52420c9859SShuo Chen return false; 53420c9859SShuo Chen } 54420c9859SShuo Chen 55420c9859SShuo Chen @Override 56420c9859SShuo Chen public boolean isConnected() { 57420c9859SShuo Chen return false; 58420c9859SShuo Chen } 59420c9859SShuo Chen 60420c9859SShuo Chen @Override 61420c9859SShuo Chen public SocketAddress getLocalAddress() { 62420c9859SShuo Chen return null; 63420c9859SShuo Chen } 64420c9859SShuo Chen 65420c9859SShuo Chen @Override 66420c9859SShuo Chen public SocketAddress getRemoteAddress() { 67420c9859SShuo Chen return null; 68420c9859SShuo Chen } 69420c9859SShuo Chen 70420c9859SShuo Chen @Override 71420c9859SShuo Chen public ChannelFuture write(Object message) { 72420c9859SShuo Chen this.message = message; 73420c9859SShuo Chen return null; 74420c9859SShuo Chen } 75420c9859SShuo Chen 76420c9859SShuo Chen @Override 77420c9859SShuo Chen public ChannelFuture write(Object message, SocketAddress remoteAddress) { 78420c9859SShuo Chen return null; 79420c9859SShuo Chen } 80420c9859SShuo Chen 81420c9859SShuo Chen @Override 82420c9859SShuo Chen public ChannelFuture bind(SocketAddress localAddress) { 83420c9859SShuo Chen return null; 84420c9859SShuo Chen } 85420c9859SShuo Chen 86420c9859SShuo Chen @Override 87420c9859SShuo Chen public ChannelFuture connect(SocketAddress remoteAddress) { 88420c9859SShuo Chen return null; 89420c9859SShuo Chen } 90420c9859SShuo Chen 91420c9859SShuo Chen @Override 92420c9859SShuo Chen public ChannelFuture disconnect() { 93420c9859SShuo Chen return null; 94420c9859SShuo Chen } 95420c9859SShuo Chen 96420c9859SShuo Chen @Override 97420c9859SShuo Chen public ChannelFuture unbind() { 98420c9859SShuo Chen return null; 99420c9859SShuo Chen } 100420c9859SShuo Chen 101420c9859SShuo Chen @Override 102420c9859SShuo Chen public ChannelFuture close() { 103420c9859SShuo Chen return null; 104420c9859SShuo Chen } 105420c9859SShuo Chen 106420c9859SShuo Chen @Override 107420c9859SShuo Chen public ChannelFuture getCloseFuture() { 108420c9859SShuo Chen return null; 109420c9859SShuo Chen } 110420c9859SShuo Chen 111420c9859SShuo Chen @Override 112420c9859SShuo Chen public int getInterestOps() { 113420c9859SShuo Chen return 0; 114420c9859SShuo Chen } 115420c9859SShuo Chen 116420c9859SShuo Chen @Override 117420c9859SShuo Chen public boolean isReadable() { 118420c9859SShuo Chen return false; 119420c9859SShuo Chen } 120420c9859SShuo Chen 121420c9859SShuo Chen @Override 122420c9859SShuo Chen public boolean isWritable() { 123420c9859SShuo Chen return false; 124420c9859SShuo Chen } 125420c9859SShuo Chen 126420c9859SShuo Chen @Override 127420c9859SShuo Chen public ChannelFuture setInterestOps(int interestOps) { 128420c9859SShuo Chen return null; 129420c9859SShuo Chen } 130420c9859SShuo Chen 131420c9859SShuo Chen @Override 132420c9859SShuo Chen public ChannelFuture setReadable(boolean readable) { 133420c9859SShuo Chen return null; 134420c9859SShuo Chen } 135420c9859SShuo Chen 136420c9859SShuo Chen} 137