commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@apache.org>
Subject Re: [Javaflow] Access to the resumed target of a Continuation
Date Wed, 02 Sep 2009 00:13:15 GMT
> What is the recommended way to access the Runnable 'target' from a Continuation after
calling 'Continuation.continueWith(....)' ? Suppose that Continuation was loaded from a file,
so I don't have the reference to the original 'target' Object.

Your Runnable then needs to be Serializable and should get serialized
to disk with the continuation.
(see Stack.java)

> Under these conditions, do we have to resort to a 'pContext' object, which would then
be set by the resumed Runnable 'target' itself?
>
> Do you anticipate any problem with the above approach? Is there a better way to get a
reference to the resumed Runnable?

Have a look at this TestCase.

http://svn.apache.org/viewvc/commons/sandbox/javaflow/trunk/src/test/java/org/apache/commons/javaflow/suite/SerializationTestCase.java?revision=733503

Nothing you should have to worry about.

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message