Try OpenEdge Now
skip to main content
Managed Adapters Guide
Understanding the Managed Adapter framework : Framework components : Supported APIs : 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.
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;
}
}