Adapters-HowTo

From GreenVulcano Wiki
Revision as of 15:15, 9 October 2012 by Anonymous (talk)
Jump to: navigation, search

This is intended as a mini guide for a developer who wants to create a new adapter for GreenVulcano® ESB.


Plugin and Adapter

Configuration Files

Interfaces methods

The Operation interface has to be implemented each time a new GVVCL object is designed to make a call to an external system. The Node passed to the init() method is the one that we can find in the GVAdapters.xml configuration file. Each time you create an adapter you will add a section (node) into such file, like, for example:

<GVDataHandlerConfiguration name="DH_ENGINE" type="module" version="1.0">

for the DataHandler. The Operation interface has three subinterfaces: CallOperation, EnqueueOperation and DequeueOperation, all defined into it.greenvulcano.gvesb.virtual package. The first one represents a syncronous call, the last two are used when dealing with queues. The main method of these interfaces is perform(), that accepts a GVBuffer as input and returns the same GVBuffer as output. When implementing a new adapter it's important to respect this rule and return the buffer received, after having added into it the data concerning the operation performed. This means that GreenVulcano® ESB core can have access to all input and output data of each operation in a workflow reading the buffer.