Custom advisors are
written in the Java language. A custom advisor extends the com.ibm.wsspi.advisor.AbstractCustomAdvisor
class in the proxy.jar file that is included with WebSphere
® Application Server. Custom
advisors use the defined methods of the AbstractCustomAdvisor class to obtain
the information about the advisor. A custom advisor also must implement the
following elements:
The initialize method is called after the AbstractCustomAdvisor construction,
but before the isUsable method is called. This process enables the custom
advisor to complete any additional steps after the base class completes initialization,
but before the isUsable method is called. This practice ensures that the initialize
method is only called once. If overridden, the initialize() method must call
the super.intitialize method, for example:
protected void initialize() {
super.initialize();
}
For more information about the required routines and the other
methods available to a custom advisor, see the application programming interface
(API) reference section of the information center. A list of the product API
specifications is displayed in alphabetic order.
From the information center
navigation, scroll to the Reference section and click APIs - Application Programming
Interfaces.Sample httpcustomadvisor.jar file:<advisor-context>
<description>Webbsphere Proxy Demo HTTP Advisor Context</description>
<display-name>Webbsphere Proxy Demo HTTP Advisor Context</display-name>
?
<advisor>
<advisor-name>WebsphereProxyDemoHttpAdvisor</advisor-name>
?
<advisor-class>
com.ibm.ws.proxy.demo.customadvisor.http.HttpProxyCustomAdvisor
</advisor-class>
<description>Demo Websphere Proxy Http Advisor
Implementation</description>
<display-name>Demo Websphere Proxy Http Advisor</display-name>
</advisor>
</advisor-context>