Implementing the interface - 8.0

Talend ESB Service Developer Guide

Version
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade
Last publication date
2023-11-06

Because the SEI is a standard Java interface, the class that implements it is just a standard Java class. If you started with a Java class you will need to modify it to implement the interface. If you are starting fresh, the implementation class will need to implement the SEI.

The below shows a class for implementing the above interface. .

Implementation for SEI

package org.apache.cxf;

import java.util.*;

public class StockQuoteReporter implements QuoteReporter {
   ...
   public Quote getQuote(String ticker) {
      Quote retVal = new Quote();
      retVal.setID(ticker);
      retVal.setVal(Board.check(ticker));[1]
      Date retDate = new Date();
      retVal.setTime(retDate.toString());
      return(retVal);
   }
}