I'm looking for a method that will let my server application drive the
SAX parser as data is received from a JDK 1.4 SocketChannel.  I looked
at the Xerces pull parser, but my understanding is that this model still
requires a blocking stream to read from.  Is there anything available
that would enable me to do something like:

open selector
register server socket channel with selector
loop
        select
        iterate over accept keys
                accept client socket channel
                instantiate parser for accepted channel
                register accepted channel with selector
        iterate over read keys
                send available bytes to associated parser, which
triggers SAX events

maybe with an interface like:

public interface AsynchronousParser
{
        void setHandler(org.xml.sax.helpers.DefaultHandler handler);
        void parseBytes(ByteBuffer byteBuffer);
}

If there's currently no way to do this, should I repost to the dev
mailing list?

Thanks!

--

Nick Barratt ([EMAIL PROTECTED])
Software Architect
Akiva Corp (http://www.akiva.com)
Akiva - Idea Technologies


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to