How to insert a message in the middle of pipeline processing?

"이희승 (Trustin Lee)" trustin at gmail.com
Mon Nov 22 23:05:01 EST 2010


I think you are confusing 'upstream' and 'downstream' - you seem to be
using them in a reversed manner consistently. :-)

Anyway, yeah, you can call Channel.write() from anywhere to write a
message to a peer.

B.L. Zeebub wrote:
> Hi
> 
> Sorry, but back to my client that is talking to a device attached to the
> serial port. The server is sending a stream of commands to the client which
> after procesing through the upstream pipeline writes each message to the
> serial port. The downstream part of the client pipeline reads the responses
> from the serial port and writes them back to the server.
> 
> I now have a need at the client to insert additional commands into the
> upstream pipeline from a handler at specified intervals based on the
> expiration of a timerTask. When the timer expires, the inserted command must
> be the next command in the stream that the serial port sees. I've got all
> the timer code sorted out, I can't work out how to insert the new command
> into the stream. Unless I'm misunderstanding channel.write() seems to add
> the command to the end of the currently queued messages.
> 
> I hope that this makes sense.
> 
> Regards 

-- 
Trustin Lee - http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 290 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20101123/8b8aa272/attachment.bin 


More information about the netty-users mailing list