Module ringo/jsgi/connector
Low-level JSGI adapter implementation.
Functions
- AsyncResponse (request, timeout)
- handleRequest (moduleId, functionObj, request)
AsyncResponse (request, timeout)
Creates a streaming asynchronous response. The returned response object can be used both synchronously from the current thread or asynchronously from another thread, even after the original thread has finished execution. AsyncResponse objects are threadsafe.
To enable async support inside a Servlet 3.0+ container, an additional
<async-supported>true</async-supported>
element in
the web.xml
deployment descriptor might be required.
This indicates that Ringo's JsgiServlet supports asynchronous request processing.
Parameters
Object | request | the JSGI request object |
Number | timeout | the response timeout in milliseconds. Defaults to 30 seconds. |
handleRequest (moduleId, functionObj, request)
Handle a JSGI request.
Parameters
String | moduleId | the module id. Ignored if functionObj is already a function. |
Function|String | functionObj | the function, either as function object or function name to be imported from the module moduleId. |
Object | request | the JSGI request object |
Returns
Object | the JSGI response object |