Package org.jboss.aspects.asynch

Examples of org.jboss.aspects.asynch.AsynchProvider


      return echo;
   }

   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


   public void testCollocated() throws Exception
   {

      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

   {
      try
      {
         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)
      {
View Full Code Here

      return proxy.getAsynchronousProxy();
   }

   public static Future getFutureResult(Object asynchProxy)
   {
      AsynchProvider provider = (AsynchProvider)asynchProxy;
      return provider.getFuture();
   }
View Full Code Here

      return echo;
   }

   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

   public void testCollocated() throws Exception
   {

      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

   {
      try
      {
         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)
      {
View Full Code Here

      return proxy.getAsynchronousProxy();
   }

   public static Future getFutureResult(Object asynchProxy)
   {
      AsynchProvider provider = (AsynchProvider)asynchProxy;
      return provider.getFuture();
   }
View Full Code Here

/* 39 */     return proxy.getAsynchronousProxy();
/*    */   }
/*    */
/*    */   public static Future getFutureResult(Object asynchProxy)
/*    */   {
/* 44 */     AsynchProvider provider = (AsynchProvider)asynchProxy;
/* 45 */     return provider.getFuture();
/*    */   }
View Full Code Here

TOP

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

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.