Implement GatewayManager
GatewayManager is the entry point the agent uses to load your plugin at runtime. It connects all your Handler and HandlerFactory implementations so the agent can discover and call them correctly.
Prerequisites
- All Handler and HandlerFactory classes implemented (see Implement Handlers and Capabilities)
Implement GatewayManager
-
Create a class that implements
GatewayManager. -
For every Handler you implemented, override the corresponding
getXFactorymethod to return a new instance of your HandlerFactory. For example, if you implementedApiDiscoveryHandlerandApiDiscoveryHandlerFactory, overridegetApiDiscoveryHandlerFactoryto returnnew YourApiDiscoveryHandlerFactory(). -
For any Handler you did not implement, you do not need to override the corresponding factory method.
Create the META-INF/services resource file
The agent uses Java's service loader mechanism to find your GatewayManager implementation. You must create the service descriptor file manually.
-
In your project's resources directory, create the path
META-INF/services/. -
Inside that directory, create a file named exactly:
com.boomi.controlplane.agent.api.GatewayManager -
Write the fully qualified class name of your
GatewayManagerimplementation as the only line in the file. For example:com.boomi.controlplane.agent.example.ExampleGatewayManager -
Verify that the
META-INF/servicesdirectory is included when you build your JAR file. If it is missing, the agent will not load your plugin.