Invoking a Java Extension
Java extensions are invoked from TrafficScript or RuleBuilder rules.
Whenever a Java extension is imported into the Virtual Traffic Manager, a basic RuleBuilder rule is created with the same name as the Java Extension. The rule invokes the extension, allowing it to inspect, modify and route the traffic. You can add this basic rule to the list of request or response rules run by a virtual server.
ATTENTION Java is disabled by default for all new Virtual Traffic Manager instances. To invoke a Java extension, first enable Java support. For more information, see Configuring the Virtual Traffic Manager’s Java Extension Runner.
In many cases, a particular Java extension need not be called for every single request or response; for example, it processes only requests or responses of a particular type. The Java Extension can be called conditionally by a RuleBuilder or TrafficScript rule:
if( http.getPath() == "/serverstatus" ) {
java.run( "ServerStatus" );
}