|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.asteriskjava.fastagi.AbstractMappingStrategy
org.asteriskjava.fastagi.ClassNameMappingStrategy
public class ClassNameMappingStrategy
A MappingStrategy that determines the AGIScript based on the fully qualified class name given in the AGI URL.
To use this ClassNameMappingStrategy the calls to your
AgiScript
in
your dialplan should look like this:
exten => 123,1,AGI(agi://your.server.com/com.example.agi.MyScript)Where com.example.agi.MyScript is the fully qualified name of your AgiScript.
Field Summary |
---|
Fields inherited from class org.asteriskjava.fastagi.AbstractMappingStrategy |
---|
logger |
Constructor Summary | |
---|---|
ClassNameMappingStrategy()
Creates a new ClassNameMappingStrategy using shared instances. |
|
ClassNameMappingStrategy(boolean shareInstances)
Creates a new ClassNameMappingStrategy indicating whether to use shared instances or not. |
Method Summary | |
---|---|
AgiScript |
determineScript(AgiRequest request)
Returns the AgiScript instance that is responsible to handle the given request. |
void |
setShareInstances(boolean shareInstances)
Sets whether to use shared instances or not. |
Methods inherited from class org.asteriskjava.fastagi.AbstractMappingStrategy |
---|
createAgiScriptInstance, getClassLoader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassNameMappingStrategy()
public ClassNameMappingStrategy(boolean shareInstances)
shareInstances
- true
to use shared instances,
false
to create a new instance for
each request.Method Detail |
---|
public void setShareInstances(boolean shareInstances)
true
all AGIRequests are served by the same instance of an
AGIScript, if set to false
a new instance is created for
each request.
Default is true
.
shareInstances
- true
to use shared instances,
false
to create a new instance for
each request.public AgiScript determineScript(AgiRequest request)
MappingStrategy
request
- the request to lookup.
null
if none could be determined by this strategy.
|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |