Package com.alibaba.dubbo.remoting.exchange.support

Examples of com.alibaba.dubbo.remoting.exchange.support.ExchangeHandlerAdapter


       
        // 启动服务器
        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)) {
View Full Code Here


        return server;
    }
   
    private static ExchangeServer statTelnetServer(int port) throws Exception{
       // 启动服务器
        ExchangeServer telnetserver = Exchangers.bind("exchange://0.0.0.0:" + port , new ExchangeHandlerAdapter() {
            public String telnet(Channel channel, String message) throws RemotingException {
                if(message.equals("help")){
                    return "support cmd: \r\n\tstart \r\n\tstop \r\n\tshutdown \r\n\trestart times [alive] [sleep] \r\ntelnet>";
                } else if(message.equals("stop")){
                    logger.info("server closed:"+server);
View Full Code Here

        url.append(transporter);
        url.append("&serialization=");
        url.append(serialization);
        url.append("&threads=");
        url.append(maxThreads);
        Exchangers.bind(url.toString(), new ExchangeHandlerAdapter() {

            public Object reply(ExchangeChannel channel, Object message) throws RemotingException {
                return new ResponseObject(responseSize); // 发送响应
            }
        });
View Full Code Here

TOP

Related Classes of com.alibaba.dubbo.remoting.exchange.support.ExchangeHandlerAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.