net.sf.asterisk.fastagi
Class ResourceBundleMappingStrategy
java.lang.Object
net.sf.asterisk.fastagi.ResourceBundleMappingStrategy
- All Implemented Interfaces:
- MappingStrategy
public class ResourceBundleMappingStrategy
- extends java.lang.Object
- implements MappingStrategy
A MappingStrategy that is configured via a resource bundle.
The resource bundle contains the script part of the url as key and the fully
qualified class name of the corresponding AGIScript as value.
Example:
leastcostdial.agi = com.example.fastagi.LeastCostDialAGIScript
hello.agi = com.example.fastagi.HelloAGIScript
LeastCostDialAGIScript and HelloAGIScript must both implement the AGIScript
interface and have a default constructor with no parameters.
The resource bundle (properties) file must be called
fastagi-mapping.properties
and be available on the classpath.
- Version:
- $Id: ResourceBundleMappingStrategy.java,v 1.4 2005/11/04 21:49:01 srt Exp $
- Author:
- srt
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceBundleMappingStrategy
public ResourceBundleMappingStrategy()
setResourceBundleName
public void setResourceBundleName(java.lang.String propertiesName)
determineScript
public AGIScript determineScript(AGIRequest request)
- Description copied from interface:
MappingStrategy
- Returns the AGIScript that is responsible to handle the given request.
- Specified by:
determineScript
in interface MappingStrategy
- Parameters:
request
- the request to lookup.
- Returns:
- the responsible script.
Copyright © 2004-2005 Stefan Reuter. All Rights Reserved.