2015

Table Of Contents
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
command: Command for which host is being searched.
Available host. Can be used for next request.Returns
Next:
1
Make a jar for the load balancer.
2
Deploy the jar to the following folder: [QXPSM_HOME]/dependencies
3
To configure "ManagerContainerConfig.xml" for bean mapping, first navigate to
[QXPSM_HOME]/conf .
4
Open the "ManagerContainerConfig.xml" file and look for the XML tag bean whose
id has the value ConfigurationManager.
5
Within that tag find the property name availableLoadBalancers.
6
In the <list> tag, add the following: <ref bean=[your newbeanID]/>
A GUIDE TO QUARKXPRESS SERVER 2015 | 173
USING QUARKXPRESS SERVER