|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webobjects.appserver.WORequestHandler
er.ajax.AjaxPushRequestHandler
public class AjaxPushRequestHandler
Request handler that offers push-style notifications.
Gets registered under "/push/" on framework load.
You should open an Ajax.Request, implement onInteractive: and the do
something useful when you get new data. Changes should be pushed with
push(sessionID, someString);
TODO:
Field Summary | |
---|---|
static java.lang.String |
AjaxCometRequestHandlerKey
|
protected static org.apache.log4j.Logger |
log
|
Fields inherited from class com.webobjects.appserver.WORequestHandler |
---|
DidHandleRequestNotification |
Constructor Summary | |
---|---|
AjaxPushRequestHandler()
|
Method Summary | |
---|---|
com.webobjects.appserver.WOResponse |
handleRequest(com.webobjects.appserver.WORequest request)
Get/Create the current request for the session and return it. |
static boolean |
isResponseOpen(java.lang.String sessionID,
java.lang.String name)
Returns whether or not there is a response open for the given session id and name. |
static void |
push(java.lang.String sessionID,
java.lang.String name,
com.webobjects.foundation.NSData message)
Push a data message to the client. |
static void |
push(java.lang.String sessionID,
java.lang.String name,
java.lang.String message)
Push a string message to the client. |
void |
sessionDidTimeOut(com.webobjects.foundation.NSNotification n)
Remove stale responses when a session times out. |
static void |
stop(java.lang.String sessionID,
java.lang.String name)
Push a string message to the client. |
Methods inherited from class com.webobjects.appserver.WORequestHandler |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String AjaxCometRequestHandlerKey
protected static org.apache.log4j.Logger log
Constructor Detail |
---|
public AjaxPushRequestHandler()
Method Detail |
---|
public void sessionDidTimeOut(com.webobjects.foundation.NSNotification n)
n
- the session timeout notificationpublic com.webobjects.appserver.WOResponse handleRequest(com.webobjects.appserver.WORequest request)
handleRequest
in class com.webobjects.appserver.WORequestHandler
request
- the requestpublic static boolean isResponseOpen(java.lang.String sessionID, java.lang.String name)
sessionID
- the session id of the push responsename
- the name of the push response
public static void stop(java.lang.String sessionID, java.lang.String name)
sessionID
- the session id of the push responsename
- the name of the push responsepublic static void push(java.lang.String sessionID, java.lang.String name, java.lang.String message)
sessionID
- the session id of the push responsename
- the name of the push responsemessage
- the message to pushpublic static void push(java.lang.String sessionID, java.lang.String name, com.webobjects.foundation.NSData message)
sessionID
- the session id of the push responsename
- the name of the push responsemessage
- the message to push
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |