Writing a Provider in Java

The pojoProvider server facilitates writing providers in Java. It exposes abstract classes through the pojoProvider-api JAR that needs to be extended to implement providers and their events. The provider has to only implement logic to process data coming from external services and subsequently generate appropriate event data. The registration of providers with the Expresso server, and the maintenance of subscriptions and unsubscriptions for events is handled by the pojoProvider server internally. The pojoProvider server communicates both with the Expresso server as well as external services that want to send data to concerned providers.

The pojoProvider server saves the event-specific subscriber data in the .expressoprovider folder created in your home directory. This is useful when you restart the pojoProvider server. It helps resume functioning from the last-left state. That is, if the pojoProvider server is restarted even when there are existing subscriptions, the server can resume functioning when it is started again.

A provider can be written in Java using the pojoProvider-api.jar shipped along with Expresso. Writing a provider in Java consists of two steps:

  1. Adding configuration data as per user requirements for the provider that is to be written in the pojoprovider.properties file located in:

    %TIBCO_EXPRESSO_PROVIDERS_HOME_ESC%/pojo/config/pojoprovider.properties

  2. Implementing the POJO provider in Java with the help of two abstract classes found in the pojoProvider-api.jar:
    • AbstractExpressoProvider: a class needs to extend this abstract class to create a Java provider.
    • AbstractExpressoEvent: a class needs to extend this abstract class to create an event for a provider.