ProtocolCodecFilter and private getDecoder(IoSession) method

2010-02-18 Thread Norman Maurer
Hi all,

why is this method declared private ?


/**
 * Get the decoder instance from a given session.
 *
 * @param session The associated session we will get the decoder from
 * @return The decoder instance
 */
private ProtocolDecoder getDecoder(IoSession session) {
return (ProtocolDecoder) session.getAttribute(DECODER);
}


The getEncoder method is declared public.

Bye,
Norman


Re: ProtocolCodecFilter and private getDecoder(IoSession) method

2010-02-19 Thread Emmanuel Lecharny

On 2/18/10 6:57 PM, Norman Maurer wrote:

Hi all,
   

Hi Norman,

why is this method declared private ?


 /**
  * Get the decoder instance from a given session.
  *
  * @param session The associated session we will get the decoder from
  * @return The decoder instance
  */
 private ProtocolDecoder getDecoder(IoSession session) {
 return (ProtocolDecoder) session.getAttribute(DECODER);
 }


The getEncoder method is declared public.
   
I don't know what version of MINA you are refering to, nor which class 
(we have 20 references for this method in the whole MINA code), but in 
trunk, there are no such private method anymore.


Blind guess : at some point, someone did something wrong and someone 
else fixed it. I may have been the two persons ;)

Bye,
Norman

   



--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com




Re: ProtocolCodecFilter and private getDecoder(IoSession) method

2010-02-19 Thread Norman Maurer
I refer to the ProtocolCodecFilter class in MINA 2.0-RC1.

Bye,
Norman

2010/2/19 Emmanuel Lecharny :
> On 2/18/10 6:57 PM, Norman Maurer wrote:
>>
>> Hi all,
>>
>
> Hi Norman,
>>
>> why is this method declared private ?
>>
>>
>>     /**
>>      * Get the decoder instance from a given session.
>>      *
>>      * @param session The associated session we will get the decoder from
>>      * @return The decoder instance
>>      */
>>     private ProtocolDecoder getDecoder(IoSession session) {
>>         return (ProtocolDecoder) session.getAttribute(DECODER);
>>     }
>>
>>
>> The getEncoder method is declared public.
>>
>
> I don't know what version of MINA you are refering to, nor which class (we
> have 20 references for this method in the whole MINA code), but in trunk,
> there are no such private method anymore.
>
> Blind guess : at some point, someone did something wrong and someone else
> fixed it. I may have been the two persons ;)
>>
>> Bye,
>> Norman
>>
>>
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.nextury.com
>
>
>


Re: ProtocolCodecFilter and private getDecoder(IoSession) method

2010-02-19 Thread Emmanuel Lécharny

On 2/19/10 10:34 AM, Norman Maurer wrote:

I refer to the ProtocolCodecFilter class in MINA 2.0-RC1.
   

Hmmm... There is no such getDecoder() methd in this class !

--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com