mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter royal <pro...@apache.org>
Subject Re: Adding class types to encoder??
Date Tue, 04 Jul 2006 21:11:36 GMT
On Jul 3, 2006, at 11:43 AM, Trustin Lee wrote:
> On 7/4/06, peter royal <proyal@apache.org> 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.

You can probably just compute that once when adding the mapping to  
save time @ runtime.

-pete


-- 
proyal@apache.org - http://fotap.org/~osi




Mime
View raw message