[muscle] Muscle 3.11b Java check
- From: Jeremy Friesner <jaf@xxxxxxxxxxxx>
- To: lior@xxxxxxxxxxxxxxxx
- Date: Tue, 28 Feb 2006 15:57:48 -0800
Hi Lior,
I'm getting ready to release muscle 3.11, and as part of that I finally went
through and tested/exercised the changes you made to speed up the Java client
code. The code looks good, but I did make a few minor changes. I've posted
a new archive of the code in its current state, in case you (or anyone else)
would like to check things over before I post the new version. The 3.11-beta
archive is here:
http://www.lcscanada.com/jaf/muscle-3.11b-2-28-2006.zip
Changes I made to the Java code include:
- getMaxIncomingMessageSize() is now an abstract method in the
AbstractMessageIOGateway interface. MessageIOGateway implements the method
to return the value specified by
MessageIOGateway::setMaxIncomingMessageSize(), or to Integer.MAX_VALUE by
default. Maximum-size checks are now done by *Gateway::unflatten() as well
as by the MessageTransceiver class. This way the maximum-size guarantee can
be enforced even in programs that don't use the MessageTransceiver class.
- MessageTransceiver now starts off with a 64KB receive buffer (instead of
2MB). This buffer will of course be resized larger when necessary. When
resizing the buffer, the code now tries to resize the buffer to at least
double the previous size, to minimize the number of resizes necessary.
- MessageTransceiver constructors that take a compressionLevel argument now
also take a maximumIncomingMessageSize argument also. (Pass in
Integer.MAX_VALUE if you don't want any enforced limit)
- TestClient now has two more interactive commands: "big", which sends a 4
megabyte PR_COMMAND_PING Message to the server, to test sending and receiving
of large Messages, and "toobig", which sends an 8 megabyte Message.
TestClient's MessageTransceiver has its incoming Message size limit set to
6MB, so "big" should work but "toobig" should error out, causing the
connection to the server to be dropped.
- Prepended an underscore to some member variables, to keep the code style
consistent.
-Jeremy
Other related posts: