Examples of UseAsyncMethod


Examples of org.apache.cxf.annotations.UseAsyncMethod

                                           Class<?> serviceObjectClass) {
        // If class implements Provider<T> interface, use overriden method from service object class
        // to check UseAsyncMethod annotation
        Method mso = getProviderServiceObjectMethod(mOriginal, serviceObjectClass);
       
        UseAsyncMethod uam = mso.getAnnotation(UseAsyncMethod.class);
        if (uam != null) {
            BindingOperationInfo bop = ex.getBindingOperationInfo();
            Method ret = bop.getProperty(ASYNC_METHOD, Method.class);
            if (ret == null) {
                Class<?> ptypes[] = new Class<?>[mso.getParameterTypes().length + 1];
                System.arraycopy(mso.getParameterTypes(), 0, ptypes, 0, mso.getParameterTypes().length);
                ptypes[mso.getParameterTypes().length] = AsyncHandler.class;
                try {
                    ret = mso.getDeclaringClass().getMethod(mso.getName() + "Async", ptypes);
                    bop.setProperty(ASYNC_METHOD, ret);
                } catch (Throwable t) {
                    //ignore
                }
            }
            if (ret != null) {
                JaxwsServerHandler h = ex.get(JaxwsServerHandler.class);
                if (h != null) {
                    return ret;
                }
                ContinuationProvider cp = ex.getInMessage().get(ContinuationProvider.class);
                // Check for decoupled endpoints: if partial response already was sent, ignore continuation
                boolean decoupledEndpoints = MessageUtils
                    .getContextualBoolean(ex.getInMessage(), PARTIAL_RESPONSE_SENT_PROPERTY, false);
                if ((cp == null) && uam.always() || decoupledEndpoints) {
                    JaxwsServerHandler handler = new JaxwsServerHandler(null);
                    ex.put(JaxwsServerHandler.class, handler);
                    params.add(handler);
                    return ret;
                } else if (cp != null && cp.getContinuation() != null) {
View Full Code Here

Examples of org.apache.cxf.annotations.UseAsyncMethod

        }
        return null;
    }
    protected Method adjustMethodAndParams(Method m, Exchange ex, List<Object> params) {
       
        UseAsyncMethod uam = m.getAnnotation(UseAsyncMethod.class);
        if (uam != null) {
            BindingOperationInfo bop = ex.getBindingOperationInfo();
            Method ret = bop.getProperty(ASYNC_METHOD, Method.class);
            if (ret == null) {
                Class<?> ptypes[] = new Class<?>[m.getParameterTypes().length + 1];
                System.arraycopy(m.getParameterTypes(), 0, ptypes, 0, m.getParameterTypes().length);
                ptypes[m.getParameterTypes().length] = AsyncHandler.class;
                try {
                    ret = m.getDeclaringClass().getMethod(m.getName() + "Async", ptypes);
                    bop.setProperty(ASYNC_METHOD, ret);
                } catch (Throwable t) {
                    //ignore
                }
            }
            if (ret != null) {
                JaxwsServerHandler h = ex.get(JaxwsServerHandler.class);
                if (h != null) {
                    return ret;
                }
                ContinuationProvider cp = ex.getInMessage().get(ContinuationProvider.class);
                if (cp == null && uam.always()) {
                    JaxwsServerHandler handler = new JaxwsServerHandler(null);
                    ex.put(JaxwsServerHandler.class, handler);
                    params.add(handler);
                    return ret;
                } else if (cp != null && cp.getContinuation() != null) {
View Full Code Here

Examples of org.apache.cxf.annotations.UseAsyncMethod

        }
        return null;
    }
    protected Method adjustMethodAndParams(Method m, Exchange ex, List<Object> params) {
       
        UseAsyncMethod uam = m.getAnnotation(UseAsyncMethod.class);
        if (uam != null) {
            BindingOperationInfo bop = ex.getBindingOperationInfo();
            Method ret = bop.getProperty(ASYNC_METHOD, Method.class);
            if (ret == null) {
                Class<?> ptypes[] = new Class<?>[m.getParameterTypes().length + 1];
                System.arraycopy(m.getParameterTypes(), 0, ptypes, 0, m.getParameterTypes().length);
                ptypes[m.getParameterTypes().length] = AsyncHandler.class;
                try {
                    ret = m.getDeclaringClass().getMethod(m.getName() + "Async", ptypes);
                    bop.setProperty(ASYNC_METHOD, ret);
                } catch (Throwable t) {
                    //ignore
                }
            }
            if (ret != null) {
                JaxwsServerHandler h = ex.get(JaxwsServerHandler.class);
                if (h != null) {
                    return ret;
                }
                ContinuationProvider cp = ex.getInMessage().get(ContinuationProvider.class);
                if (cp == null && uam.always()) {
                    JaxwsServerHandler handler = new JaxwsServerHandler(null);
                    ex.put(JaxwsServerHandler.class, handler);
                    params.add(handler);
                    return ret;
                } else if (cp != null && cp.getContinuation() != null) {
View Full Code Here

Examples of org.apache.cxf.annotations.UseAsyncMethod

                                           Class<?> serviceObjectClass) {
        // If class implements Provider<T> interface, use overriden method from service object class
        // to check UseAsyncMethod annotation
        Method mso = getProviderServiceObjectMethod(mOriginal, serviceObjectClass);
       
        UseAsyncMethod uam = mso.getAnnotation(UseAsyncMethod.class);
        if (uam != null) {
            BindingOperationInfo bop = ex.getBindingOperationInfo();
            Method ret = bop.getProperty(ASYNC_METHOD, Method.class);
            if (ret == null) {
                Class<?> ptypes[] = new Class<?>[mso.getParameterTypes().length + 1];
                System.arraycopy(mso.getParameterTypes(), 0, ptypes, 0, mso.getParameterTypes().length);
                ptypes[mso.getParameterTypes().length] = AsyncHandler.class;
                try {
                    ret = mso.getDeclaringClass().getMethod(mso.getName() + "Async", ptypes);
                    bop.setProperty(ASYNC_METHOD, ret);
                } catch (Throwable t) {
                    //ignore
                }
            }
            if (ret != null) {
                JaxwsServerHandler h = ex.get(JaxwsServerHandler.class);
                if (h != null) {
                    return ret;
                }
                ContinuationProvider cp = ex.getInMessage().get(ContinuationProvider.class);
                // Check for decoupled endpoints: if partial response already was sent, ignore continuation
                boolean decoupledEndpoints = MessageUtils
                    .getContextualBoolean(ex.getInMessage(), PARTIAL_RESPONSE_SENT_PROPERTY, false);
                if ((cp == null) && uam.always() || decoupledEndpoints) {
                    JaxwsServerHandler handler = new JaxwsServerHandler(null);
                    ex.put(JaxwsServerHandler.class, handler);
                    params.add(handler);
                    return ret;
                } else if (cp != null && cp.getContinuation() != null) {
View Full Code Here

Examples of org.apache.cxf.annotations.UseAsyncMethod

                                           Class<?> serviceObjectClass) {
        // If class implements Provider<T> interface, use overriden method from service object class
        // to check UseAsyncMethod annotation
        Method mso = getProviderServiceObjectMethod(mOriginal, serviceObjectClass);
       
        UseAsyncMethod uam = mso.getAnnotation(UseAsyncMethod.class);
        if (uam != null) {
            BindingOperationInfo bop = ex.getBindingOperationInfo();
            Method ret = bop.getProperty(ASYNC_METHOD, Method.class);
            if (ret == null) {
                Class<?> ptypes[] = new Class<?>[mso.getParameterTypes().length + 1];
                System.arraycopy(mso.getParameterTypes(), 0, ptypes, 0, mso.getParameterTypes().length);
                ptypes[mso.getParameterTypes().length] = AsyncHandler.class;
                try {
                    ret = mso.getDeclaringClass().getMethod(mso.getName() + "Async", ptypes);
                    bop.setProperty(ASYNC_METHOD, ret);
                } catch (Throwable t) {
                    //ignore
                }
            }
            if (ret != null) {
                JaxwsServerHandler h = ex.get(JaxwsServerHandler.class);
                if (h != null) {
                    return ret;
                }
                ContinuationProvider cp = ex.getInMessage().get(ContinuationProvider.class);
                // Check for decoupled endpoints: if partial response already was sent, ignore continuation
                boolean decoupledEndpoints = MessageUtils
                    .getContextualBoolean(ex.getInMessage(), PARTIAL_RESPONSE_SENT_PROPERTY, false);
                if ((cp == null) && uam.always() || decoupledEndpoints) {
                    JaxwsServerHandler handler = new JaxwsServerHandler(null);
                    ex.put(JaxwsServerHandler.class, handler);
                    params.add(handler);
                    return ret;
                } else if (cp != null && cp.getContinuation() != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.