activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mats Forslöf <Mats.Fors...@portwise.com>
Subject AMQ C#/C++ client refactoring suggestion
Date Mon, 06 Mar 2006 12:05:06 GMT

The marshalling is currently done by a set of stand-alone objects inherited from BaseDataStreamMarshaller
or BaseCommandMarshaller. An alternative design would be to let each command itself be marshall
aware, that is, have them implement a marshalling interface that has two methods; marshal
and unmarshal. One of the parameters to those methods would be OpenWireFormat, the command
calls marshall/unmarshall on the OpenWireFormat object for each command attribute. OpenWireFormat
then performs the actual marshalling by a helper class called DataStreamMarshaller and depending
on what the OpenWireFormat attribute "tightEncoding" is set to OpenWireFormat calls either
tight or loose marshalling.

The benefit of this would be less code and the control of tight/loose marshalling is done
in one place.

Please let me know what you think, I may have missed something that makes this unsuitable.

Regards,
Mats

Mime
View raw message