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: CallTargetRetriever.java 3812 2007-06-25 17:04:34Z gbevin $
07: */
08: package com.uwyn.rife.continuations.basic;
09:
10: import com.uwyn.rife.continuations.CallState;
11: import com.uwyn.rife.continuations.ContinuableObject;
12:
13: /**
14: * Retrieves the target continuable for a call continuation.
15: * <p>This is used by the call/answer implementation in the
16: * {@link BasicContinuableRunner}, but if you use a similar approach in case
17: * you need to implement your own runner, then you can benefit from this
18: * interface too.
19: *
20: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
21: * @version $Revision: 3812 $
22: * @since 1.6
23: */
24: public interface CallTargetRetriever {
25: /**
26: * Retrieves the continuable for a particular call continuation target and
27: * state.
28: *
29: * @param target the call continuation target that was provided as an
30: * argument to the method call (see {@link com.uwyn.rife.continuations.ContinuationConfigInstrument#getCallMethodArgumentTypes()})
31: * @param state the state of the call continuation
32: * @return the continuable that corresponds to the provided call target
33: * and state
34: * @since 1.6
35: */
36: public ContinuableObject getCallTarget(Object target,
37: CallState state);
38: }
|