I. Configuring the REST Connector
- Add dependency to net.anotheria.moskito-core.2.2.3 into pom.xml of the client app.
Create the rest-connector.json file. Add the following lines into it:
rest-connector.json{ host: "localhost", port: 8080, resourcePath: "/moskito-central/central/addSnapshot", }
In these lines, host and port correspond to host and port of the HTTP server where REST Endpont is running.
Open moskito.json and add the following lines into plug-ins array:
moskito.json{ "name": "RESTRemoteCentralConnector", "configurationName": "rest-connector", "className": "net.anotheria.moskito.central.connectors.rest.RESTConnector", },
In these lines, the "rest-connector" entry should be substituted by the name of REST Connector JSON file, created in Step 2.
II. Starting the REST Endpoint
Initiate moskito-central with war:war.
For example:mvn clean install war:war
- Start the Tomcat server and place <moskito-central>/target/moskito-central-[version].war into <tomcat-root>/webapps folder.
III. Configuring the DiMe Connector.
- Add dependency to net.anotheria.moskito-core.2.2.3 into pom.xml of the client app.
Create he dime-connector.json file. Add the following lines into it:
dime-connector.json{ connectorHost: "localhost", connectorPort: 9249, }
In these lines, host and port correspond to host and port of DistributeMe RMI service.
Open moskito.json file and add the following lines into plug-ins array:
moskito.json{ "name": "DiMeCentralConnector", "configurationName": "dime-connector", "className": "net.anotheria.moskito.central.connectors.dime.DiMeCentralConnector", },
In these lines, the "dime-connector" entry should be substituted by the name of DiMe Connector JSON file, configured in Step 2.
IV. Starting the RMI Endpoint service.
Initiate moskito-central with "jar-with-service" profile, like the following:
mvn clean install -Pjar-with-service
It will prepare the JAR file that can be started with java -jar utility.
We suppose that you will start it with local RMI registry and will use the following environment variables:
-DlocalRmiRegistryPort=9249 -DskipCentralRegistry=true.
Below is the example of starting the service:
java -DlocalRmiRegistryPort=9249 -DskipCentralRegistry=true -jar moskito-central-[version].jar