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 com.intergral.fusiondebug.server; 020 021import lucee.loader.engine.CFMLEngineFactory; 022 023 024/** 025 * 026 */ 027public class FDControllerFactory { 028 029 public static long complete = 0; 030 031 // make sure FD see this class 032 static { 033 try{ 034 Class.forName( "com.intergral.fusiondebug.server.FDSignalException" ); 035 } 036 catch(Throwable t){ 037 if(t instanceof ThreadDeath) throw (ThreadDeath)t; 038 t.printStackTrace(); 039 } 040 } 041 042 043 /** 044 * Constructor of the class 045 * should never be invoked but still public to be shure that we do not run into problems 046 */ 047 public FDControllerFactory(){} 048 049 public static void notifyPageComplete() { 050 complete++; 051 } 052 053 /** 054 * returns a singelton instance of the class 055 * @return singelton instance 056 */ 057 public static Object getInstance(){ 058 return CFMLEngineFactory.getInstance().getFDController(); 059 } 060 061 /** 062 * makes the class visible for the FD Client 063 */ 064 public static void makeVisible() { 065 // this method does nothing, only make this class visible for the FD Client 066 } 067 068 069 070 071}