Creating a subscription notifier implementation class

Your subscription notifier implementation class contains code that processes event notifications that have been triggered from a WSRR Subscription object.

About this task

To create a subscription notifier implementation class, carry out the following steps:

Procedure

  1. Open your chosen Java™ development tooling environment.
  2. Create a new Java project, with a name of your choice.
  3. Add ServiceRegistryClient.jar to the project build path. ServiceRegistryClient.jar is located in the <WSRR_HOME> directory; this is the directory in which you installed the WSRR files.
  4. Create a Java class that implements the com.ibm.serviceregistry.subscriptionnotifier.Plugin interface.
  5. Implement the following methods, to define the actions that your subscription notifier implementation class performs:
    Method Description
    public boolean processEvent(SubscriptionNotifierEvent event); Process an event from the WSRR JMS subscription queue, in non-batch mode.
    public boolean processEvents(SubscriptionNotifierEvent[] events); Process events from the WSRR jms subscription queue, in batch mode; that is, multiple messages.
    public void release(); Release system resources held by the plug-in after events have been processed.
    public void updateConfig(SubscriptionNotifierPluginConfigObject pluginConfig); Update the plug-in configuration after a configuration change.
    public String validateConfig(SubscriptionNotifierPluginConfigObject pluginConfig); Validate the configuration data associated with this plug-in class.
    public boolean supportsBatchNotify(); Determine whether the plug-in supports batch notification; that is, the processEvents() method.
  6. Export your project to a JAR file.
  7. Load your JAR file into WSRR; see Loading a subscription notifier JAR file.