Examples of Ping


Examples of org.rhq.enterprise.communications.Ping

    public boolean ping(long timeoutMillis) {
        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

Examples of org.rhq.enterprise.communications.Ping

        ClientCommandSender sender = agent.getClientCommandSender();

        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));

                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

Examples of org.rhq.enterprise.communications.Ping

            sender.startSending();

            // 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

Examples of org.spout.vanilla.component.entity.player.Ping

import org.spout.vanilla.protocol.msg.player.conn.PlayerPingMessage;

public class PlayerPingHandler extends MessageHandler<PlayerPingMessage> {
  @Override
  public void handleServer(ServerSession session, PlayerPingMessage message) {
    Ping ping = session.getPlayer().get(Ping.class);
    if (ping != null) {
      ping.response(message.getPingId());
    }
  }
View Full Code Here

Examples of org.tarantool.core.cmd.Ping

  /** {@inheritDoc} */
  @Override
  public Boolean ping() {
    try {
      transport.execute(new Ping(id.get()));
      return true;
    } finally {
      returnConnection();
    }

View Full Code Here

Examples of org.tempuri.Ping

   
    Options options = stubServiceClient.getOptions();
    setUpOptions(options);
   
    options.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(1));
    Ping ping = new Ping ();
    ping.setText("ping1");
    stub.Ping(ping);
   
    options.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(3));
    ping = new Ping ();
    ping.setText("ping2");
    stub.Ping(ping);
   
    boolean complete = false;
    while (!complete) {
      SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(stubServiceClient);
View Full Code Here

Examples of org.tempuri.Ping

   
    String acksToAddress = stubServiceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
   
    setUpOptions(stubServiceClient.getOptions(),acksToAddress);
   
    Ping ping = new Ping ();
    ping.setText("ping1");
    stub.Ping(ping);
   
    ping = new Ping ();
    ping.setText("ping2");
    stub.Ping(ping);
   
    ping = new Ping ();
    ping.setText("ping3");
    stub.Ping(ping);
   
    SequenceReport sequenceReport = null;   
    boolean complete = false;
    while (!complete) {
View Full Code Here

Examples of org.tempuri.Ping

   
    RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, targetEndpoint);
    ServiceClient stubServiceClient = stub._getServiceClient();
    setUpOptions(stubServiceClient.getOptions());
   
    Ping ping = new Ping ();
    ping.setText("ping1");
    stub.Ping (ping);
   
    ping = new Ping ();
    ping.setText("ping2");
    stub.Ping (ping);
   
    ping = new Ping ();
    ping.setText("ping3");
    stub.Ping (ping);
   
   
    SequenceReport sequenceReport = null;   
    boolean complete = false;
View Full Code Here

Examples of org.tempuri.Ping

        setUpOptions(serviceClient.getOptions());
       
        //engage Rampart
        serviceClient.engageModule(new QName("rampart"));
       
    Ping ping = new Ping ();
    ping.setText("ping1");
    stub.Ping (ping);
   
    ping = new Ping ();
    ping.setText("ping2");
    stub.Ping (ping);
   
    ping = new Ping ();
    ping.setText("ping3");
    stub.Ping (ping);
       
        terminateSequence(serviceClient);
        Thread.sleep(5000);
       
View Full Code Here

Examples of org.tempuri.Ping

   
    RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, targetEndpoint);
    ServiceClient stubServiceClient = stub._getServiceClient();
    setUpOptions(stubServiceClient.getOptions());
   
    Ping ping = new Ping ();
    ping.setText("ping1");
    stub.ping (ping);
   
    ping = new Ping ();
    ping.setText("ping2");
    stub.ping (ping);
   
    ping = new Ping ();
    ping.setText("ping3");
    stub.ping (ping);
   
   
    SequenceReport sequenceReport = null;   
    boolean complete = false;
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.