protected Method getMethodToInvoke(ClassResourceInfo cri, OperationResourceInfo ori, Object resourceObject) { Method resourceMethod = cri.getMethodDispatcher().getMethod(ori); Method methodToInvoke = null; if (Proxy.class.isInstance(resourceObject)) { methodToInvoke = cri.getMethodDispatcher().getProxyMethod(resourceMethod); if (methodToInvoke == null) { methodToInvoke = InjectionUtils.checkProxy(resourceMethod, resourceObject); cri.getMethodDispatcher().addProxyMethod(resourceMethod, methodToInvoke); } } else { methodToInvoke = resourceMethod; } return methodToInvoke; }
private static boolean checkMethodDispatcher(ClassResourceInfo cr) { if (cr.getMethodDispatcher().getOperationResourceInfos().isEmpty()) { LOG.warning(new org.apache.cxf.common.i18n.Message("NO_RESOURCE_OP_EXC", BUNDLE, cr.getServiceClass().getName()).toString()); return false; } return true; }
private static boolean checkMethodDispatcher(ClassResourceInfo cr) { if (cr.getMethodDispatcher().getOperationResourceInfos().isEmpty()) { LOG.warning(new org.apache.cxf.common.i18n.Message("NO_RESOURCE_OP_EXC", BUNDLE, cr.getServiceClass().getName()).toString()); return false; } return true; }
final ClassLoader loader = appContext.getClassLoader(); final Method m = ori.getClassResourceInfo().getMethodDispatcher().getMethod(ori); final Thread thread = Thread.currentThread(); final ClassLoader oldLoader = thread.getContextClassLoader();
Map<Parameter, Object> classParams = getClassParameters(cri); List<OperationResourceInfo> sortedOps = sortOperationsByPath(cri.getMethodDispatcher() .getOperationResourceInfos());
Map<Parameter, Object> classParams = getClassParameters(cri); List<OperationResourceInfo> sortedOps = sortOperationsByPath(cri.getMethodDispatcher() .getOperationResourceInfos());
Map<Pair<String, String>, OperationResourceInfo> methods = new HashMap<>(); cris.forEach(cri -> { cri.getMethodDispatcher().getOperationResourceInfos().forEach(ori -> { String normalizedPath = getNormalizedPath( cri.getURITemplate().getValue(), ori.getURITemplate().getValue());
Map<Parameter, Object> classParams = getClassParameters(cri); List<OperationResourceInfo> sortedOps = sortOperationsByPath(cri.getMethodDispatcher() .getOperationResourceInfos());
Map<Pair<String, String>, OperationResourceInfo> methods = new HashMap<>(); cris.forEach(cri -> { cri.getMethodDispatcher().getOperationResourceInfos().forEach(ori -> { String normalizedPath = getNormalizedPath( cri.getURITemplate().getValue(), ori.getURITemplate().getValue());
InterfaceInfo inf = new InterfaceInfo(si, qname); si.setInterface(inf); for (OperationResourceInfo ori : cri.getMethodDispatcher().getOperationResourceInfos()) { Method m = ori.getMethodToInvoke(); QName oname = new QName(qname.getNamespaceURI(), m.getName());
boolean jaxbOnly, MessageBodyWriter<?> jaxbWriter) { for (OperationResourceInfo ori : resource.getMethodDispatcher().getOperationResourceInfos()) { Method method = ori.getMethodToInvoke(); Class<?> realReturnType = method.getReturnType();
private void doApplyDynamicFeatures(ClassResourceInfo cri) { Set<OperationResourceInfo> oris = cri.getMethodDispatcher().getOperationResourceInfos(); for (OperationResourceInfo ori : oris) { for (DynamicFeature feature : dynamicFeatures) { Configurable methodConfigurable = new MethodConfigurable(ori); feature.configure(new ResourceInfoImpl(ori), methodConfigurable); } } Collection<ClassResourceInfo> subs = cri.getSubResources(); for (ClassResourceInfo sub : subs) { if (sub != cri) { doApplyDynamicFeatures(sub); } } }
InterfaceInfo inf = new InterfaceInfo(si, qname); si.setInterface(inf); for (OperationResourceInfo ori : cri.getMethodDispatcher().getOperationResourceInfos()) { Method m = ori.getMethodToInvoke(); QName oname = new QName(qname.getNamespaceURI(), m.getName());
Map<Pair<String, String>, OperationResourceInfo> methods = new HashMap<>(); for (ClassResourceInfo cri : cris) { for (OperationResourceInfo ori : cri.getMethodDispatcher().getOperationResourceInfos()) { String normalizedPath = getNormalizedPath( cri.getURITemplate().getValue(), ori.getURITemplate().getValue());
public void initBeanParamInfo(ServerProviderFactory factory) { if (factory != null) { Set<OperationResourceInfo> oris = getMethodDispatcher().getOperationResourceInfos(); for (OperationResourceInfo ori : oris) { List<Parameter> params = ori.getParameters(); for (Parameter param : params) { if (param.getType() == ParameterType.BEAN) { Class<?> cls = ori.getMethodToInvoke().getParameterTypes()[param.getIndex()]; BeanParamInfo bpi = new BeanParamInfo(cls, getBus()); factory.addBeanParamInfo(bpi); } } } List<Method> methods = super.getParameterMethods(); for (Method m : methods) { if (m.getAnnotation(BeanParam.class) != null) { BeanParamInfo bpi = new BeanParamInfo(m.getParameterTypes()[0], getBus()); factory.addBeanParamInfo(bpi); } } List<Field> fields = super.getParameterFields(); for (Field f : fields) { if (f.getAnnotation(BeanParam.class) != null) { BeanParamInfo bpi = new BeanParamInfo(f.getType(), getBus()); factory.addBeanParamInfo(bpi); } } } }
private void doApplyDynamicFeatures(ClassResourceInfo cri) { Set<OperationResourceInfo> oris = cri.getMethodDispatcher().getOperationResourceInfos(); for (OperationResourceInfo ori : oris) { String nameBinding = DEFAULT_FILTER_NAME_BINDING
public void initBeanParamInfo(ProviderFactory factory) { Set<OperationResourceInfo> oris = getMethodDispatcher().getOperationResourceInfos(); for (OperationResourceInfo ori : oris) { List<Parameter> params = ori.getParameters(); for (Parameter param : params) { if (param.getType() == ParameterType.BEAN) { Class<?> cls = ori.getMethodToInvoke().getParameterTypes()[param.getIndex()]; BeanParamInfo bpi = new BeanParamInfo(cls, getBus()); factory.addBeanParamInfo(bpi); } } } List<Method> methods = super.getParameterMethods(); for (Method m : methods) { if (m.getAnnotation(BeanParam.class) != null) { BeanParamInfo bpi = new BeanParamInfo(m.getParameterTypes()[0], getBus()); factory.addBeanParamInfo(bpi); } } List<Field> fields = super.getParameterFields(); for (Field f : fields) { if (f.getAnnotation(BeanParam.class) != null) { BeanParamInfo bpi = new BeanParamInfo(f.getType(), getBus()); factory.addBeanParamInfo(bpi); } } } }
for (OperationResourceInfo ori : resource.getMethodDispatcher().getOperationResourceInfos()) { Method method = ori.getAnnotatedMethod() == null ? ori.getMethodToInvoke() : ori.getAnnotatedMethod(); Class<?> realReturnType = method.getReturnType();
OperationResourceInfo ori = cri.getMethodDispatcher().getOperationResourceInfo(m); if (ori == null) { reportInvalidResourceMethod(m, "INVALID_RESOURCE_METHOD");
OperationResourceInfo ori = cri.getMethodDispatcher().getOperationResourceInfo(m); if (ori == null) { if (m.isDefault()) {