Package juzu.impl.request

Examples of juzu.impl.request.ContextLifeCycle


    AbstractRunnableAsyncTestCase.requestURL = "" + A_.index();
    AbstractRunnableAsyncTestCase.requestDestroyed = AbstractRunnableAsyncTestCase.destroyed.get();
    final ChunkBuffer content = new ChunkBuffer();
    Runnable task = new Runnable() {
      public void run() {
        ContextLifeCycle lf = request.suspend();
        try {
          Thread.sleep(500);
          AbstractRunnableAsyncTestCase.runnableURL = "" + A_.index();
          AbstractRunnableAsyncTestCase.runnableDestroyed = AbstractRunnableAsyncTestCase.destroyed.get();
          AbstractRunnableAsyncTestCase.runnableActive = controller.isActive();
          content.append(Chunk.create("pass"));
        }
        catch (Exception e) {
          e.printStackTrace();
        } finally {
          lf.resume();
          content.close();
        }
      }
    };
    context.getExecutor().execute(task);
View Full Code Here


        AbstractRunnableSyncTestCase.runnableURL = "" + A_.index();
        AbstractRunnableSyncTestCase.runnableObject = our.get();
        AbstractRunnableSyncTestCase.runnableActive = controller.isActive();
      }
    };
    ContextLifeCycle clf = request.suspend();
    try {
      task.run();
    }
    finally {
      clf.resume();
    }
    return Response.ok("pass");
  }
View Full Code Here

TOP

Related Classes of juzu.impl.request.ContextLifeCycle

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.