Closed wsky closed 11 years ago
channel will be reused, so we can only have one ChannelHandler per channel
public static DynamicProxy connect(URI uri) throws ChannelException {
ClientChannel channel = selectHandler.getClientChannel(uri);
RemotingClientChannelHandler channelHandler = new RemotingClientChannelHandler(
loggerFactory.create("RemotingClientChannelHandler-" + uri));
channel.setChannelHandler(channelHandler);
return new DynamicProxy(channel, channelHandler);
}
channel in use will get unexpect handler!
currently one identity AtomicInteger per handler, but only have one serverhandler, flag will confused between RemotingClientChannelHandler