public interface AuExtension
DHtmlUpdateServlet
to extend its functionality.
An AU processor is associated with a prefix when plugged into
the update servlet. Then, when a request with the prefix is received,
the corresponding AU process is invoked to handle the request).Modifier and Type | Method and Description |
---|---|
default java.lang.Object |
charsetSetup(Session session,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Sets the charset of the response.
|
void |
destroy()
Destroys the AU extension.
|
void |
init(DHtmlUpdateServlet servlet)
Initializes the AU extension.
|
void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String pi)
Called by ZK to process the AU request.
|
void init(DHtmlUpdateServlet servlet) throws javax.servlet.ServletException
DHtmlUpdateServlet
.javax.servlet.ServletException
void destroy()
DHtmlUpdateServlet
,
or when DHtmlUpdateServlet
is being destroyed.void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String pi) throws javax.servlet.ServletException, java.io.IOException
To retrieve the http session, use HttpServletRequest.getSession().
To retrieve the ZK session, use
Sessions.getCurrent(boolean)
.
request
- the request (never null).response
- the response (never null).pi
- the path info. It includes the prefix when the Au processor
is associated (see DHtmlUpdateServlet.addAuExtension(org.zkoss.zk.ui.WebApp, java.lang.String, org.zkoss.zk.au.http.AuExtension)
.
For example, if an AU processor is associated with "/upload", then
pi must start with "/upload". Note: it might end with other string
depending on the URI you generated to the client.javax.servlet.ServletException
java.io.IOException
default java.lang.Object charsetSetup(Session session, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
session
- ZK session (might be null).request
- the request (never null).response
- the response (never null).I18Ns.cleanup(javax.servlet.ServletRequest, java.lang.Object)
or Charsets.cleanup(javax.servlet.ServletRequest, java.lang.Object)
(can be null).Copyright © 2005-2023 Potix Corporation. All Rights Reserved.