01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: ContinuableRunnerTest.java 3844 2007-07-02 09:40:26Z gbevin $
07: */
08: package com.uwyn.rife.continuations;
09:
10: import com.uwyn.rife.continuations.basic.BasicContinuableClassLoader;
11: import com.uwyn.rife.continuations.basic.BasicContinuableRunner;
12:
13: public class ContinuableRunnerTest extends BasicContinuableRunner {
14: private static final ContinuationConfigInstrument CONFIG_INSTRUMENT = new ContinuationConfigInstrumentTests();
15:
16: private static final ContinuableSupport CONTINUABLE_SUPPORT_DUMMY = new ContinuableSupport();
17:
18: public ContinuableRunnerTest() throws ClassNotFoundException {
19: super (CONFIG_INSTRUMENT, new BasicContinuableClassLoader(
20: CONFIG_INSTRUMENT));
21: Class.forName(ContinuableSupport.class.getName());
22: }
23:
24: public void beforeExecuteEntryMethodHook(ContinuableObject object) {
25: if (object instanceof ContinuableSupportAware) {
26: ((ContinuableSupportAware) object)
27: .setContinuableSupport(CONTINUABLE_SUPPORT_DUMMY);
28: }
29: }
30: }
|