Package net.paoding.rose.web.portal

Examples of net.paoding.rose.web.portal.Pipe


    public Object after(Invocation inv, Object instruction) {

        // codes for fix this exception: "Cannot forward after response has been committed"
        // @see RoseFilter#supportsRosepipe
        // @see PortalImpl#addWindow
        Pipe pipe = PortalUtils.getPipe(inv);
        if (pipe != null && pipe.getInvocation() == inv) {
            boolean debugEnabled = logger.isDebugEnabled();
            if (debugEnabled) {
                logger.debug(pipe + " is going to wait pipe windows' ins.");
            }
            final long begin = System.currentTimeMillis();
            final long deadline;
            if (pipe.getTimeout() > 0) {
                deadline = begin + pipe.getTimeout();
            } else {
                deadline = -1;
            }

            try {
                for (Window window : pipe.getWindows()) {
                    if (window.get(RoseConstants.PIPE_WINDOW_IN) != Boolean.TRUE) {
                        synchronized (window) {
                            while (window.get(RoseConstants.PIPE_WINDOW_IN) != Boolean.TRUE) {
                                long now = System.currentTimeMillis();
                                if (deadline <= 0) {
View Full Code Here

TOP

Related Classes of net.paoding.rose.web.portal.Pipe

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.