+

Search Tips   |   Advanced Search

Implement and declare the binder in a Java project

This section describes how to implement and declare the binder of the Data Format Extension API in a Java project. It is necessary to read Create a Java project to implement the Data Format Extension API beforehand.

In Eclipse, a new Java project must be created to implement the public Codec API. A new META-INF/services sub-directory must be created in the src directory.

In the META-INF/services sub-directory, a file called com.neotys.extensions.codec.AbstractBinder must be created.

Below src, a Java package must be created with a custom name, e.g. com.neotys.codec.sample.

An implementation of the com.neotys.extensions.codec.AbstractBinder abstract class must be created in the new Java package.

The Name of the new Java Class is free, e.g. MyBinder.

A click on Finish validates the project.

For more information about the implementation of the class com.neotys.extensions.codec.AbstractBinder, it is useful to read its Javadoc.

The com.neotys.extensions.codec.AbstractBinder must be declared in META-INF/services/com.neotys.extensions.codec.AbstractBinder. The file must be edited and the line com.neotys.codec.sample.MyBinder must be inserted.

The MyBinder declaration is finished. MyBinder can be detected now by NeoLoad as an implementation of com.neotys.extensions.codec.AbstractBinder. The bindings defined in MyBinder can be used by NeoLoad.

  1. Create a Java project to implement the API.
  2. In the src directory, create a META-INF/services sub-directory.
  3. In META-INF/services, create a file com.neotys.extensions.codec.AbstractBinder.
  4. Create a Java package.
  5. In the Java package, create an implementation of the abstract class com.neotys.extensions.codec.AbstractBinder.
  6. To declare the class, edit the file com.neotys.extensions.codec.AbstractBinder and insert a line with the name of the Java package.

    NeoLoad can now detect the Binder as a implementation of com.neotys.extensions.codec.AbstractBinder.


Home