
Public Member Functions | |
| AjaxPushRequestHandler () | |
| WOResponse | handleRequest (WORequest request) |
| void | sessionDidTimeOut (NSNotification n) |
Static Public Member Functions | |
| static boolean | isResponseOpen (String sessionID, String name) |
| static void | push (String sessionID, String name, NSData message) |
| static void | push (String sessionID, String name, String message) |
| static void | stop (String sessionID, String name) |
Static Public Attributes | |
| static final String | AjaxCometRequestHandlerKey = "push" |
Static Protected Attributes | |
| static Logger | log = Logger.getLogger(AjaxPushRequestHandler.class) |
Static Private Member Functions | |
| static ERXKeepAliveResponse | responseForSessionIDNamed (String sessionID, String name) |
Static Private Attributes | |
| static ConcurrentHashMap < String, ConcurrentHashMap < String, ERXKeepAliveResponse > > | responses = new ConcurrentHashMap<String, ConcurrentHashMap<String, ERXKeepAliveResponse>>() |
TODO: currently the request stays open even when the client closed it (which is bad) implement a boundary scheme to tell when a "message" is complete. This means we need a special Ajax.Request that does it. implement various client-side stuff to be actually useful (chats, EO notifications). ask Frank about his EO layer use the request handler path as a "topic", so we can have more than one on a page.
| WOResponse handleRequest | ( | WORequest | request | ) |
Get/Create the current request for the session and return it.
| request | the request |
Returns whether or not there is a response open for the given session id and name.
| sessionID | the session id of the push response | |
| name | the name of the push response |
Push a data message to the client. At the moment, there is no boundary handling, so be aware that you could get only half of a message.
| sessionID | the session id of the push response | |
| name | the name of the push response | |
| message | the message to push |
Push a string message to the client. At the moment, there is no boundary handling, so be aware that you could get only half of a message.
| sessionID | the session id of the push response | |
| name | the name of the push response | |
| message | the message to push |
| static ERXKeepAliveResponse responseForSessionIDNamed | ( | String | sessionID, | |
| String | name | |||
| ) | [static, private] |
Return or create the correct response for the session ID.
| sessionID | the session id of the response | |
| name | the name of the response |
| void sessionDidTimeOut | ( | NSNotification | n | ) |
Remove stale responses when a session times out.
| n | the session timeout notification |
Push a string message to the client. At the moment, there is no boundary handling, so be aware that you could get only half of a message.
| sessionID | the session id of the push response | |
| name | the name of the push response |
final String AjaxCometRequestHandlerKey = "push" [static] |
Logger log = Logger.getLogger(AjaxPushRequestHandler.class) [static, protected] |
ConcurrentHashMap<String, ConcurrentHashMap<String, ERXKeepAliveResponse> > responses = new ConcurrentHashMap<String, ConcurrentHashMap<String, ERXKeepAliveResponse>>() [static, private] |
1.5.8