1 46 package org.mr.core.net; 47 48 import java.io.IOException ; 49 import java.net.InetSocketAddress ; 50 import java.nio.channels.SelectableChannel ; 51 52 62 63 public interface TransportImpl extends SelectorReadCallback { 64 68 public void shutdown(); 69 70 74 public void read(); 75 76 90 public void write(CNLMessage msg, int id, 91 NetworkSelector selector) 92 throws IOException ; 93 94 99 public boolean isInitialized(); 100 103 public void setInitialized(); 104 107 public SelectableChannel getChannel(); 108 111 public TransportType getType(); 112 115 public boolean isConnected(); 116 119 public boolean isDown(); 120 123 public void setListener(NetworkListener listener); 124 128 public void onConnect(); 129 130 134 public InetSocketAddress getLocalSocketAddress(); 135 136 140 public InetSocketAddress getRemoteSocketAddress(); 141 } | Popular Tags |