Package org.zkoss.zk.au
Interface AuDecoder
-
public interface AuDecoderUsed to decode the custom format of the AU requests. By default, the AU request is sent in the JSON format. If you prefer to use another format, you have to do as follows.- Implement this interface to decode the custom format.
- Register the implementation by specifying it in
WEB-INF/zk.xml - Override a JavaScript method called zAu.encode() to encode to the custom format
- Since:
- 5.0.4
- Author:
- tomyeh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<AuRequest>decode(java.lang.Object request, Desktop desktop)Returns a list ofAuRequestby decoding the request.java.lang.StringgetDesktopId(java.lang.Object request)Returns the desktop ID.java.lang.StringgetFirstCommand(java.lang.Object request)Returns the first command.booleanisIgnorable(java.lang.Object request, WebApp wapp)Returns if the request is ignorable when an error occurs.
-
-
-
Method Detail
-
getDesktopId
java.lang.String getDesktopId(java.lang.Object request)
Returns the desktop ID.- Parameters:
request- the request. For HTTP, it is HttpServletRequest.
-
getFirstCommand
java.lang.String getFirstCommand(java.lang.Object request)
Returns the first command. It is called if a desktop is not found.- Parameters:
request- the request. For HTTP, it is HttpServletRequest.
-
decode
java.util.List<AuRequest> decode(java.lang.Object request, Desktop desktop)
Returns a list ofAuRequestby decoding the request.- Parameters:
request- the request. For HTTP, it is HttpServletRequest.
-
isIgnorable
boolean isIgnorable(java.lang.Object request, WebApp wapp)Returns if the request is ignorable when an error occurs. If true is returned, the request is simply ignored. Otherwise, an error message, depending on the configuration, is sent to the client.
-
-