@@ -27,24 +27,27 @@ public class AsyncAgiServer extends AbstractAgiServer implements ManagerEventLis
27
27
private final Map <Integer , AsyncAgiConnectionHandler > connectionHandlers ;
28
28
29
29
/**
30
- * Creates a new AsyncAgiServer.<p>
30
+ * Creates a new AsyncAgiServer with a {@link DefaultAgiChannelFactory} .<p>
31
31
* Note that you must set a {@link org.asteriskjava.fastagi.MappingStrategy} before using it.
32
- * @see #setMappingStrategy(MappingStrategy)
32
+ *
33
+ * @see #setMappingStrategy(MappingStrategy)
33
34
*/
34
35
public AsyncAgiServer ()
35
36
{
36
- this (new DefaultAgiChannelFactory ());
37
+ this (new DefaultAgiChannelFactory ());
37
38
}
38
-
39
+
39
40
/**
40
- * Creates a new AsyncAgiServer.<p>
41
+ * Creates a new AsyncAgiServer with a custom {@link AgiChannelFactory} .<p>
41
42
* Note that you must set a {@link org.asteriskjava.fastagi.MappingStrategy} before using it.
42
- * @see #setMappingStrategy(MappingStrategy)
43
+ *
43
44
* @param agiChannelFactory The factory to use for creating new AgiChannel instances.
45
+ * @see #setMappingStrategy(MappingStrategy)
46
+ * @since 1.0.0
44
47
*/
45
48
public AsyncAgiServer (AgiChannelFactory agiChannelFactory )
46
49
{
47
- super (agiChannelFactory );
50
+ super (agiChannelFactory );
48
51
this .connectionHandlers = new HashMap <Integer , AsyncAgiConnectionHandler >();
49
52
}
50
53
@@ -59,18 +62,18 @@ public AsyncAgiServer(AgiChannelFactory agiChannelFactory)
59
62
*/
60
63
public AsyncAgiServer (MappingStrategy mappingStrategy )
61
64
{
62
- this (mappingStrategy , new DefaultAgiChannelFactory ());
63
- logger .debug ("use default AgiChannelFactory" );
65
+ this (mappingStrategy , new DefaultAgiChannelFactory ());
66
+ logger .debug ("use default AgiChannelFactory" );
64
67
}
65
-
68
+
66
69
/**
67
70
* Creates a new AsyncAgiServer with the given MappingStrategy.<p>
68
71
* Please note that Async AGI does not currently support passing a script name, so your
69
72
* MappingStrategy must be aware that the {@link org.asteriskjava.fastagi.AgiRequest#getScript() script}
70
73
* property of the AgiRequests will likely be <code>null</code>.
71
74
*
72
- * @param mappingStrategy the MappingStrategy to use to determine which AGI script to run
73
- * for a certain request.
75
+ * @param mappingStrategy the MappingStrategy to use to determine which AGI script to run
76
+ * for a certain request.
74
77
* @param agiChannelFactory The factory to use for creating new AgiChannel instances.
75
78
*/
76
79
public AsyncAgiServer (MappingStrategy mappingStrategy , AgiChannelFactory agiChannelFactory )
@@ -84,7 +87,7 @@ public AsyncAgiServer(MappingStrategy mappingStrategy, AgiChannelFactory agiChan
84
87
* request.<p>
85
88
* Internally this constructor uses a {@link org.asteriskjava.fastagi.StaticMappingStrategy}.
86
89
*
87
- * @param agiScript the AGI script to execute.
90
+ * @param agiScript the AGI script to execute.
88
91
* @param agiChannelFactory The factory to use for creating new AgiChannel instances.
89
92
*/
90
93
public AsyncAgiServer (AgiScript agiScript , AgiChannelFactory agiChannelFactory )
@@ -102,11 +105,11 @@ public AsyncAgiServer(AgiScript agiScript, AgiChannelFactory agiChannelFactory)
102
105
*/
103
106
public AsyncAgiServer (AgiScript agiScript )
104
107
{
105
- this (agiScript , new DefaultAgiChannelFactory ());
106
- logger .debug ("use default AgiChannelFactory" );
108
+ this (agiScript , new DefaultAgiChannelFactory ());
109
+ logger .debug ("use default AgiChannelFactory" );
107
110
}
108
111
109
-
112
+
110
113
public void onManagerEvent (ManagerEvent event )
111
114
{
112
115
if (event instanceof AsyncAgiEvent )
@@ -130,7 +133,7 @@ private void handleAsyncAgiEvent(AsyncAgiEvent asyncAgiEvent)
130
133
131
134
if (asyncAgiEvent .isStart ())
132
135
{
133
- connectionHandler = new AsyncAgiConnectionHandler (getMappingStrategy (), asyncAgiEvent ,this .getAgiChannelFactory ());
136
+ connectionHandler = new AsyncAgiConnectionHandler (getMappingStrategy (), asyncAgiEvent , this .getAgiChannelFactory ());
134
137
setConnectionHandler (connection , channelName , connectionHandler );
135
138
try
136
139
{
0 commit comments