For providing plug-in support for proprietary compression implementations, APIs within the public interface Fiorano.jms.services.msg.compression.lCompressionManager have to be implemented. The default CompressionManager interface used by FioranoMQ implements the APIs within this interface. The APIs within the CompressionManager interface are listed below.
This method returns the compressed byte array for the input byte array.
This method returns the decompressed byte array from the input compressed byte array.
This method sets the compression level that is to be used by the CompressionManager instance.
This method retrieves the compression level that is being used by the CompressionManager instance.
This method sets the compression strategy, provided as an input parameter, that is to be used by the CompressionManager instance.
This method retrieves the compression strategy being used by the CompressionManager instance.
This method retrieves the ratio of the compression achieved, which is expressed as a percentage.
The proprietary CompressionManager interface is called upon by setting its name in the ConnectionFactoryMetadata class. The ConnectionFactoryMetadata class is used to create new ConnectionFactory objects using the Admin Connection. The proprietary CompressionManager implementation is applied to messages sent on connections that have been created using the ConnectionFactory object for which proprietary ConnectionManager is set.
For more information about the methods present in ConnectionFactoryMetadata, refer to the ConnectionFactoryMetadata class present in the Java docs.
This API sets the CompressionManager class name that is to be used for message compression . The default value of the CompressionManager is Fiorano.jms.services.msg.compressionManagerImpl.
For example, if the new implementation is named Fiorano.jms.services.compression.mycomp.MyCompressionManager, the above API for a connection factory metadata object cfMD will be called upon using:
cfMD.setCompressionManager ("Fiorano.jms.services.compression.mycomp.MyCompressionManager").
This API is used to retrieve the CompressionManager instance that is being used by a Connection Factory object.