Listener

Package: MachII.framework
Inherits from: framework.BaseComponent
Base Listener component.

<!--- License: Copyright 2008 GreatBizTools, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Copyright: GreatBizTools, LLC Author: Ben Edwards (ben@ben-edwards.com) $Id: Listener.cfc 625 2008-01-29 21:45:06Z peterfarrell $ Created version: 1.0.0 Updated version: 1.5.0 Notes: All user-defined listeners extend this base listener component. --->

Method Summary
public Listener init(AppManager appManager, [struct parameters="#StructNew()#"], [ListenerInvoker invoker])

Used by the framework for initialization. Do not override.

public any getInvoker()

Gets the ListenerInvoker to use when invoking methods for this Listener.

public void setInvoker(ListenerInvoker invoker)

Sets the ListenerInvoker to use when invoking methods for this Listener.

Methods inherited from framework.BaseComponent:   announceEvent , configure , isParameterDefined , bindValue , setParameter , getParameter , buildUrlToModule , getAppManager , getComponentNameForLogging , getLog , getParameterNames , setProperty , hasParameter , getPropertyManager , announceEventInModule , setAppManager , getProperty , getParameters , setLog , setParameters , buildUrl
Method Detail
getInvoker

public any getInvoker( )

Gets the ListenerInvoker to use when invoking methods for this Listener.

Parameters:

Code:

	<cffunction name="getInvoker" access="public" type="MachII.framework.ListenerInvoker" output="false"
		hint="Gets the ListenerInvoker to use when invoking methods for this Listener.">
		<cfreturn variables.invoker />
	</cffunction> 

init

public Listener init( AppManager appManager, [struct parameters="#StructNew()#"], [ListenerInvoker invoker] )

Used by the framework for initialization. Do not override.

Parameters:
AppManager appManager
[struct parameters="#StructNew()#"]
[ListenerInvoker invoker]

Code:

	<cffunction name="init" access="public" returntype="Listener" output="false"
		hint="Used by the framework for initialization. Do not override.">
		<cfargument name="appManager" type="MachII.framework.AppManager" required="true" />
		<cfargument name="parameters" type="struct" required="false" default="#StructNew()#" />
		<cfargument name="invoker" type="MachII.framework.ListenerInvoker" required="false" />
		
		<cfset super.init(arguments.appManager, arguments.parameters) />
		
		<cfif StructKeyExists(arguments, "invoker")>
			<cfset setInvoker(arguments.invoker) />
		</cfif>
		
		<cfreturn this />
	</cffunction> 

setInvoker

public void setInvoker( ListenerInvoker invoker )

Sets the ListenerInvoker to use when invoking methods for this Listener.

Parameters:
ListenerInvoker invoker

Code:

	<cffunction name="setInvoker" access="public" returntype="void" output="false"
		hint="Sets the ListenerInvoker to use when invoking methods for this Listener.">
		<cfargument name="invoker" type="MachII.framework.ListenerInvoker" required="true" />
		<cfset variables.invoker = arguments.invoker />
	</cffunction>