mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: Use another Object type with TextLineEncoder
Date Tue, 16 Aug 2016 17:42:02 GMT
There is a good reason for this codec name ti be *text*LineCodecFactory :-)

Le mardi 16 août 2016, Simo Chiegang, Boris Arthur <
Boris.Simo@heidelberg.com> a écrit :

> Hi,
>
> I have a Client that use a TextLineCodecFactory to send Message.
> So I think normally I must sometimes like that when I want to send a
> Message:
>
> ioSession.write(message); // where message is from type String
>
> Now, can I do something like that inside ?
> ioSession.write(request) // where request is an Object of a class
> "JSONRPCRequest"
>
> I asked because, I'm trying to send some big message:
>
> log.debug(req);
> //output:  {"method":"SetBandingProfile","id":322,"Client_ID":"LVIS","
> params":{"ColPack":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Package":33},"jsonrpc"
> :"2.0","Protocol":"2H"}
>
> ioSession.write(req);
>
> Now the Encoder (TextLineEncoder) received the message and I also made an
> output :
> //output
> {"method":"SetBandingProfile","id":322,"Client_ID":"LVIS","
> params":{"ColPack":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
> 0,0,0,0,0,{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}
> ,{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}
> ,{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}
> ,{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],"Package":
> {}},"jsonrpc":"2.0","Protocol":"2H"}
>
> My message become unaivalable.
>
> When use TextLineCodecFactory, it's recommend to send only String?
>
>
> Best Regards
> Boris
>
> ________________________________
>
> Confidentiality note:
> The information in this email and any attachment may contain confidential
> and proprietary information of Heidelberger Druckmaschinen AG and/or its
> affiliates and may be privileged or otherwise protected from disclosure. If
> you are not the intended recipient, you are hereby notified that any
> review, reliance or distribution by others or forwarding without express
> permission is strictly prohibited and may cause liability. In case you have
> received this message due to an error in transmission, we kindly ask you to
> notify the sender immediately and to delete this email and any attachment
> from your system.
>


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message