Package org.jboss.remoting.invocation

Examples of org.jboss.remoting.invocation.NameBasedInvocation


   public Object invoke(InvocationRequest invocation) throws Throwable
   {
      Object request = invocation.getParameter();

      // Am expecting a NameBasedInvocation as the parameter
      NameBasedInvocation nbInvocation = (NameBasedInvocation) request;

      String methodName = nbInvocation.getMethodName();
      Object[] params = nbInvocation.getParameters();
      String[] sig = nbInvocation.getSignature();
      Class[] classSig = new Class[sig.length];
      for(int x = 0; x < sig.length; x++)
      {
         classSig[x] = Class.forName(sig[x]);
      }
View Full Code Here


   // Public ---------------------------------------------------------------------------------------

   public void testSimplePing() throws Throwable
   {
      log.debug("test simple ping");
      Object ret = client.invoke(new NameBasedInvocation("ping",
                                                         new Object[] {"hello"},
                                                         new String[] {"java.lang.String"}));
      assertEquals("pong.hello", ret);
   }
View Full Code Here

   {
   }

   public Object invoke(InvocationRequest invocation) throws Throwable
   {
      NameBasedInvocation nbi = (NameBasedInvocation)invocation.getParameter();

      String methodName = nbi.getMethodName();

      if ("ping".equals(methodName))
      {
         return "pong." + nbi.getParameters()[0];
      }

      return null;
   }
View Full Code Here

         Client client = new Client(locator, "mock");
         client.connect();

         log.debug("client.getInvoker().getLocator()" + client.getInvoker().getLocator());

         Object ret = client.invoke(new NameBasedInvocation("foo",
                                                            new Object[]{"bar"},
                                                            new String[]{String.class.getName()}),
                                    null);
      }
      catch(CannotConnectException cce)
View Full Code Here

         log.debug("client.getInvoker().getLocator()" + client.getInvoker().getLocator());

         try
         {
            Object ret = client.invoke(new NameBasedInvocation("throwServerException",
                                                               new Object[]{"nonserialized"},
                                                               new String[]{String.class.getName()}),
                                       null);
         }
         catch(NonSerializeTestException nonEx)
         {
            log.debug("Expected to get NonSerializable exception and got it.", nonEx);
            assertTrue(true);
         }
         try
         {
            Object ret = client.invoke(new NameBasedInvocation("throwServerException",
                                                               new Object[]{"serialized"},
                                                               new String[]{String.class.getName()}),
                                       null);
         }
         catch(SerializedTestException ex)
View Full Code Here

         Client client = new Client(locator, "mock");
         client.connect();

         log.debug("client.getInvoker().getLocator()" + client.getInvoker().getLocator());

         Object ret = client.invoke(new NameBasedInvocation("foo",
                                                            new Object[]{"bar"},
                                                            new String[]{String.class.getName()}),
                                    null);
      }
      catch(CannotConnectException cce)
View Full Code Here

         Client client = new Client(locator, "mock");
         client.connect();

         log.debug("client.getInvoker().getLocator()" + client.getInvoker().getLocator());

         Object ret = client.invoke(new NameBasedInvocation("foo",
                                                            new Object[]{"bar"},
                                                            new String[]{String.class.getName()}),
                                    null);
      }
      catch(CannotConnectException cce)
View Full Code Here

      return port;
   }

   private Object makeInvocation(String method, String param) throws Throwable
   {
      Object ret = client.invoke(new NameBasedInvocation(method,
                                                         new Object[]{param},
                                                         new String[]{String.class.getName()}),
                                 null);

      return ret;
View Full Code Here

      return transport;
   }

   private Object makeInvocation(String method, String param) throws Throwable
   {
      Object ret = client.invoke(new NameBasedInvocation(method,
                                                         new Object[]{param},
                                                         new String[]{String.class.getName()}),
                                 null);

      return ret;
View Full Code Here

      return transport;
   }

   private Object makeInvocation(String method, String param) throws Throwable
   {
      Object ret = client.invoke(new NameBasedInvocation(method,
                                                         new Object[]{param},
                                                         new String[]{String.class.getName()}),
                                 null);

      return ret;
View Full Code Here

TOP

Related Classes of org.jboss.remoting.invocation.NameBasedInvocation

Copyright © 2018 www.massapicom. 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.