directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <>
Subject [seda] many reply handlers
Date Tue, 02 Nov 2004 23:13:54 GMT
Hey Trustin,

I was just lookin at the code and it looks like handlers that return 
multiple responses for a request are stubbed out.    I think I left it 
that way back :).  No worries I can cap it off but I want to ask a few 
questions about synchronization first. Take a look here at 

     * Handles the generation and return of multiple responses.
     * @param handler the handler that generates the responses
     * @param request the request responded to
    private void reply( ManyReplyHandler handler, Object request, ClientKey key )
        Object response = null;

            Iterator list = handler.handle(key, request);

            if (handler.isSequential())
                while (list.hasNext())
                    response =;

                    // @todo: need to force serialized response processing
                    // perhaps we need to add an isResponseOrdered or a
                    // response sequence number for multi-part responses
------------------> throw new UnsupportedOperationException("need response serialization");

Basically I would iterate through the list and generate a response event 
for each item.  Each item is a response to the same request.   Now you 
had mentioned some changes to use a queue that orders events in the 
right way so as to return the events back to the client in the order 
they were created for ManyReplyHandlers. 

If I publish these responses off the Iterator above as ResponseEvent 
will the order of event delivery automagically be in the order of event 

Thanks in advance,

View raw message