Package org.apache.cxf.jaxrs.impl

Examples of org.apache.cxf.jaxrs.impl.AsyncResponseImpl


        if (responseList != null) {
            return responseList;
        }
        AsyncResponse asyncResp = exchange.get(AsyncResponse.class);
        if (asyncResp != null) {
            AsyncResponseImpl asyncImpl = (AsyncResponseImpl)asyncResp;
            asyncImpl.prepareContinuation();
            try {
                asyncImpl.handleTimeout();
                return handleAsyncResponse(exchange, asyncImpl);
            } catch (Throwable t) {
                return handleAsyncFault(exchange, asyncImpl, t);
            }
        }
View Full Code Here


            params = new MessageContentsList(request);
        }

        Object result = null;
        ClassLoaderHolder contextLoader = null;
        AsyncResponseImpl asyncResponse = null;
        try {
            if (setServiceLoaderAsContextLoader(inMessage)) {
                contextLoader = ClassLoaderUtils
                    .setThreadContextClassloader(resourceObject.getClass().getClassLoader());
            }
            if (!ori.isSubResourceLocator()) {
                asyncResponse = (AsyncResponseImpl)inMessage.get(AsyncResponse.class);
            }
            result = invoke(exchange, resourceObject, methodToInvoke, params);
            if (asyncResponse != null) {
                if (!asyncResponse.suspendContinuationIfNeeded()) {
                    result = handleAsyncResponse(exchange, asyncResponse);
                } else {
                    providerFactory.clearThreadLocalProxies();
                }
            }
        } catch (Fault ex) {
            Object faultResponse;
            if (asyncResponse != null && !asyncResponse.suspendContinuationIfNeeded()) {
                faultResponse = handleAsyncFault(exchange, asyncResponse, ex.getCause());   
            } else {
                faultResponse = handleFault(ex, inMessage, cri, methodToInvoke);
            }
            return faultResponse;
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxrs.impl.AsyncResponseImpl

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.