org.asteriskjava.fastagi.internal
Class AgiConnectionHandler
java.lang.Object
org.asteriskjava.fastagi.internal.AgiConnectionHandler
- All Implemented Interfaces:
- java.lang.Runnable
- Direct Known Subclasses:
- AsyncAgiConnectionHandler, FastAgiConnectionHandler
public abstract class AgiConnectionHandler
- extends java.lang.Object
- implements java.lang.Runnable
An AgiConnectionHandler is created and run by the AgiServer whenever a new
AGI connection from an Asterisk Server is received.
It reads the request using an AgiReader and runs the AgiScript configured to
handle this type of request. Finally it closes the AGI connection.
- Version:
- $Id: AgiConnectionHandler.java 1302 2009-05-12 16:39:11Z srt $
- Author:
- srt
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AgiConnectionHandler
protected AgiConnectionHandler(MappingStrategy mappingStrategy)
- Creates a new AGIConnectionHandler to handle the given socket connection.
- Parameters:
mappingStrategy
- the strategy to use to determine which script to run.
isIgnoreMissingScripts
protected boolean isIgnoreMissingScripts()
setIgnoreMissingScripts
protected void setIgnoreMissingScripts(boolean ignoreMissingScripts)
getScript
protected AgiScript getScript()
createReader
protected abstract org.asteriskjava.fastagi.internal.AgiReader createReader()
createWriter
protected abstract org.asteriskjava.fastagi.internal.AgiWriter createWriter()
release
protected abstract void release()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
getScriptName
protected java.lang.String getScriptName(AgiScript script)
getChannel
public static AgiChannel getChannel()
- Returns the AgiChannel associated with the current thread.
- Returns:
- the AgiChannel associated with the current thread or
null
if none is associated.
Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.