Package org.jboss.remoting

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


      catch (Exception e)
      {
         e.printStackTrace();
      }
      log.info("making first invocation");
      Object response = client.invoke("test");
      assertEquals("test", response);
      log.info("first invocation succeeds");
      final InvokerCallbackHandler callbackHandler = new TestCallbackHandler();
      client.addListener(callbackHandler, new HashMap(), null, true);
     
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

      catch (Exception e)
      {
         e.printStackTrace();
      }
      log.info("making first invocation");
      Object response = client.invoke("test");
      assertEquals("test", response);
     
      final InvokerCallbackHandler callbackHandler = new TestCallbackHandler();
      client.addListener(callbackHandler, new HashMap(), null, true);
     
View Full Code Here

         remotingClient.connect();

         Map metadata = new HashMap();
         metadata.put(Client.RAW, Boolean.TRUE);
        
         Object response = remotingClient.invoke("Do something", metadata);
         System.out.println("Second response should be " + WebInvocationHandler.HTML_PAGE_RESPONSE + " and was: " + response);
         assertEquals(WebInvocationHandler.HTML_PAGE_RESPONSE, response);
      }
      catch (Throwable throwable)
      {
View Full Code Here

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

      }
     
      // Make invocation in main thread with context classloader testClassLoader2.
      testClassLoader2.setClassLoader(mainContextClassLoader);
      Thread.currentThread().setContextClassLoader(testClassLoader2);
      log.info("main thread result: " + client.invoke("2"));
      assertTrue(testClassLoader1.counter > 0);
      assertTrue(testClassLoader2.counter == 0);
     
      client.disconnect();
      shutdownServer();
View Full Code Here

         System.out.println("Calling remoting server with locator uri of: " + getLocatorURI());

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

         Object response = remotingClient.invoke("Do something");
         System.out.println("Second response should be " + WebInvocationHandler.HTML_PAGE_RESPONSE + " and was: " + response);
         assertEquals(WebInvocationHandler.HTML_PAGE_RESPONSE, response);
      }
      catch (Throwable throwable)
      {
View Full Code Here

      }
     
      // Make invocation in main thread with context classloader testClassLoader2.
      testClassLoader2.setClassLoader(mainContextClassLoader);
      Thread.currentThread().setContextClassLoader(testClassLoader2);
      log.info("main thread result: " + client.invoke("2"));
      assertTrue(testClassLoader1.counter > 0);
      assertTrue(testClassLoader2.counter == 0);
     
      client.disconnect();
      shutdownServer();
View Full Code Here

      }
     
      // Make invocation in main thread with context classloader testClassLoader2.
      testClassLoader2.setClassLoader(mainContextClassLoader);
      Thread.currentThread().setContextClassLoader(testClassLoader2);
      log.info("main thread result: " + client.invoke("2"));
      assertTrue(testClassLoader1.counter > 0);
      assertTrue(testClassLoader2.counter > 0);
     
      client.disconnect();
      shutdownServer();
View Full Code Here

      Client client = new Client(serverLocator, clientConfig);
      client.connect();
      log.info("client is connected");
     
      // Test connection.
      assertEquals("abc", client.invoke("abc"));
     
      // Add connection listener.
      ConnectionListener listener = new TestConnectionListener();
      client.addConnectionListener(listener);
     
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.