To create a service that can be accessed through the ServiceFactory, there are a couple of things that need to be configured, below you will see this process using an example service HelloWorldApi:
Create an interface that extends ExposedApi.
packagecom.my.app @JmxManageable public interface HelloWorldApi extends ExposedApi { @JmxReadable public String getHelloWorldString(); @JmxWritablepublicStringgetHelloWorldString(); @JmxInvocablepublicvoidhelloWorld(); }
If you would like your service to be accessible remotely it needs to support being used via jmx. Attivio provides JMX interactivity to classes which use annotations seen above (used appropriately per method depending on desired type of interactivity)
Create an implementation of your service that you intend to be used at runtime.
If no mock is created, the runtime implementation must be specified in this file so that the ServiceFactory knows what service implementation to use during testing