Package org.rhq.enterprise.communications

Examples of org.rhq.enterprise.communications.Ping.ping()


        try {
            // create our own factory so we can customize the timeout
            ClientRemotePojoFactory factory = sender.getClientRemotePojoFactory();
            factory.setTimeout(timeoutMillis);
            Ping pinger = factory.getRemotePojo(Ping.class);
            pinger.ping("", null);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
View Full Code Here


        if (sender != null) {
            if (numberOfTimes == 1) {
                // if executing it just one time, then do so synchronously
                Ping ping = sender.getClientRemotePojoFactory().getRemotePojo(Ping.class);
                agent.getOut().println(MSG.getMsg(AgentI18NResourceKeys.PING_PINGING));
                String ping_results = ping.ping("PING", "Ack: ");
                agent.getOut().println(MSG.getMsg(AgentI18NResourceKeys.PING_PING_RESULTS, ping_results));
            } else {
                ClientRemotePojoFactory factory = sender.getClientRemotePojoFactory();
                factory.setDeliveryGuaranteed(guaranteed);
                factory.setAsynch(true, new Callback(agent));
View Full Code Here

                Ping ping = factory.getRemotePojo(Ping.class);

                for (int i = 0; i < numberOfTimes; i++) {
                    agent.getOut().println(MSG.getMsg(AgentI18NResourceKeys.PING_ASYNC_PING, i, guaranteed));
                    ping.ping("PING", "Ack #"
                        + i
                        + ((ClientRemotePojoFactory.GuaranteedDelivery.YES == guaranteed) ? (" ("
                            + MSG.getMsg(AgentI18NResourceKeys.PING_GUARANTEED) + ")") : "") + ": ");
                }
            }
View Full Code Here

            // create our own factory so we can customize the timeout
            ClientRemotePojoFactory factory = sender.getClientRemotePojoFactory();
            factory.setTimeout(timeoutMillis);
            Ping pinger = factory.getRemotePojo(Ping.class);
            pinger.ping("", null);
            return true;
        } catch (Exception e) {
            LOG.debug(ServerI18NResourceKeys.PING_FAILED, endpoint, ThrowableUtil.getAllMessages(e, true));
            pinged = false;
        } finally {
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.