mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven E. Harris" <...@panix.com>
Subject IoSession-level synchronization of ProtocolEncoder/ProtocolDecoder pair
Date Tue, 09 Jan 2007 17:17:10 GMT
I'm using a ProtocolEncoder and ProtocolDecoder pair supplied to a
ProtocolCodecFilter, and am wondering whether the
ProtocolEncoder.encode() and ProtocolDecoder.decode() methods will
ever be called on concurrently for the same IoSession. That is, is it
possible that an encoder is writing at the same time a decoder is
reading?

The question arises because the network protocol permits
pipelining. The decoder side may see an error signaled by its peer,
and wish to notify the encoder side to stop writing requests on this
connection/session; hence the encoder and decoder communicate. Should
I assume that this communication between encoder and decoder may be
happening between separate threads, or can I assume that the encoder
and decoder are never used concurrently, at least for a given
IoSession?

-- 
Steven E. Harris

Mime
View raw message