Examples of invokeOneway()


Examples of org.jboss.remoting.Client.invokeOneway()

      assertTrue((System.currentTimeMillis() - start < 1000));
     
      // Could execute in a thread pool thread, go on the queue, or execute
      // in the main thread.
      log.info("making 4th oneway invocation");
      client.invokeOneway(SLOW + "4", null, true);
      log.info("made 4th oneway invocation");
      log.info("wait: " + (System.currentTimeMillis() - start));
      assertTrue((System.currentTimeMillis() - start < 1000));
     
      // In the worst case, the four invocations could take as much as 15 seconds

Examples of org.jboss.remoting.Client.invokeOneway()

     
      long start = System.currentTimeMillis();
     
      // This invocation should run in pooled thread 1.
      log.info("making 1st oneway invocation");
      client.invokeOneway(SLOW + "1", null, false);
      poolCounter++;
     
      // Wait for connection to return to pool.
      Thread.sleep(500);
     

Examples of org.jboss.remoting.Client.invokeOneway()

      // Wait for connection to return to pool.
      Thread.sleep(500);
     
      // This invocation should run in pooled thread 2.
      log.info("making 2nd oneway invocation");
      client.invokeOneway(SLOW + "2", null, false);
     
      // Wait for connection to return to pool.
      Thread.sleep(500);
     
      // This invocation should use the pooled connection and go into the queue.

Examples of org.jboss.remoting.Client.invokeOneway()

      // Wait for connection to return to pool.
      Thread.sleep(500);
     
      // This invocation should use the pooled connection and go into the queue.
      log.info("making 3rd oneway invocation");
      client.invokeOneway(SLOW + "3", null, false);
      assertTrue((System.currentTimeMillis() - start < 2000));
      Thread.sleep(2000);
      log.info("handler.count: " + handler.startedCount);
      assertEquals(3, handler.startedCount);
     

Examples of org.jboss.remoting.Client.invokeOneway()

      int i = 0;
      try
      {
         for (; i < MAX_POOL_SIZE + 10; i++)
         {
            client.invokeOneway(new Integer(i), null, false);
            log.debug("invocation: " + i);
         }
      }
      catch (Throwable t)
      {

Examples of org.jboss.remoting.Client.invokeOneway()

      int i = 0;
      try
      {
         for (; i < MAX_POOL_SIZE + 10; i++)
         {
            client.invokeOneway(new Integer(i), null, true);
            log.debug("invocation: " + i);
         }
      }
      catch (Throwable t)
      {

Examples of org.jboss.remoting.Client.invokeOneway()

      Map metadata = new HashMap();
      metadata.put("TYPE", "POST");
      metadata.put("http.basic.username", username);
      metadata.put("http.basic.password", password);
      remotingClient.invokeOneway( "Message payload example(just a String) ", metadata );

      System.out.println("Sent http post to server.");
      Integer responseCode = (Integer) metadata.get(HTTPMetadataConstants.RESPONSE_CODE);
      String responseMessage = (String) metadata.get(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE);
      System.out.println("Response code from server: " + responseCode);

Examples of org.jboss.remoting.Client.invokeOneway()

      Client remotingClient = new Client(locator);
      remotingClient.connect();

      Map metadata = new HashMap();
      metadata.put("TYPE", "POST");
      remotingClient.invokeOneway(payload, metadata );

      System.out.println("Sent http post to server.");
      Integer responseCode = (Integer) metadata.get(HTTPMetadataConstants.RESPONSE_CODE);
      String responseMessage = (String) metadata.get(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE);
      System.out.println("Response code from server: " + responseCode);

Examples of org.jboss.remoting.Client.invokeOneway()

         checkUserAgent(remotingClient, metadata);

         makeExceptionInvocation(remotingClient, metadata);

         remotingClient.invokeOneway("Do something", metadata, true);

         remotingClient.invokeOneway("Do something", metadata, false);
      }
      catch (Throwable throwable)
      {

Examples of org.jboss.remoting.Client.invokeOneway()

         makeExceptionInvocation(remotingClient, metadata);

         remotingClient.invokeOneway("Do something", metadata, true);

         remotingClient.invokeOneway("Do something", metadata, false);
      }
      catch (Throwable throwable)
      {
         throw new Exception(throwable);
      }
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.