public interface XGatePlugin
For your plugin to be used, it must be defined within the XGate configuration file, xgate.xml
which is found within the doc
directory of the webapp. For example:
<xgate> ... <plugins> ... <custom_plugins> <custom_plugin name="my plugin" priority="10" runtime_instance="com.company.MyPlugin"/> </custom_plugins> </plugins> </xgate>The priority value indicates when your plugin will be called. Plugins with a lower priroty number will be called first. All the inbuilt plugins that handle data binding etc have a priority of 50.
Modifier and Type | Method and Description |
---|---|
void |
processInput(XDocument input,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process the request before it is passed to the platform.
|
void |
processOutput(XDocument output,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process the response recieved from the platform, before it is returned to the browser.
|
void processInput(XDocument input, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
input
- An XDocument object containing the current state of the XML message.
The document this contains should be updated as required.request
- The HttpServletRequest object that defines the request being processed.
This provides access to any request or session parameters etc.response
- The HttpServletResponse object that will eventually be written to.
You should not write to this as that will be handled automatically,
but you may want to add a cookie, or set a header for example.void processOutput(XDocument output, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
output
- An XDocument object containing the current state of the XML message (this will often be HTML).
The document this contains should be updated as required.request
- The HttpServletRequest object that defines the request being processed.
This provides access to any request or session parameters etc.response
- The HttpServletResponse object that will eventually be written to.
You should not write to this to output the message content as that will be handled automatically,
but you may want to add a cookie, or set a header for example. output.setDocument(null)
)
to prevent XGate from trying to return the normal content.Copyright © 2007 Hyfinity Ltd. All Rights Reserved.