Try OpenEdge Now
skip to main content
Customization Guide
Developing custom Managed Adapters : Sample code of a Managed Adapter
 

Sample code of a Managed Adapter

This code assumes that the Managed Adapter is designed to work with the default Run-time Mapper.

Sample code of Managed Adapter

package com.savvion.sbm.adapters.sample;
import com.savvion.sbm.adapters.framework.*;
import java.util.*;
public class SampleAdapter extends ManagedAdapter {
public void execute() throws Exception {
  // Get the input data
  Hashtable inputs = (Hashtable)input;
  // Log a message
  log(LOG_TRACE,"Got input data...");
  // Prepare the output hashtable
  Hashtable outputHashtable = new Hashtable();
  ... do some processing and populate outputHashtable ...
  // Set the adapter output
  output = outputHashtable;
}}