Package org.zkoss.zk.au.http
Class AuDynaMediar
java.lang.Object
org.zkoss.zk.au.http.AuDynaMediar
- All Implemented Interfaces:
AuExtension
The AU processor used to response the content for
DynamicMedia.getMedia(java.lang.String)- Since:
- 3.0.2
- Author:
- tomyeh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharsetSetup(Session session, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Sets the charset of the response.voiddestroy()Destroys the AU extension.voidinit(DHtmlUpdateServlet servlet) Initializes the AU extension.voidservice(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String pi) Retrieves the media fromDynamicMedia.getMedia(java.lang.String).
-
Constructor Details
-
AuDynaMediar
public AuDynaMediar()
-
-
Method Details
-
init
Description copied from interface:AuExtensionInitializes the AU extension. It is called when an extension is added toDHtmlUpdateServlet.- Specified by:
initin interfaceAuExtension
-
destroy
public void destroy()Description copied from interface:AuExtensionDestroys the AU extension. It is called when an extension is removed fromDHtmlUpdateServlet, or whenDHtmlUpdateServletis being destroyed.- Specified by:
destroyin interfaceAuExtension
-
charsetSetup
public Object charsetSetup(Session session, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Description copied from interface:AuExtensionSets the charset of the response.- Specified by:
charsetSetupin interfaceAuExtension- Parameters:
session- ZK session (might be null).request- the request (never null).response- the response (never null).- Returns:
- an object that must be passed to
I18Ns.cleanup(jakarta.servlet.ServletRequest, java.lang.Object)orCharsets.cleanup(jakarta.servlet.ServletRequest, java.lang.Object)(can be null).
-
service
public void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String pi) throws jakarta.servlet.ServletException, IOException Retrieves the media fromDynamicMedia.getMedia(java.lang.String).- Specified by:
servicein interfaceAuExtension- Parameters:
request- the request (never null).response- the response (never null).pi- the path info. It includes the prefix when the Au processor is associated (seeDHtmlUpdateServlet.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.- Throws:
jakarta.servlet.ServletExceptionIOException
-