9.5

Table Of Contents
derived class of QRequest using RequestService.processRequest. The servlet will
automatically create parameters out of these flags and set these in the command before
sending it for execution.
To handle these special flags, you can write your request handler derived from the class
QRequestHandler. You can then insert this new handler class anywhere in the chain of
responsibility pattern, starting with QDocProviderImpl and ending with
QHostRequestHandler.
Try not to change end points. In your handler implementation, handle your special flags,
then either return a response after handling or pass the control to the successor for further
handling.
Implementing a custom load balancer
To implement a custom load balancer, first implement the
com.quark.manager.lb.QLoadBalancer interface. To use this interface, add a reference
to "managerengine.jar" to your project.
This interface method contains the following methods:
getLoadBalancerAlgorithm
public String getLoadBalancerAlgorithm();
Signature
Returns the name of the algorithm that is mapped to the current load balancer while loading
the server.
Description
The algorithm name used to load-balance the list of hosts.Returns
getLoadBalancerDescription
public String getLoadBalancerDescription();
Signature
Gets the description of the load-balancing algorithm so it can be displayed in the
QuarkXPress Server Manager client.
Description
Description of the load balancer.Returns
useFileInfo
public Boolean useFileInfo();
Signature
Gets a flag that indicates whether the load balancer uses file information to decide on
which host to use.
Description
True if the fileinfo command should be fired before rendering, otherwise false.
Returns
getAvailableHost
public QHostProxy getAvailableHost(QHostProxy[] hosts, QCommand
command);
Signature
Gets an available host out of the provided list of hosts to execute the specified command.Description
hosts: List of hosts that should be scanned for the most eligible host.
Parameters
178 | A GUIDE TO QUARKXPRESS SERVER 9.5
USING QUARKXPRESS SERVER