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 Connection Service

Creating a Custom Connection Service

  1. Extend the service class from the AbstractPluggableConnection.
  2. Set the serviceType attribute ServiceType.CONNECTION in the @Service annotation.
    You can give the name that you give a connection for the connectionTypeName attribute in sources, responders, and analytics. If you set this property, it is assumed that the service requires a connection and it will be validated against the provided type of the connection and the instance will be passed through the setter setConnection().
    The following code is an example of a connection service class that extends the AbstractServiceConnection class:
    @Service(name="cacheconnection", displayName="Cache Connection", description="Connects to a Ehcache provider", configClassName="com.informatica.sdk.samples.analytics.CacheConnection", serviceType=ServiceType.CONNECTION) public class CacheConnection extends AbstractServiceConnection{
    The following example illustrates how to link a connection to a source, analytic, or responder by providing the connectionTypeName:
    @Service(name="getanalytic", displayName="Get Analytic", description="Custom get analytic", configClassName="com.informatica.sdk.samples.analytics.GetAnalytic", connectionTypeName ="cacheconnection", serviceType=ServiceType.ANALYTIC) public class GetAnalytic extends AbstractPluggableAnalytic {
  3. Override the following methods for a connection service:
    • To establish a logical connection and store it within the same service instance, implement the com.informatica.cep.sdk.service.AbstractServiceConnection.allocateConnection() method. The ServiceController framework calls this method after calling all the setters on configurable properties.
    • To return the saved logical connection instance like jdbcTemplate, c3p0 data source, ehcache-manager instance, implement the etc.com.informatica.cep.sdk.service.AbstractServiceConnection.getConnection() method. This returns a java.jang.Object.
    The service using this connection must know how to use this and which class to cast it to.
    • To provide all the connection cleanup logic, implement the here.com.informatica.cep.sdk.Service.destroy() method. The ServiceController framework calls this method while undeploying a connection.

0 COMMENTS

We’d like to hear from you!