public abstract class AbstractMappingStrategy extends Lockable implements MappingStrategy
| Modifier and Type | Field and Description |
|---|---|
protected Log |
logger
Reference to Asterisk-Java's logging subsystem.
|
| Constructor and Description |
|---|
AbstractMappingStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected AgiScript |
createAgiScriptInstance(String className)
Creates a new instance of an AGI script.
|
abstract AgiScript |
determineScript(AgiRequest request) |
AgiScript |
determineScript(AgiRequest request,
AgiChannel channel)
Returns the AgiScript instance that is responsible to handle
the given request.
|
protected ClassLoader |
getClassLoader()
Returns the ClassLoader to use for loading AgiScript classes and load
other resources like the mapping properties file.
|
getDumpRateLimit, withLockprotected Log logger
public AgiScript determineScript(AgiRequest request, AgiChannel channel)
MappingStrategydetermineScript in interface MappingStrategyrequest - the request to lookup.channel - the channel.null if none could be determined by this strategy.public abstract AgiScript determineScript(AgiRequest request)
protected ClassLoader getClassLoader()
By default this method returns a class loader that searches for classes in the "agi" subdirectory (if it exists) and uses the context class loader of the current thread as the parent class loader.
You can override this method if you prefer using a different class loader.
protected AgiScript createAgiScriptInstance(String className)
className - Class name of the AGI script. The class must implement
AgiScript.null is
returned.Copyright © 2004–2022. All rights reserved.