001 package railo.runtime.listener; 002 003 import java.io.IOException; 004 005 import railo.runtime.CFMLFactory; 006 import railo.runtime.PageContext; 007 import railo.runtime.PageSource; 008 import railo.runtime.exp.PageException; 009 import railo.runtime.op.Caster; 010 011 public final class NoneAppListener extends AppListenerSupport { 012 013 private int mode; 014 private String type; 015 016 /** 017 * 018 * @see railo.runtime.listener.ApplicationListener#onRequest(railo.runtime.PageContext, railo.runtime.PageSource) 019 */ 020 public void onRequest(PageContext pc,PageSource requestedPage) throws PageException { 021 pc.doInclude(requestedPage); 022 } 023 024 /** 025 * @see railo.runtime.listener.ApplicationListener#onApplicationStart(railo.runtime.PageContext) 026 */ 027 public boolean onApplicationStart(PageContext pc) throws PageException { 028 // do nothing 029 return true; 030 } 031 032 /** 033 * 034 * @see railo.runtime.listener.ApplicationListener#onSessionStart(railo.runtime.PageContext) 035 */ 036 public void onSessionStart(PageContext pc) throws PageException { 037 // do nothing 038 } 039 040 /** 041 * 042 * @see railo.runtime.listener.ApplicationListener#onApplicationEnd(railo.runtime.CFMLFactory, java.lang.String) 043 */ 044 public void onApplicationEnd(CFMLFactory factory, String applicationName) throws PageException { 045 // do nothing 046 } 047 048 /** 049 * 050 * @see railo.runtime.listener.ApplicationListener#onSessionEnd(railo.runtime.CFMLFactory, java.lang.String, java.lang.String) 051 */ 052 public void onSessionEnd(CFMLFactory cfmlFactory, String applicationName, String cfid) throws PageException { 053 // do nothing 054 } 055 056 /** 057 * @see railo.runtime.listener.ApplicationListener#onDebug(railo.runtime.PageContext) 058 */ 059 public void onDebug(PageContext pc) throws PageException { 060 try { 061 pc.getDebugger().writeOut(pc); 062 } 063 catch (IOException e) { 064 throw Caster.toPageException(e); 065 } 066 } 067 068 /** 069 * 070 * @see railo.runtime.listener.ApplicationListener#onError(railo.runtime.PageContext, railo.runtime.exp.PageException) 071 */ 072 public void onError(PageContext pc,PageException pe) { 073 pc.handlePageException(pe); 074 } 075 076 public void setMode(int mode) { 077 this.mode=mode; 078 } 079 080 /** 081 * 082 * @see railo.runtime.listener.ApplicationListener#getMode() 083 */ 084 public int getMode() { 085 return mode; 086 } 087 088 089 /** 090 * @return the type 091 */ 092 public String getType() { 093 return type; 094 } 095 096 /** 097 * @param type the type to set 098 */ 099 public void setType(String type) { 100 this.type = type; 101 } 102 }