Package org.jboss.remoting

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


      {
         callbackHandlers[i] = new SimpleCallbackHandler();
         client.addListener(callbackHandlers[i], new HashMap());
      }

      client.invoke(CALLBACK_TEST);
      for (int i = 0; i < CALLBACK_HANDLER_COUNT; i++)
      {
         assertEquals(1, callbackHandlers[i].callbackCounter);
      }
     
View Full Code Here


      {
         callbackHandlers[i] = new SimpleCallbackHandler();
         client.addListener(callbackHandlers[i], new HashMap());
      }

      client.invoke(CALLBACK_TEST);
      for (int i = 0; i < CALLBACK_HANDLER_COUNT; i++)
      {
         assertEquals(1, callbackHandlers[i].callbackCounter);
      }
     
View Full Code Here

      HashMap clientConfig = new HashMap();
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      Client client = new Client(locator, clientConfig);
      client.connect();
     
      Object response = client.invoke(FAST);
      assertEquals(FAST, response);
     
      long start = System.currentTimeMillis();
     
      // This invocation should run in pooled thread 1.
View Full Code Here

     
      TestClassLoader tcl = new TestClassLoader();
      setContextClassLoader(tcl);
     
      // Test connection.
      client.invoke("abc");
      log.info("connection is good");
     
      // Verify that TestClassLoader has been queried.
      assertTrue(tcl.visited);
      log.info("context classloader has been queried");
View Full Code Here

         int mainPort = QuickDisconnectServerParent.port;
         String locatorURI = getTransport() + "://" + host + ":" + mainPort;
         InvokerLocator locator = new InvokerLocator(locatorURI);
         client = new Client(locator);
         client.connect();
         Object response = client.invoke(QuickDisconnectServerParent.START_SERVER);
         port = ((Integer) response).intValue();
         Thread.sleep(1000);
         log.info("leaving setUp() for " + getName());
      }
      catch (Throwable e)
View Full Code Here

      catch (Exception e)
      {
         e.printStackTrace();
      }
      log.info("making first invocation");
      Object response = client.invoke("test");
      assertEquals("test", response);
      log.info("first invocation succeeds");
     
     
      new Thread()
View Full Code Here

               // This invocation may use up a listening connection,
               // depending on transport.
                  HashMap metadata = new HashMap();
                  metadata.put("timeout", shortTimeoutString());
                  log.info("making invocation");
                  client.invoke("test", metadata);
                  log.info("made invocation");
               }
               catch (Exception e)
               {
                  log.info("client.invoke(\"test\") failed (that's OK)");
View Full Code Here

      Client client = new Client(clientLocator, clientConfig);
      client.connect();
      log.info("client is connected");
     
      // Test connections.
      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      // Configure callbacks.
      TestCallbackHandler callbackHandler = new TestCallbackHandler();
      client.addListener(callbackHandler, new HashMap());
View Full Code Here

      catch (Exception e)
      {
         e.printStackTrace();
      }
      log.info("making first invocation");
      Object response = client.invoke("test");
      assertEquals("test", response);
      log.info("first invocation succeeds");
     
     
      new Thread()
View Full Code Here

               // This invocation may use up a listening connection,
               // depending on transport.
                  HashMap metadata = new HashMap();
                  metadata.put("timeout", shortTimeoutString());
                  log.info("making invocation");
                  client.invoke("test", metadata);
                  log.info("made invocation");
               }
               catch (Exception e)
               {
                  log.info("client.invoke(\"test\") failed (that's OK)");
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.