A serialization strategy decides in which extent EJServer und EJClient will undertake the task of serialization.
With default serialization enabled all objects will get serialized before they
import de.netseeker.ejoe.EJClient; import de.netseeker.ejoe.EJConstants; ... EJClient client = new EJClient(...); client.setAdapterStrategy( EJConstants. ADAPTER_STRATEGY_DEFAULT ); ...
EJClient offers the option to return the serialized form of a server response instead of deserialized responses. This makes sense if
import de.netseeker.ejoe.EJClient; import de.netseeker.ejoe.EJConstants; ... EJClient client = new EJClient(...); client.setAdapterStrategy( EJConstants. ADAPTER_STRATEGY_MIXED ); ...
If both, ServerHandler and client application, are able to handle requests and responses in the form of java.nio.ByteBuffer, it could make sense to disable serialization by EJOE. No serialization is required to exchange java.nio.ByteBuffer over netork.
The direct serialization strategy is represented with the constant ADAPTER_STRATEGY_DIRECT within the class de.netseeker.ejoe.EJConstants .
import de.netseeker.ejoe.EJClient; import de.netseeker.ejoe.EJConstants; ... EJClient client = new EJClient(...); client.setAdapterStrategy( EJConstants. ADAPTER_STRATEGY_DIRECT ); ...