You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Bernd Fondermann <bf...@brainlounge.de> on 2012/03/21 17:42:36 UTC

Re: svn commit: r1302264 - in /mina/vysper/trunk: ./ nbxml/src/main/java/org/apache/vysper/xml/decoder/ nbxml/src/main/java/org/apache/vysper/xml/sax/impl/ nbxml/src/test/java/org/apache/vysper/xml/sax/impl/ nbxml/src/test/java/org/apache/vysper/xml/sax/pe...

Some thoughts and questions regarding this change.
Interface XMLElementListener now has a close() method. So far, so good.

But why do notable implementations like MinaStanzaListener and 
WebSocketBackedSessionContext record the 'closed' state, but beyond that 
do not honour it? I suggest they should simply stop whatever they do.
Another way to go (and I'd prefer that ATM) would be to move close(), 
isClosed() down to MinaStanzaListener. It is not needed anywhere else.

   Bernd

On 19.03.12 04:09, foodmike@apache.org wrote:
> Author: foodmike
> Date: Mon Mar 19 03:09:21 2012
> New Revision: 1302264
>
> URL: http://svn.apache.org/viewvc?rev=1302264&view=rev
> Log:
> Fix to address VYSPER-18. Modifications to XML parsing/handling in order to recognize and act on stream close events. This fix adds a closed flag to the XMLElementListener that allows the XMPPDecoder to determine when a stream is closed.

Re: svn commit: r1302264 - in /mina/vysper/trunk: ./ nbxml/src/main/java/org/apache/vysper/xml/decoder/ nbxml/src/main/java/org/apache/vysper/xml/sax/impl/ nbxml/src/test/java/org/apache/vysper/xml/sax/impl/ nbxml/src/test/java/org/apache/vysper/xml/sa...

Posted by Mike Mahoney <mi...@thingworx.com>.
On Mar 21, 2012, at 12:42 PM, Bernd Fondermann wrote:

> But why do notable implementations like MinaStanzaListener and 
> WebSocketBackedSessionContext record the 'closed' state, but beyond that 
> do not honour it? I suggest they should simply stop whatever they do.

So, basically no protocolDecoder.write(element) call if the state is closed?  That makes sense, but since a new MinaStanzaListener is created on every pass through doDecode, does it matter?

> Another way to go (and I'd prefer that ATM) would be to move close(), 
> isClosed() down to MinaStanzaListener. It is not needed anywhere else.

This makes sense.  I'll move it out of XMLElementListener and only implement it in MinaStanzaListener.

-Mike