Examples of HeartEvent


Examples of com.alibaba.otter.shared.communication.core.model.heart.HeartEvent

    public boolean validateObject(Object key, Object obj) {
        if (obj instanceof CommunicationConnectionPoolable) {
            CommunicationConnectionPoolable connection = (CommunicationConnectionPoolable) obj;
            try {
                Object value = connection.call(new HeartEvent());//发起一次心跳检查
                return value != null;
            } catch (Exception e) {
                return false;
            }
        }
View Full Code Here

Examples of com.alibaba.otter.shared.communication.core.model.heart.HeartEvent

        CommunicationConnectionFactory factory = new DubboCommunicationConnectionFactory();
        CommunicationParam param = new CommunicationParam();
        param.setIp("127.0.0.1");
        param.setPort(2088);
        CommunicationConnection connection = factory.createConnection(param);
        Object result = connection.call(new HeartEvent());
        want.object(result).notNull();
    }
View Full Code Here

Examples of com.alibaba.otter.shared.communication.core.model.heart.HeartEvent

        CommunicationConnectionFactory factory = new RmiCommunicationConnectionFactory();
        CommunicationParam param = new CommunicationParam();
        param.setIp("127.0.0.1");
        param.setPort(1099);
        CommunicationConnection connection = factory.createConnection(param);
        Object result = connection.call(new HeartEvent());
        want.object(result).notNull();
    }
View Full Code Here

Examples of com.alibaba.otter.shared.communication.core.model.heart.HeartEvent

    @SpringBeanByName
    private CommunicationClient rmiCommunicationClient;

    @Test
    public void testRmiSingle() {
        Object result = rmiCommunicationClient.call("127.0.0.1:1099", new HeartEvent());
        want.object(result).notNull();
    }
View Full Code Here

Examples of com.alibaba.otter.shared.communication.core.model.heart.HeartEvent

        want.object(result).notNull();
    }

    @Test
    public void testRmiPool() {
        Object result = rmiPoolCommunicationClient.call("127.0.0.1:1099", new HeartEvent());
        want.object(result).notNull();
    }
View Full Code Here

Examples of com.alibaba.otter.shared.communication.core.model.heart.HeartEvent

        want.object(result).notNull();
    }

    @Test
    public void testDubboSingle() {
        Object result = dubboCommunicationClient.call("127.0.0.1:2088", new HeartEvent());
        want.object(result).notNull();
    }
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.