2020

Table Of Contents
USING QUARKXPRESS SERVER
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:
Next:
Make a jar for the load balancer. 1.
Deploy the jar to the following folder: [QXPSM_HOME]/dependencies 2.
To configure “ManagerContainerConfig.xml” for bean mapping, first navigate 3.
to [QXPSM_HOME]/conf .
Open the “ManagerContainerConfig.xml” file and look for the XML tag bean 4.
whose id has the value ConfigurationManager.
getLoadBalancerAlgorithm
Signature public String getLoadBalancerAlgorithm();
Description
Returns the name of the algorithm that is mapped to the current load
balancer while loading the server.
Returns The algorithm name used to load-balance the list of hosts.
getLoadBalancerDescription
Signature public String getLoadBalancerDescription();
Description
Gets the description of the load-balancing algorithm so it can be displayed
in the QuarkXPress Server Manager client.
Returns Description of the load balancer.
useFileInfo
Signature public Boolean useFileInfo();
Description
Gets a flag that indicates whether the load balancer uses file information to
decide on which host to use.
Returns
True if the fileinfo command should be fired before rendering, otherwise
false.
getAvailableHost
Signature
public QHostProxy getAvailableHost(QHostProxy[] hosts, QCommand
command);
Description
Gets an available host out of the provided list of hosts to execute the
specified command.
Parameters
hosts: List of hosts that should be scanned for the most eligible
host.command: Command for which host is being searched.
Returns Available host. Can be used for next request.
192 | A GUIDE TO QUARKXPRESS SERVER 2020