Package org.jboss.aspects.asynch

Examples of org.jboss.aspects.asynch.Future


   public void test() throws Exception
   {
      AsynchProvider asynch = (AsynchProvider) this;
      testMethod(5);

      Future future = asynch.getFuture();
      int rtn = ((Integer) future.get()).intValue();
      if (rtn != 5) throw new RuntimeException("integer return value invalid");

      testMethod("hello");

      future = asynch.getFuture();
      String srtn = (String) future.get();
      if (!"hello".equals(srtn)) throw new RuntimeException("string return value failed");


   }
View Full Code Here


      POJO pojo = (POJO) AsynchRemoting.createRemoteProxy("pojo", POJO.class, new InvokerLocator("socket://localhost:5150"));

      AsynchProvider asynch = (AsynchProvider) pojo;
      pojo.testMethod(5);

      Future future = asynch.getFuture();
      int rtn = ((Integer) future.get()).intValue();
      if (rtn != 5) throw new RuntimeException("integer return value invalid");

      pojo.testMethod("hello");

      future = asynch.getFuture();
      String srtn = (String) future.get();
      if (!"hello".equals(srtn)) throw new RuntimeException("string return value failed");

   }
View Full Code Here

         POJO pojo = (POJO) getInitialContext().lookup("pojo");

         AsynchProvider asynch = (AsynchProvider) pojo;
         pojo.testMethod(5);

         Future future = asynch.getFuture();
         int rtn = ((Integer) future.get()).intValue();
         assertEquals(rtn, 5);

         pojo.testMethod("hello");

         future = asynch.getFuture();
         String srtn = (String) future.get();
         assertEquals("hello", srtn);
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
View Full Code Here

   public void test() throws Exception
   {
      AsynchProvider asynch = (AsynchProvider) this;
      testMethod(5);

      Future future = asynch.getFuture();
      int rtn = ((Integer) future.get()).intValue();
      if (rtn != 5) throw new RuntimeException("integer return value invalid");

      testMethod("hello");

      future = asynch.getFuture();
      String srtn = (String) future.get();
      if (!"hello".equals(srtn)) throw new RuntimeException("string return value failed");


   }
View Full Code Here

      POJO pojo = (POJO) AsynchRemoting.createRemoteProxy("pojo", POJO.class, new InvokerLocator("socket://localhost:5150"));

      AsynchProvider asynch = (AsynchProvider) pojo;
      pojo.testMethod(5);

      Future future = asynch.getFuture();
      int rtn = ((Integer) future.get()).intValue();
      if (rtn != 5) throw new RuntimeException("integer return value invalid");

      pojo.testMethod("hello");

      future = asynch.getFuture();
      String srtn = (String) future.get();
      if (!"hello".equals(srtn)) throw new RuntimeException("string return value failed");

   }
View Full Code Here

         POJO pojo = (POJO) getInitialContext().lookup("pojo");

         AsynchProvider asynch = (AsynchProvider) pojo;
         pojo.testMethod(5);

         Future future = asynch.getFuture();
         int rtn = ((Integer) future.get()).intValue();
         assertEquals(rtn, 5);

         pojo.testMethod("hello");

         future = asynch.getFuture();
         String srtn = (String) future.get();
         assertEquals("hello", srtn);
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of org.jboss.aspects.asynch.Future

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.