|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.zkoss.zk.au.http.HttpAuWriter
org.zkoss.zkmax.au.http.SmartAuWriter
public class SmartAuWriter
A smart AU writer that will generate some output to client first if
the processing takes more than the time specified in the timeout argument
of open(java.lang.Object, java.lang.Object, int)
.
Available in ZK EE
Constructor Summary | |
---|---|
SmartAuWriter()
|
Method Summary | |
---|---|
void |
close(java.lang.Object request,
java.lang.Object response)
Closes the connection. |
protected ScalableTimer |
newTimer()
Creates an instance of ScalableTimer . |
AuWriter |
open(java.lang.Object request,
java.lang.Object response,
int timeout)
Opens the connection. |
Methods inherited from class org.zkoss.zk.au.http.HttpAuWriter |
---|
getResult, isCompress, setCompress, write, write, writeResponseId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SmartAuWriter()
Method Detail |
---|
protected ScalableTimer newTimer()
ScalableTimer
.
By default, it creates a scalable timer that will use at most 50 real timers (i.e., new ScalableTimer(50, 25)). If you want to change it, you can override this method.
public AuWriter open(java.lang.Object request, java.lang.Object response, int timeout) throws java.io.IOException
open
in interface AuWriter
open
in class HttpAuWriter
request
- the request (HttpServletRequest if HTTP)response
- the response (HttpServletResponse if HTTP)timeout
- the elapsed time (milliseconds) before sending
a whitespace to the client to indicate the connection is alive.
Ignored if non-positive, or the implementation doesn't support
this feature.
java.io.IOException
public void close(java.lang.Object request, java.lang.Object response) throws java.io.IOException
HttpAuWriter
close
in interface AuWriter
close
in class HttpAuWriter
request
- the request (HttpServletRequest if HTTP)response
- the response (HttpServletResponse if HTTP)
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |