Package org.apache.cocoon.components.flow

Examples of org.apache.cocoon.components.flow.ContinuationsManager


    }

    public void jsFunction_diplayAllContinuations()
        throws ComponentException
    {
        ContinuationsManager continuationsMgr
            = (ContinuationsManager)manager.lookup(ContinuationsManager.ROLE);

        try {
            continuationsMgr.displayAllContinuations();
        } finally {
            manager.release((Component)continuationsMgr);
        }
    }
View Full Code Here


    throws Exception
  {
    JSCocoon cocoon = (JSCocoon)args[0];
    ComponentManager manager = cocoon.getComponentManager();

    ContinuationsManager contMgr
      = (ContinuationsManager)manager.lookup(ContinuationsManager.ROLE);

    Object kont = args[1];
    JSWebContinuation pjswk = (JSWebContinuation)args[2];
    WebContinuation pwk = (pjswk == null ? null : pjswk.wk);

    int ttl;

    if (args[3] == Undefined.instance)
      ttl = 0;
    else {
      Number timeToLive = (Number)args[3];
      ttl = (timeToLive == null ? 0 : timeToLive.intValue());
    }

    JSWebContinuation jswk = new JSWebContinuation();
    WebContinuation wk
      = contMgr.createWebContinuation(kont, pwk, ttl);
    wk.setUserObject(jswk);

    jswk.cocoon = cocoon;
    jswk.wk = wk;
    jswk.continuationsMgr = contMgr;
View Full Code Here

    // FIXME: why doesn't this work???
//     ComponentManager contMgr
//       = ((ComponentManager)manager).lookup(ContinuationsManager.ROLE);
    ComponentManager manager = cocoon.getComponentManager();

    ContinuationsManager contMgr = cocoon.getContinuationsManager();
    Object kont = args[1];
    Object pwk = args[2];

    JSWebContinuation jswk = new JSWebContinuation();
    WebContinuation wk
      = contMgr.createWebContinuation(kont, (WebContinuation)pwk);
    wk.setUserObject(jswk);

    jswk.cocoon = cocoon;
    jswk.wk = wk;
    jswk.continuationsMgr = contMgr;
View Full Code Here

    private FOM_WebContinuation forwardTo(String uri, Object bizData,
                                          Continuation continuation)
        throws Exception {
        WebContinuation wk = null;
        if (continuation != null) {
            ContinuationsManager contMgr = (ContinuationsManager)
                componentManager.lookup(ContinuationsManager.ROLE);
            wk = lastContinuation =
                contMgr.createWebContinuation(continuation,
                                              lastContinuation,
                                              0);
        }
       
        String redUri = uri;
View Full Code Here

                                                   FOM_WebContinuation parent,
                                                   int timeToLive)
        throws Exception {
        if (k == null) return null;
        WebContinuation wk;
        ContinuationsManager contMgr;
        contMgr = (ContinuationsManager)
            componentManager.lookup(ContinuationsManager.ROLE);
        wk = contMgr.createWebContinuation(unwrap(k),
                                           (WebContinuation)(parent == null ? null : parent.getWebContinuation()),
                                           timeToLive);
        FOM_WebContinuation result = new FOM_WebContinuation(wk);
        result.setParentScope(getParentScope());
        result.setPrototype(getClassPrototype(getParentScope(),
View Full Code Here

        }
        WebContinuation wk;
        Scriptable scope = getTopLevelScope(c);
        FOM_Cocoon cocoon = (FOM_Cocoon)getProperty(scope, "cocoon");
        ServiceManager componentManager =  cocoon.getServiceManager();
        ContinuationsManager contMgr = (ContinuationsManager)
            componentManager.lookup(ContinuationsManager.ROLE);
        wk = contMgr.createWebContinuation(c,
                                           (parent == null ? null : parent.getWebContinuation()),
                                           timeToLive,
                                           cocoon.getInterpreterId(),
                                           null);
        result = new FOM_WebContinuation(wk);
View Full Code Here

        }
        return arr;
    }

    public void jsFunction_invalidate() throws Exception {
        ContinuationsManager contMgr = null;
        FOM_Cocoon cocoon =
            (FOM_Cocoon)getProperty(getTopLevelScope(this), "cocoon");
        ServiceManager componentManager = cocoon.getServiceManager();
        contMgr = (ContinuationsManager)
            componentManager.lookup(ContinuationsManager.ROLE);
        contMgr.invalidateWebContinuation(wk);
    }
View Full Code Here

        throws Exception {
        if (k == null) {
            return null;
        }
        WebContinuation wk;
        ContinuationsManager contMgr;
        contMgr = (ContinuationsManager)
            getServiceManager().lookup(ContinuationsManager.ROLE);
        wk = contMgr.createWebContinuation(unwrap(k),
                                           (parent == null ? null : parent.getWebContinuation()),
                                           timeToLive,
                                           null);
        FOM_WebContinuation result = new FOM_WebContinuation(wk);
        result.setParentScope(getParentScope());
View Full Code Here

        }
        WebContinuation wk;
        Scriptable scope = getTopLevelScope(c);
        FOM_Cocoon cocoon = (FOM_Cocoon)getProperty(scope, "cocoon");
        ServiceManager componentManager =  cocoon.getServiceManager();
        ContinuationsManager contMgr = (ContinuationsManager)
            componentManager.lookup(ContinuationsManager.ROLE);
        wk = contMgr.createWebContinuation(c,
                                           (parent == null ? null : parent.getWebContinuation()),
                                           timeToLive,
                                           null);
        result = new FOM_WebContinuation(wk);
        result.setParentScope(getTopLevelScope(scope));
View Full Code Here

        }
        return arr;
    }

    public void jsFunction_invalidate() throws Exception {
        ContinuationsManager contMgr = null;
        FOM_Cocoon cocoon =
            (FOM_Cocoon)getProperty(getTopLevelScope(this), "cocoon");
        ServiceManager componentManager = cocoon.getServiceManager();
        contMgr = (ContinuationsManager)
            componentManager.lookup(ContinuationsManager.ROLE);
        contMgr.invalidateWebContinuation(wk);
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.components.flow.ContinuationsManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.