Table of Contents

Search

  1. Preface
  2. RulePoint Interfaces
  3. RulePoint Services
  4. Custom Service API
  5. Java Adapter for REST API
  6. RulePoint REST API
  7. Sample XML and JSON Requests and Responses
  8. RulePoint Pluggable Authentication Module
  9. HTTP Request and Response Attributes

Developer Guide

Developer Guide

Creating a Custom Responder Service

Creating a Custom Responder Service

  1. Create a service class that extends from the AbstractPluggableResponder class.
  2. Mark the service class with the @Service annotation. Set the serviceType in @Service to ServiceType.RESPONDER.
    The following code is an example of a service class that extends the AbstractPluggableResponderclass:
    @Service(name="RecorderResponder", displayName = "Recorder Responder", configClassName = "com.informatica.sdk.samples.responses.RecorderResponder", description = "This responder can be used to record the number of executions for a chunk size", serviceType = ServiceType.RESPONDER) public class RecorderResponder extends AbstractPluggableResponder implements ThreadSafe {
  3. Implement the following methods to write a custom responder:
    • com.informatica.cep.sdk.service.AbstractResponder.configure(Properties): Implement this method first to add a custom configuration property to the user interface. The ServiceController framework calls this method during deployment of the responder. Properties argument to the function sets the required instance variables with the user-provided values for configurable properties that have a valid @ServiceProperty annotation on their getters.
    • com.informatica.cep.sdk.Responder.respond(Response): This method provides the logic for the response. The Response object passed includes information about the activation, such as the event data and response parameters. The respond() method calls the responder controller whenever it receives an activation.
    • com.informatica.cep.sdk.service.AbstractResponder.destroy():The ServiceController framework calls this method while undeploying the responder.

0 COMMENTS

We’d like to hear from you!