<cfcomponent
output="false"
hint="Handle the application configuration.">
<cfset THIS.Name = "TimeoutTest" />
<cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 1, 0 ) />
<cfset THIS.SessionManagement = true />
<cfset THIS.SessionTimeout = CreateTimeSpan( 0, 0, 0, 2 ) />
<cfsetting
showdebugoutput="false"
/>
<cffunction
name="OnSessionStart"
access="public"
returntype="boolean"
output="false"
hint="Fires when the user's session begins.">
<cfset SESSION.DateCreated = Now() />
<cfreturn true />
</cffunction>
<cffunction
name="OnRequest"
access="public"
returntype="void"
output="true"
hint="Executes the requested template.">
<cfargument
name="Template"
type="string"
required="true"
hint="The ColdFusion template that has been requested."
/>
<cfinclude template="#ARGUMENTS.Template#" />
<cfreturn />
</cffunction>
<cffunction
name="OnSessionEnd"
access="public"
returntype="void"
output="false"
hint="Fires when the session is terminated.">
<cfargument
name="Session"
type="struct"
required="true"
hint="The expired session scope."
/>
<cfset ARGUMENTS.Session.DateEnded = Now() />
<cfreturn />
</cffunction>
<cffunction
name="LogValue"
access="public"
returntype="void"
output="false"
hint="Logs the given value to a local log.">
<cfargument
name="Value"
type="string"
required="true"
hint="The value to be logged."
/>
<cfset var Output = (
ARGUMENTS.Value & " : " &
TimeFormat( Now(), "hh:mm:ss" )
) />
<cffile
action="append"
file="#ExpandPath( './log.txt' )#"
output="#Output#"
addnewline="true"
/>
<cfreturn />
</cffunction>
</cfcomponent>