Step 1: Creating an Adapter Project

Describes how to create an adapter project.

Pre/post processor

Procedure

  1. To create an adapter project, use the create-adapter script in the terminal or command prompt.
    • Command for Linux/MacOS X :
      /home/user/MasheryLocalSDK$ ./create-adapter.sh --project-name MyCustomAdapter --adapter-type TrafficEventListener --adapter-name MyCustomProcessor --package-name com.companyname.apim.adapter
      
    • Command for MS Windows :
      C:\Users\Administrator\MasheryLocalSDK> create-adapter.bat --project-name MyCustomAdapter --adapter-type TrafficEventListener --adapter-name MyCustomProcessor --package-name com.companyname.apim.adapter
      
  2. Change the project name, adapter name and package name.
    Running the script for first time downloads the necessary gradle binaries.
  3. Open the Java source MyCustomProcessor.java in a text editor and write the processing logic for pre and post processing.

Custom Authenticator

Procedure

  1. To create a project, use the create-adapter script in the terminal or command prompt.
    • Command for Linux/MacOS X :
      /home/user/MasheryLocalSDK$ ./create-adapter.sh --project-name MyCustomAdapter --adapter-type Authenticator --adapter-name MyCustomAuthenticator --package-name com.companyname.apim.adapter
      
    • Command for MS Windows :
      C:\Users\Administrator\MasheryLocalSDK> create-adapter.bat --project-name MyCustomAdapter --adapter-type Authenticator --adapter-name MyCustomAuthenticator --package-name com.companyname.apim.adapter
      
  2. Change the project name, adapter name and package name.
    Running the script for first time downloads the necessary gradle binaries.
  3. Open the Java source MyCustomProcessor.java in a text editor and implement authenticator logic.
    Note: To edit in an IDE, refer to Using the Adapter SDK in an IDE.