Package org.xlightweb.HttpUtils

Examples of org.xlightweb.HttpUtils.BodyCompeleteListenerInfo


    private final class CompleteListeners extends AbstractListeners<IBodyCompleteListener> {
       
        @Override
        void onCall(final IBodyCompleteListener listener) throws IOException {
           
            BodyCompeleteListenerInfo info = HttpUtils.getBodybodyCompeleteListenerInfo(listener);
           
            if (info.isUnsynchronized()) {
                listener.onComplete();
               
            } else {
               
                Runnable task = new Runnable() {
                    public void run() {
                        try {
                            listener.onComplete();
                        } catch (IOException ioe) {
                            if (LOG.isLoggable(Level.FINE)) {
                                LOG.fine("[" + getId() + "] Error occured by calling complete listener " + listener + " " + ioe.toString());
                            }
                            destroy(ioe.toString());
                        }
                    }
                };
               
                if (info.isMultithreaded()) {
                    getExecutor().processMultithreaded(task);
                } else {
                    getExecutor().processNonthreaded(task);
                }
            }
View Full Code Here

TOP

Related Classes of org.xlightweb.HttpUtils.BodyCompeleteListenerInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.