org.jppf.data.transform
Interface JPPFDataTransform


public interface JPPFDataTransform

This is the interface for arbitrary transformation and reverse-transformation of blocks of data that transit through the network.

Among others, this permits encryption of the data, allowing a measure of security on the grid.

Tranformations are transparent to the JPPF user, as they are only applied just before data is sent to the network, and right after it is read by the remote peer.

Author:
Laurent Cohen
See Also:
JPPFDataTransformFactory

Method Summary
 void unwrap(InputStream source, OutputStream destination)
          Transform a block of data into another, reverse-transformed one.
 void wrap(InputStream source, OutputStream destination)
          Transform a block of data into another, transformed one.
 

Method Detail

wrap

void wrap(InputStream source,
          OutputStream destination)
          throws Exception
Transform a block of data into another, transformed one. This operation must be such that the result of unwrapping the data of the destination must be the same as the source data.

Parameters:
source - the input stream of data to transform.
destination - the stream into which the transformed data is written.
Throws:
Exception - if any error occurs while transforming the data.

unwrap

void unwrap(InputStream source,
            OutputStream destination)
            throws Exception
Transform a block of data into another, reverse-transformed one. This method is the reverse operation with regards to wrap(java.io.InputStream, java.io.OutputStream). This operation must be such that the result of this.unwrap(this.wrap(data)) is equal to data.

Parameters:
source - the input stream of data to reverse-transform.
destination - the stream into which the reverse-transformed data is written.
Throws:
Exception - if any error occurs while transforming the data.


Copyright © 2005-2010 JPPF Team.