net.sf.asterisk.fastagi
Class AGIConnectionHandler

java.lang.Object
  extended by net.sf.asterisk.fastagi.AGIConnectionHandler
All Implemented Interfaces:
java.lang.Runnable

public class AGIConnectionHandler
extends java.lang.Object
implements java.lang.Runnable

An AGIConnectionHandler is created and run by the AGIServer whenever a new socket 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 socket connection.

Version:
$Id: AGIConnectionHandler.java,v 1.13 2005/11/04 21:49:01 srt Exp $
Author:
srt

Constructor Summary
AGIConnectionHandler(SocketConnectionFacade socket, MappingStrategy mappingStrategy)
          Creates a new AGIConnectionHandler to handle the given socket connection.
 
Method Summary
protected  AGIReader createReader()
           
protected  AGIWriter createWriter()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AGIConnectionHandler

public AGIConnectionHandler(SocketConnectionFacade socket,
                            MappingStrategy mappingStrategy)
Creates a new AGIConnectionHandler to handle the given socket connection.

Parameters:
socket - the socket connection to handle.
mappingStrategy - the strategy to use to determine which script to run.
Method Detail

createReader

protected AGIReader createReader()

createWriter

protected AGIWriter createWriter()

run

public void run()
Specified by:
run in interface java.lang.Runnable


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