On 7/4/06, peter royal <[EMAIL PROTECTED]> wrote:
On Jun 29, 2006, at 1:49 PM, Samuel Doyle wrote: > Any way I can make it so that I don't have to add every specific > instance of a message I want to encode to the types list in my > encoder? > > I would basically just like a base class and have that as the only > type in my encoder types. Sorry for the delay, I was traveling back to NYC from Dublin :) You're using the DemuxingProtocolCodecFactory? I'd recommend just making your own factory that has the logic that you want.
I think we can do this using the reflection API climbing up the class hierarchy and interface list. Of course, there will be overhead of extra memory allocation because backtracking algorithm should be used for it. I can implement it very easily though because I have an experience about it. Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP key fingerprints: * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
