|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet org.zkoss.zk.au.http.DHtmlUpdateServlet
public class DHtmlUpdateServlet
Used to receive command from the server and send result back to client.
Though it is called
DHtmlUpdateServlet, it is used to serve all kind of HTTP-based clients,
including ajax (HTML+Ajax), mil (Mobile Interactive Language),
and others (see Desktop.getDeviceType()
.
Init parameters:
AuExtension
).
The extension0
parameter specifies
the first AU extension, the extension1
parameter the second AU extension,
and so on./prefix=class
By default: there are three extensions are associated with
"/upload", "/view" and "/dropupload" (see addAuExtension(org.zkoss.zk.ui.WebApp, java.lang.String, org.zkoss.zk.au.http.AuExtension)
.
Also, "/web" is reserved. Don't associate to any AU extension.
Constructor Summary | |
---|---|
DHtmlUpdateServlet()
|
Method Summary | |
---|---|
AuExtension |
addAuExtension(java.lang.String prefix,
AuExtension extension)
Adds an AU extension and associates it with the specified prefix. |
static AuExtension |
addAuExtension(WebApp wapp,
java.lang.String prefix,
AuExtension extension)
Adds an AU extension and associates it with the specified prefix, even before DHtmlUpdateServlet is started. |
void |
denoteSessionTimeout(WebApp wapp,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
boolean compress)
Denote HTTP 410 Session timeout response |
void |
destroy()
|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
AuExtension |
getAuExtension(java.lang.String prefix)
Returns the AU extension associated with the specified prefix, or null if no AU extension associated. |
static AuExtension |
getAuExtension(WebApp wapp,
java.lang.String prefix)
Returns the AU extension that is associated the specified prefix. |
protected Desktop |
getDesktop(Session sess,
java.lang.String dtid)
Returns the desktop of the specified ID, or null if not found. |
protected long |
getLastModified(javax.servlet.http.HttpServletRequest request)
|
static DHtmlUpdateServlet |
getUpdateServlet(WebApp wapp)
Returns the update servlet of the specified application, or null if not loaded yet. |
void |
init()
|
boolean |
isCompress()
|
void |
process(Session sess,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
boolean compress)
Process asynchronous update requests from the client. |
protected Desktop |
recoverDesktop(Session sess,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
WebAppCtrl wappc,
java.lang.String dtid)
Recovers the desktop if possible. |
void |
setCompress(boolean compress)
|
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DHtmlUpdateServlet()
Method Detail |
---|
public static DHtmlUpdateServlet getUpdateServlet(WebApp wapp)
public void init() throws javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
public boolean isCompress()
public void setCompress(boolean compress)
public static final AuExtension getAuExtension(WebApp wapp, java.lang.String prefix)
public static final AuExtension addAuExtension(WebApp wapp, java.lang.String prefix, AuExtension extension) throws javax.servlet.ServletException
DHtmlUpdateServlet
is started.
Unlike addAuExtension(String, AuExtension)
, it can be called
even if the update servlet is not loaded yet (getUpdateServlet(org.zkoss.zk.ui.WebApp)
returns null).
If there was an AU extension associated with the same name, the the old AU extension will be replaced.
javax.servlet.ServletException
public AuExtension addAuExtension(java.lang.String prefix, AuExtension extension) throws javax.servlet.ServletException
If there was an AU extension associated with the same name, the the old AU extension will be replaced.
If you want to add an Au extension, even before DHtmlUpdateServlet
is started, use addAuExtension(WebApp, String, AuExtension)
instead.
prefix
- the prefix. It must start with "/", but it cannot be
"/" nor "/web" (which are reserved).extension
- the AU extension (never null).
javax.servlet.ServletException
addAuExtension(WebApp,String,AuExtension)
public AuExtension getAuExtension(java.lang.String prefix)
protected long getLastModified(javax.servlet.http.HttpServletRequest request)
getLastModified
in class javax.servlet.http.HttpServlet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public void denoteSessionTimeout(WebApp wapp, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean compress) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public void process(Session sess, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean compress) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected Desktop getDesktop(Session sess, java.lang.String dtid)
recoverDesktop(org.zkoss.zk.ui.Session, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.zkoss.zk.ui.sys.WebAppCtrl, java.lang.String)
will be invoked.
sess
- the session (never null)dtid
- the desktop ID to look forprotected Desktop recoverDesktop(Session sess, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, WebAppCtrl wappc, java.lang.String dtid)
getDesktop(org.zkoss.zk.ui.Session, java.lang.String)
returns null.
The default implementation will look for any failover manager (FailoverManager
)
is registered, and forward the invocation to it if found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |