List of usage examples for org.apache.commons.javaflow Continuation startWith
public static Continuation startWith(final Runnable pTarget)
From source file:com.topekalabs.bigmachine.lib.app.ContinuationSerializationTest.java
@Ignore @Test/*from ww w.ja va2s . com*/ public void networkSerializationTest() throws Exception { Socket outputSocket = null; ServerSocket inputSocket = null; outputSocket = new Socket("localhost", TEST_SOCKET); inputSocket = new ServerSocket(TEST_SOCKET); Continuation c = Continuation.startWith(new SimpleContinuationRunnable()); Kryo kryo = new Kryo(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); Output output = new Output(bos); kryo.writeObject(output, c); }
From source file:org.shelloid.netverif.TestRunnable2.java
public void run() { TestRunnable test = new TestRunnable(); Continuation c = Continuation.startWith(test); System.out.println("returned a continuation"); c = Continuation.continueWith(c);//from www. j a v a 2 s . c o m System.out.println("returned a continuation: " + c); }