Edge Data Streaming
- Edge Data Streaming 2.5.0
- All Products
package ...; import java.io.IOException; import java.nio.ByteBuffer; import com.informatica.vds.api.VDSConfiguration; import com.informatica.vds.api.VDSEvent; import com.informatica.vds.api.VDSTarget; public class CustomTarget implements VDSTarget { @Override public void close() throws IOException { /* Close the connection to the target and clean up. */ ... } /* Initialize the VDSTarget object. */ @Override public void open(VDSConfiguration vdsconfiguration) throws Exception { /* The internal name of the key. */ String fieldName = "TargetURLFromUI"; /* The default value for the key. */ String defaultValue = "TargetURLDefault"; /* Retrieve the value of the key TargetURLFromUI. */ String TargetURL = vdsconfiguration.optString(fieldName, defaultValue ); /* Similarly, retrieve other keys. */ ... /* Create or initialize the target by using the configuration * information. */ ... } /* Get data and write the data to the target. */ @Override public void write(VDSEvent vdsevent) throws Exception { /* Get data and collect it in a byte array. */ ByteBuffer bytebuff = vdsevent.getBuffer(); byte[] bytearr = new byte[vdsevent.getBufferLen()]; bytebuff.get(bytearr); /* Write the data to the target. */ ... } @Override public void setRetryPolicyHandler(IPluginRetryPolicy arg0) { // TODO Auto-generated method stub } }