VCLOperation

From GreenVulcano Wiki
Revision as of 15:28, 16 December 2012 by G.dimaio (talk | contribs) (Created page with "Interface FQN: '''it.greenvulcano.gvesb.virtual.Operation''' ==Following the Operation public methods== <syntaxhighlight lang="java5"> /** * Invoked by OperationFactory when an...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Interface FQN: it.greenvulcano.gvesb.virtual.Operation

Following the Operation public methods

/**
 * Invoked by OperationFactory when an Operation is initialized.
 *
 * @param node
 *        configuration node. The operation should use this node with
 *        XMLConfig in order to read its configuration parameters.
 * @exception InitializationException
 *            if an error occurs during initialization
 */
void init(Node node) throws InitializationException;

/**
 * Execute the operation using a GVBuffer. Usually this method is used in
 * order to call external systems.
 *
 * @param gvBuffer
 *        input data for the operation.
 * @return a GVBuffer containing the operation result.
 * @exception ConnectionException
 *            if an error occurs making the connection to the external system.
 * @exception VCLException
 *            if an error occurs performing the operation.
 * @exception InvalidDataException
 *            if the call fail because the data are invalid. GreenVulcano ESB
 *            should not retry to perform the operation with the same data.
 */
GVBuffer perform(GVBuffer gvBuffer) throws ConnectionException, VCLException, InvalidDataException;

/**
 * Must be always called after 'perform' for execute
 * plug-in specific clean up operation
 */
void cleanUp();

/**
 * Called when an operation is discarded from cache. Here the implementation
 * should release allocated resources.
 */
void destroy();

/**
 * Set the Operation key
 *
 * @param key
 *        the key to set
 */
void setKey(OperationKey key);

/**
 *
 * @return the operation key
 */
OperationKey getKey();

/**
 * Return the alias for the given service
 *
 * @param gvBuffer
 *        the input service GVBuffer
 * @return the configured alias
 */
String getServiceAlias(GVBuffer gvBuffer);