Most of the guts of DWR is pluggable so it is possible to alter the functionallity of DWR by replacing default classes. You can override the default implementations by including an <init-param>
that specifies the interface to replace in the param-name and the replacement implementation in the param-value.
For example:
<servlet> <servlet-name>dwr-invoker</servlet-name> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class> <init-param> <param-name>org.directwebremoting.extend.ServerLoadMonitor</param-name> <param-value>com.example.MyCustomServerLoadMonitor</param-value> </init-param> </servlet>
There is no contract that we will leave these interfaces untouched across a major release, however we will attempt to provide easy upgrade paths.
org.directwebremoting.Container
org.directwebremoting.WebContextFactory$WebContextBuilder
org.directwebremoting.ServerContextFactory$ServerContextBuilder
org.directwebremoting.servlet.UrlProcessor
org.directwebremoting.extend.AccessControl
org.directwebremoting.extend.AjaxFilterManager
org.directwebremoting.extend.ConverterManager
org.directwebremoting.extend.CreatorManager
org.directwebremoting.extend.DebugPageGenerator
org.directwebremoting.extend.PageNormalizer
org.directwebremoting.extend.Remoter
org.directwebremoting.extend.ScriptSessionManager
org.directwebremoting.extend.ServerLoadMonitor
The default implementations of these are mostly in the org.directwebremoting.impl
package, the details are specified in ContainerUtil.setupDefaults()
.
In addition to the extension points listed above, there are some extension points which are very likely to change in future versions of DWR.
org.directwebremoting.dwrp.HtmlCallMarshaller
org.directwebremoting.dwrp.HtmlPollHandler
org.directwebremoting.dwrp.PlainCallMarshaller
org.directwebremoting.dwrp.PlainPollHandler