Examples of DisconnectHandler


Examples of demo.DisconnectHandler

    Main2 m = new Main2();
    m.initZk();
   
    IService client = new IService(DemoConf.host, DemoConf.root, "", "", DemoConf.tmpPath);
    client.setEventHandle(Constants.CONNECT_EVENT, new ConnectHandler());
    client.setEventHandle(Constants.DISCONNECT_EVENT, new DisconnectHandler());
    client.setEventHandle(Constants.EXPIRED_EVENT, new ExpiredHandler());
    client.init();
   
    String key = "app2/key1";
    Config config = client.createConfig("/IserviceDemoTest/group1");
View Full Code Here

Examples of demo.DisconnectHandler

    Main m = new Main();
    m.initZk();
   
    IService client = new IService(DemoConf.host, DemoConf.root, "", "", DemoConf.tmpPath);
    client.setEventHandle(Constants.CONNECT_EVENT, new ConnectHandler());
    client.setEventHandle(Constants.DISCONNECT_EVENT, new DisconnectHandler());
    client.setEventHandle(Constants.EXPIRED_EVENT, new ExpiredHandler());
    client.init();
   
    String key = "key1";
    Config config = client.createConfig("/IserviceDemoTest/group1/app2");
View Full Code Here

Examples of org.apache.james.protocols.api.DisconnectHandler

    public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
        List<DisconnectHandler> connectHandlers = chain.getHandlers(DisconnectHandler.class);
        ProtocolSession session = (ProtocolSession) attributes.get(ctx.getChannel());
        if (connectHandlers != null) {
            for (int i = 0; i < connectHandlers.size(); i++) {
                DisconnectHandler cHandler = connectHandlers.get(i);
               
                connectHandlers.get(i).onDisconnect(session);
              
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.