// 启动服务器
ExchangeServer server = Exchangers.bind("exchange://0.0.0.0:" + port + "?transporter="
+ transporter + "&serialization="
+ serialization + "&threadpool=" + threadpool
+ "&threads=" + threads + "&iothreads=" + iothreads +"&buffer="+buffer +"&channel.handler="+channelHandler, new ExchangeHandlerAdapter() {
public String telnet(Channel channel, String message) throws RemotingException {
return "echo: " + message + "\r\ntelnet> ";
}
public Object reply(ExchangeChannel channel, Object request) throws RemotingException {
if ("environment".equals(request)) {