Asterisk-Java

org.asteriskjava.fastagi
Interface MappingStrategy

All Known Implementing Classes:
AbstractMappingStrategy, ClassNameMappingStrategy, CompositeMappingStrategy, ResourceBundleMappingStrategy, ScriptEngineMappingStrategy, SimpleMappingStrategy, StaticMappingStrategy

public interface MappingStrategy

A MappingStrategy determines which AgiScript is called to service a given AgiRequest.

A MappingStrategy can use any of the properties of an AgiRequest to do this. However most MappingStrategies will just use the script property, that is the name of the invoked AGI script as passed from Asterisk's dialplan.

Asterisk-Java ships with several mapping strategies that are available out of the box. If you have some special requirements that are not satisfied by any of the available strategies feel free to implement this interface and use your own strategy.

Version:
$Id: MappingStrategy.java 938 2007-12-31 03:23:38Z srt $
Author:
srt

Method Summary
 AgiScript determineScript(AgiRequest request)
          Returns the AgiScript instance that is responsible to handle the given request.
 

Method Detail

determineScript

AgiScript determineScript(AgiRequest request)
Returns the AgiScript instance that is responsible to handle the given request.

Parameters:
request - the request to lookup.
Returns:
the AgiScript instance to handle this request or null if none could be determined by this strategy.

Asterisk-Java

Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.