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: EngineContinuationConfigRuntime.java 3819 2007-06-28 13:13:23Z gbevin $
07: */
08: package com.uwyn.rife.engine;
09:
10: import com.uwyn.rife.config.RifeConfig;
11: import com.uwyn.rife.continuations.ContinuationConfigRuntime;
12: import com.uwyn.rife.continuations.ContinuationManager;
13:
14: public class EngineContinuationConfigRuntime extends
15: ContinuationConfigRuntime<ElementSupport> {
16: EngineContinuationConfigRuntime() {
17: // just make sure that the default constructor can only be called
18: // by the EngineContinuationConfigSingleton class
19: }
20:
21: public ElementSupport getAssociatedContinuableObject(
22: Object executingInstance) {
23: return ElementContext.getActiveElementSupport();
24: }
25:
26: public ContinuationManager getContinuationManager(
27: ElementSupport executingContinuable) {
28: return ((ElementSupport) executingContinuable).getSite()
29: .getContinuationManager();
30: }
31:
32: public boolean cloneContinuations(
33: ElementSupport executingContinuable) {
34: return executingContinuable.cloneContinuations();
35: }
36:
37: public long getContinuationDuration() {
38: return RifeConfig.Engine.getContinuationDuration();
39: }
40:
41: public int getContinuationPurgeFrequency() {
42: return RifeConfig.Engine.getContinuationPurgeFrequency();
43: }
44:
45: public int getContinuationPurgeScale() {
46: return RifeConfig.Engine.getContinuationPurgeScale();
47: }
48: }
|