|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zkex.ui.comet.CometServerPush
org.zkoss.zkmax.ui.comet.CometServerPush
public class CometServerPush
ZK Comet that supports Servlet 3 asynchronous processing. This implementation will detect if the server supports Servlet 3, and then use the right implementation automatically.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.zkoss.zkex.ui.comet.CometServerPush |
|---|
CometServerPush.AsyncInfo |
| Constructor Summary | |
|---|---|
CometServerPush()
The default constructor. |
|
CometServerPush(boolean async)
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
getStartScript()
Returns the JavaScript codes to enable (a.k.a., start) the server push. |
protected java.lang.String |
getStopScript()
Returns the JavaScript codes to disable (a.k.a., stop) the server push. |
protected void |
onStart()
Called when CometServerPush.start(org.zkoss.zk.ui.Desktop) is called. |
protected void |
processRequest(Execution exec,
CometServerPush.AsyncInfo ai)
Called when receiving the comet request from the client. |
protected boolean |
setBusy()
Sets busy and return if it is busy for processing other request. |
void |
start(Desktop desktop)
Starts the server push. |
| Methods inherited from class org.zkoss.zkex.ui.comet.CometServerPush |
|---|
activate, deactivate, getDesktop, isActive, onPiggyback, onStop, resume, schedule, startClientPush, stop, stopClientPush |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CometServerPush()
If you prefer to disable the use of Servlet 3 or vice versa, you could
specify a library property called org.zkoss.zkmax.ui.comet.async.disabled.
Notice that enabling the asynchronous support in a server not supporting Servlet 3
is not allowed.
public CometServerPush(boolean async)
async - whether to utilities Servlet 3 asynchronous processing support.
Don't specify it to true if the server doesn't support Servlet 3. The result
is unpredictable.| Method Detail |
|---|
public void start(Desktop desktop)
CometServerPushThe derived class rarely need to override this method.
Rather, override CometServerPush.startClientPush().
start in interface ServerPushstart in class CometServerPushprotected java.lang.String getStartScript()
CometServerPushCometServerPush.startClientPush() to prepare the script
of AuScript that will be sent to the client.
getStartScript in class CometServerPushprotected java.lang.String getStopScript()
CometServerPushCometServerPush.stopClientPush() to prepare the script
of AuScript that will be sent to the client.
getStopScript in class CometServerPushprotected void onStart()
CometServerPushCometServerPush.start(org.zkoss.zk.ui.Desktop) is called.
This method is called before CometServerPush.startClientPush(), and used to initialize the desktop,
if necessary.
The default implementation initializes an extension to process the comet request.
onStart in class CometServerPushprotected boolean setBusy()
CometServerPushIt is possible since the client might abort the previous one and issue a new one but their server didn't know.
setBusy in class CometServerPush
protected void processRequest(Execution exec,
CometServerPush.AsyncInfo ai)
throws java.io.IOException
processRequest in class CometServerPushjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||