Examples of AsynchronousTask


Examples of org.jboss.aspects.asynchronous.AsynchronousTask

  public JUnitTestAsynchronousAspects(String arg0) {
    super(arg0);
    BusinessModel bm1 = new BusinessModel();

    bm1.processBusinessModel();
    AsynchronousTask aT = ((AsynchronousFacade)bm1).getAsynchronousTask();
    ThreadManagerResponse response = aT.getResponse();

  }
View Full Code Here

Examples of org.jboss.aspects.asynchronous.AsynchronousTask

  }
  public static void test2AsynchronousCallOnSameInstance() {
    BusinessModel bm1 = new BusinessModel();
    long res1 = bm1.processBusinessModel2(15);
    AsynchronousFacade asynchronousFacade = (AsynchronousFacade)bm1;
    AsynchronousTask asynchronousTask1 =
      asynchronousFacade.getAsynchronousTask();
    long res2 = bm1.processBusinessModel2(10);
    AsynchronousTask asynchronousTask2 =
      asynchronousFacade.getAsynchronousTask();
    assertEquals(
      "Method is not succesfull !",
      OK,
      asynchronousFacade.getResponseCode(asynchronousTask1));
View Full Code Here

Examples of org.jboss.aspects.asynchronous.AsynchronousTask

  public static void test2AsynchronousCallOnSameInstance2() {
    BusinessModel bm1 = new BusinessModel();
    AsynchronousFacade asynchronousFacade = (AsynchronousFacade)bm1;
    asynchronousFacade.setTimeout(50);
    long res1 = bm1.processBusinessModel2(1000);
    AsynchronousTask asynchronousTask1 =
      asynchronousFacade.getAsynchronousTask();
    asynchronousFacade.setTimeout(200);
    long res2 = bm1.processBusinessModel2(10);
    AsynchronousTask asynchronousTask2 =
      asynchronousFacade.getAsynchronousTask();
    assertEquals(
      "Method did not timeout !",
      TIMEOUT,
      asynchronousFacade.getResponseCode(asynchronousTask1));
View Full Code Here

Examples of org.jboss.aspects.asynchronous.AsynchronousTask

      object instanceof AsynchronousFacade);
    assertTrue(
      "static method not an asynchronous call:" + (t1 - t0) + " ms.",
      (t1 - t0) < 100);
    AsynchronousFacade asynchronousFacade = (AsynchronousFacade)object;
    AsynchronousTask asynchronousTask1 =
      asynchronousFacade.getAsynchronousTask();
    assertEquals(
      "Method does not return the right value !",
      200,
      ((Long)asynchronousFacade.getReturnValue(asynchronousTask1))
View Full Code Here

Examples of org.jboss.aspects.asynchronous.AsynchronousTask

    assertEquals(
      "Method did not timeout !",
      TIMEOUT,
      asynchronousFacade1.getResponseCode());
    AsynchronousFacade asynchronousFacade = (AsynchronousFacade)object2;
    AsynchronousTask asynchronousTask2 =
      asynchronousFacade.getAsynchronousTask();
    assertEquals(
      "Method does not return the right value !",
      150,
      ((Long)asynchronousFacade.getReturnValue(asynchronousTask2))
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.