Developing and Packaging Multiple Adapters
A project in SDK terminology is a bundle that will be packaged and deployed to the traffic manager, and will show up as an OSGi bundle in the traffic manager.
A bundle can either package a single adapter or multiple adapters per user choice. Adapters' boiler plate code can be generated using the adapter creation script.
Developing Multiple Adapters
./create-adapter.sh -p <New adapter project name> -c <New adapter full package name> -a <New Adapter class name>Example
./create-adapter.sh -p DemoProject1 -c com.tibco.apim.examples1 -a DemoAdapter1
./create-adapter.sh -p DemoProject2 -c com.tibco.apim.examples2 -a DemoAdapter2Running the above two commands will create two new projects under the extract location <extract location>/MasheryLocalSDK/ with one adapter class each.
- Multiple adapters per project
- Create a new project with a new adapter class.
./create-adapter.sh -p <New adapter project name> -c <New adapter full package name> -a <New Adapter class name>
- Create an adapter class in same project.
./create-adapter.sh -p <Existing adapter project name> -c <Existing/New adapter full package name> -a <New Adapter class name>
Example./create-adapter.sh -p DemoProject1 -c com.tibco.apim.examples1 -a DemoAdapter1
./create-adapter.sh -p DemoProject1 -c com.tibco.apim.examples1 -a DemoAdapter2
Running these two commands creates a Demo project with two adapter classes in package. com.tibco.apim.examples1.
- Create a new project with a new adapter class.
- Bundling Multiple adapters
Use the build-adapters.sh script to compile; build jars and bundle them as a deployable artifact. The script ensures that the adapters are packaged properly.
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.