001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.runtime;
020
021import javax.servlet.http.HttpServlet;
022import javax.servlet.http.HttpServletRequest;
023import javax.servlet.http.HttpServletResponse;
024import javax.servlet.jsp.JspFactory;
025
026import lucee.runtime.config.ConfigWeb;
027import lucee.runtime.query.QueryCache;
028
029/**
030 * implements a JSP Factory, this class procduce JSP Compatible PageContext Object
031 * this object holds also the must interfaces to coldfusion specified functionlity
032 */
033public abstract class CFMLFactory extends JspFactory {
034        
035    /**
036     * reset the PageContexes
037     */
038    public abstract void resetPageContext();
039    
040        
041        /**
042         * similar to getPageContext Method but return the concret implementation of the lucee PageCOntext
043         * and take the HTTP Version of the Servlet Objects
044         * @param servlet
045         * @param req
046         * @param rsp
047         * @param errorPageURL
048         * @param needsSession
049         * @param bufferSize
050         * @param autoflush
051         * @return return the page<context
052         */
053        public abstract PageContext getLuceePageContext(
054        HttpServlet servlet,
055        HttpServletRequest req,
056        HttpServletResponse rsp,
057        String errorPageURL,
058                boolean needsSession,
059                int bufferSize,
060                boolean autoflush);
061
062        /**
063         * Similar to the releasePageContext Method, but take lucee PageContext as entry
064         * @param pc
065         */
066        public abstract void releaseLuceePageContext(PageContext pc);
067    
068    /**
069         * check timeout of all running threads, downgrade also priority from all thread run longer than 10 seconds
070         */
071        public abstract void checkTimeout();
072        
073        /**
074         * @return returns the query cache
075         */
076        public abstract QueryCache getDefaultQueryCache();
077
078        /**
079         * @return returns count of pagecontext in use
080         */
081        public abstract int getUsedPageContextLength();
082        
083    /**
084     * @return Returns the config.
085     */
086    public abstract ConfigWeb getConfig();
087
088    /**
089     * @return label of the factory
090     */
091    public abstract Object getLabel();
092
093    /**
094     * @deprecated no replacement
095     * @param label
096     */
097    public abstract void setLabel(String label);
098
099        /**
100         * @return the servlet
101         */
102        public abstract HttpServlet getServlet();
103
104
105}