No you can't unfortunately but you can just create a class that copies 
TextLineCodecFactory and change the delimiters used in the constructor like 
this for example (i stripped the methoids which were strictly identical to 
TextLineCodecfactory ones)

public class SMTPCodecFactory implements ProtocolCodecFactory
{
...

    /**
     * Creates a new instance with the specified [EMAIL PROTECTED] Charset}.
     */
    public SMTPCodecFactory( Charset charset )
    {
        encoder = new TextLineEncoder( charset, LineDelimiter.WINDOWS ); <-- 
Put the delimiter you want
        decoder = new TextLineDecoder( charset, LineDelimiter.WINDOWS ); <-- 
Put the delimiter you want
    }

 ...

}

Cheers,
-Edouard De Oliveira-

----- Message d'origine ----
De : Ahmed Al-Obaidy <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Lundi, 9 Juillet 2007, 14h10mn 00s
Objet : Re: Windows Telnet and GPRS clients

So what you are suggesting...

can I tell TextLineCodecFactory to use different LineDelimiter?? or should I 
write new codec from scratch??

Eero Nevalainen <[EMAIL PROTECTED]> wrote: 

Ahmed Al-Obaidy wrote:
>> Even more, when tracking devices connect the server... the messages appear
>> in the Log.. but the IoHandlerAdapter never catch the messages events...
>> the output look like this
>>
>> Tracking Gateway server started.
>> 57453 [SocketAcceptorIoProcessor-0.0] INFO ConnHandler -
>> [/213.139.63.254:3599] CREATED
>> 57469 [AnonymousIoService-1] INFO ConnHandler - [/213.139.63.254:3599]
>> OPENED
>> 58859 [AnonymousIoService-2] INFO ConnHandler - [/213.139.63.254:3599]
>> RECEIVED: HeapBuffer[pos=0 lim=102 cap=8192: 33 35 33 35 37 39 30 31 34 38
>> 34 32 33 36 39 2C 30 35 2A 38 32 37 2C 30 30 30 2C 50 54 33 33 2C 56 2C 30
>> 30 30 30 2E 30 30 30 30 2C 4E 2C 30 30 30 30 30 2E 30 30 30 30 2C 45 2C 30
>> 30 30 2E 30 2C 30 30 30 2E 30 2C 30 30 2E 30 2C 30 30 3A 30 30 3A 31 37 20
>> 30 36 2D 30 31 2D 38 30 2C 32 2E 32 31 2C 39 39 0D]
>> 78672 [AnonymousIoService-3] INFO ConnHandler - [/213.139.63.254:3599]
>> RECEIVED: HeapBuffer[pos=0 lim=102 cap=8192: 33 35 33 35 37 39 30 31 34 38
>> 34 32 33 36 39 2C 30 35 2A 38 32 37 2C 30 30 30 2C 50 54 33 33 2C 56 2C 30
>> 30 30 30 2E 30 30 30 30 2C 4E 2C 30 30 30 30 30 2E 30 30 30 30 2C 45 2C 30
>> 30 30 2E 30 2C 30 30 30 2E 30 2C 30 30 2E 30 2C 30 30 3A 30 30 3A 34 39 20
>> 30 36 2D 30 31 2D 38 30 2C 32 2E 32 31 2C 39 39 0D]

Well the hexdump only shows the 'carriage return' character at the 
end(CR 0x0D) so my guess is the textlinedecoder is still waiting for the 
'line feed' character (LF 0x0A).

-Eero Nevalainen


       
---------------------------------
Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.




      
_____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail

Reply via email to