Examples of fireAndForget()


Examples of org.apache.avro.test.Mail.fireandforget()

  public void testConnectionsCount() throws Exception {
    Transceiver transceiver2 = new NettyTransceiver(new InetSocketAddress(
            server.getPort()), CONNECT_TIMEOUT_MILLIS);
    Mail proxy2 = SpecificRequestor.getClient(Mail.class, transceiver2);
    proxy.fireandforget(createMessage());
    proxy2.fireandforget(createMessage());
    Assert.assertEquals(2, ((NettyServer) server).getNumActiveConnections());
    transceiver2.close();
    Assert.assertEquals(1, ((NettyServer) server).getNumActiveConnections());
  }
View Full Code Here

Examples of org.apache.axis2.client.ServiceClient.fireAndForget()

                        "        <m:symbol>" + symbol + "</m:symbol>\n" +
                        "    </m:order>\n" +
                        "</m:placeOrder>");

        System.out.println("Sending Event : \n" + payload.toString());
        serviceClient.fireAndForget(payload);
        System.out.println("Event sent to topic " + topic);
        Thread.sleep(1000);
        if (configContext != null) {
            configContext.terminate();
        }
View Full Code Here

Examples of org.apache.axis2.client.ServiceClient.fireAndForget()

        InnerStruct.SYMBOL = symbol;
        InnerStruct.PRICE = price;
        InnerStruct.QUANTITY = quantity;

        if ("placeorder".equals(mode)) {
            serviceClient.fireAndForget(payload);
            Thread.sleep(5000);

        } else if ("dualquote".equals(mode)) {
            serviceClient.sendReceiveNonBlocking(payload, new StockQuoteCallback());
            printResult();
View Full Code Here

Examples of org.apache.axis2.client.ServiceClient.fireAndForget()

   
    ServiceClient serviceClient = new ServiceClient (configContext,null);
    serviceClient.setOptions(clientOptions);

    // Send a single ping message
    serviceClient.fireAndForget(getPingOMBlock("ping1"));
 
    long limit = System.currentTimeMillis() + waitTime;
    Error lastError = null;
    while(System.currentTimeMillis() < limit) {
      Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
View Full Code Here

Examples of org.apache.axis2.client.ServiceClient.fireAndForget()

    }

    if(lastError != null) throw lastError;

    // Send a second application message.
    serviceClient.fireAndForget(getPingOMBlock("ping2"));
   
    while(System.currentTimeMillis() < limit) {
      Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
     
      try {
View Full Code Here

Examples of org.apache.axis2.client.ServiceClient.fireAndForget()

    clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
    ServiceClient serviceClient = new ServiceClient (configContext,null);
    serviceClient.setOptions(clientOptions);
   
    try{
      serviceClient.fireAndForget(getPingOMBlock("ping1"));   
     
      //now deliver the next out of order
      clientOptions.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(3));
      serviceClient.fireAndForget(getPingOMBlock("ping3"));
 
View Full Code Here

Examples of org.apache.axis2.client.ServiceClient.fireAndForget()

    try{
      serviceClient.fireAndForget(getPingOMBlock("ping1"));   
     
      //now deliver the next out of order
      clientOptions.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(3));
      serviceClient.fireAndForget(getPingOMBlock("ping3"));
 
      Thread.sleep(5000);
      StorageManager mgr = SandeshaUtil.getInMemoryStorageManager(configContext);
      Transaction t = mgr.getTransaction();
      String inboundSequenceID = SandeshaUtil.getSequenceIDFromInternalSequenceID(SandeshaUtil.getInternalSequenceID(to, sequenceKey),
View Full Code Here

Examples of org.apache.axis2.client.ServiceClient.fireAndForget()

      // Update the bean
      mgr.getRMSBeanMgr().update(rmsBean);
      t.commit();
     
      clientOptions.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(2));
      serviceClient.fireAndForget(getPingOMBlock("ping2"));
    }
    finally{
      configContext.getListenerManager().stop();
      serviceClient.cleanup();     
    }
View Full Code Here

Examples of org.apache.axis2.client.ServiceClient.fireAndForget()

    clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
    ServiceClient serviceClient = new ServiceClient (configContext,null);
    serviceClient.setOptions(clientOptions);
    try
    {
      serviceClient.fireAndForget(getPingOMBlock("ping1"));   
     
      //now deliver the next out of order
      clientOptions.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(3));
      serviceClient.fireAndForget(getPingOMBlock("ping3"));
 
View Full Code Here

Examples of org.apache.axis2.client.ServiceClient.fireAndForget()

        //serviceClient.
      serviceClient.setOptions(clientOptions);
       
      try{
       
        serviceClient.fireAndForget(getPingOMBlock("ping1"));
       
        long limit = System.currentTimeMillis() + waitTime;
        Error lastError = null;
        while(System.currentTimeMillis() < limit) {
          Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
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.