jbossas/jboss-ejb-client — pull request #40 by jaikiran (2013-04-17 13:28:44+00:00)
Title: [master branch] EJBCLIENT-76 Add support for compressing payload during EJB invocations

The commits here add support for letting users mark certain methods for data compression during EJB invocations.

- Users are expected to use the @org.jboss.ejb.client.annotation.DataCompressionHint to specify the need for compression.
- That annotation can be specified at both class and method levels. Specifying it on class level will make each method eligible for data compression.
- Specifying the annotation on method level will override the corresponding class level annotation (if any).
- This annotation is applicable only for remote business interface view(s) of EJBs.

A typical usage would look like:

import org.jboss.ejb.client.annotation.DataCompressionHint;

...
// remote business interface of an EJB
@DataCompressionHint(data = DataCompressionHint.Data.REQUEST_AND_RESPONSE)
public interface MethodOverrideDataCompressionRemoteView {

@DataCompressionHint(data = DataCompressionHint.Data.RESPONSE)
String echoWithResponseCompress(final String msg);

@DataCompressionHint(data = DataCompressionHint.Data.REQUEST)
String echoWithRequestCompress(final String msg);

String echoWithNoExplicitDataCompressionHintOnMethod(String msg);
}