mHUB - REST Service - Configuration


Basic configuration


The Windows Service runs the Java component via matchITHubService.bat, which can be found in the "service" subfolder of the matchIT Hub Service installation directory. For example:

set JAVA="C:\Program Files\Java\jdk8\bin\java.exe"
%JAVA% -jar .\matchITHubService.jar localhost:8080

The installer will configure the Java path and prompt for the host setting (see host below for more details).

As an alternative to running the Windows Service, you can run matchITHubService.bat from a command prompt. This can be useful to see debug output to the console.



The Linux package includes both 32-bit and 64-bit versions of the service in the subfolders: "service/x86" & "service/x64". These folders contain a shell script,, for running the service. For example:


${JDK}/java -Djava.library.path=./:/libstdc++ -jar ./matchITHubService.jar

The default host and port that the service listens on is localhost:8080 you can override this default by specifying host and port on the command line as shown in the example above (see host below for more details).

There is also an example script for running the service as a daemon:

nohup ./ >./matchITHubService.log 2>&1 &

To stop the service send the following http delete command:

curl -X DELETE http://localhost:8080/matchITHub


You can check the status of a sevice by opening this URL in a web browser: http://localhost:8080/matchITHub/status




Advanced configuration

Advanced configuration options can be controlled via an xml configuration file. To use a configuration file, specify "-config=<filename>", e.g.

java -jar ./matchITHubService.jar -config=myconfig.xml

Here's an example configuration for the matchIT Hub Service:

<?xml version="1.0" encoding="UTF-8"?>


You can configure host and port either via a parameter on the command line, or via the host setting in the config file. You will probably want to change localhost to the ip address or host name of the machine if you intend to access the service across the network. You can also change the port if the default port of 8080 is already in use or otherwise unsuitable on your system.

The default protocol is http, to use https you can specify this as part of the host setting, e.g. "". If you specify https you also need to configure keystoreLocation and keystorePassword.


keystoreLocation & keystorePassword

To use https (HTTP over SSL) you need an SSL Certificate and keystore repository to store it in.

You create a keystore file and a keystore password while you generate an SSL Certificate, i.e.

keytool -genkeypair -alias "alias" -keyalg RSA -keystore keystore-location -storepass keystore-password

To create a self-signed certificate:

keytool -export -alias "alias" -rfc -keystore keystore-location > certificate-location

If you want to use a Certificate signed by a Certifying Authority, refer to Oracle's documentation for "Creating a Keystore File and Keystore Password for HTTPS Connections", and follow the procedure to submit the Certificate to the Certifying Authority to be signed.



The /matchITHub/engines/<engine>/results method returns a text/plain block of records. By default the data is not compressed, specify a compressionMinSize other than 0 to cause results packets over the specified size to be compressed using gzip.