public void bind(OperationInfo o, Method... methods) { Method [] newMethods = new Method[methods.length]; int i = 0; for (Method m : methods) { try { newMethods[i] = getImplementationMethod(m); i++; } catch (NoSuchMethodException e) { if (m.getName().endsWith("Async") && (Future.class.equals(m.getReturnType()) || Response.class.equals(m.getReturnType()))) { newMethods[i] = m; i++; continue; } Class<?> endpointClass = implInfo.getImplementorClass(); Message msg = new Message("SEI_METHOD_NOT_FOUND", LOG, m.getName(), endpointClass.getName()); throw new ServiceConstructionException(msg, e); } } super.bind(o, newMethods); }
public BindingOperationInfo getBindingOperation(Method method, Endpoint endpoint) { try { method = getImplementationMethod(method); } catch (NoSuchMethodException e) { // ignore } return super.getBindingOperation(method, endpoint); }
public BindingOperationInfo getBindingOperation(Method method, Endpoint endpoint) { Map<BindingInfo, BindingOperationInfo> bops = infoMap.get(method); if (bops == null) { return null; } BindingOperationInfo bop = bops.get(endpoint.getEndpointInfo().getBinding()); if (bop == null) { OperationInfo o = methodToOp.get(method); if (o == null) { return null; } BindingInfo b = endpoint.getEndpointInfo().getBinding(); for (BindingOperationInfo bop2 : b.getOperations()) { if (bop2.getOperationInfo().equals(o)) { bop2 = getRealOperation(o, bop2); bops.put(b, bop2); return bop2; } } } return bop; }
private Method getMethod(Service s, OperationInfo op) { Method m = op.getProperty(Method.class.getName(), Method.class); if (m != null) { return m; } MethodDispatcher md = (MethodDispatcher)s.get(MethodDispatcher.class.getName()); // The ibm jdk requires the simple frontend dependency to be // present for the SimpleMethodDispatcher cast below even if // md is null (sun jdk does not). So, for the jaxrs frontend, // we can exclude the simple frontend from the aegis databinding // dependency as long as this null check is here. if (md == null) { return null; } SimpleMethodDispatcher smd = (SimpleMethodDispatcher)md; return smd.getPrimaryMethod(op); }
public BindingOperationInfo getBindingOperation(Method method, Endpoint endpoint) { Map<BindingInfo, BindingOperationInfo> bops = infoMap.get(method); if (bops == null) { return null; } BindingOperationInfo bop = bops.get(endpoint.getEndpointInfo().getBinding()); if (bop == null) { OperationInfo o = methodToOp.get(method); if (o == null) { return null; } BindingInfo b = endpoint.getEndpointInfo().getBinding(); for (BindingOperationInfo bop2 : b.getOperations()) { if (bop2.getOperationInfo().equals(o)) { bop2 = getRealOperation(o, bop2); bops.put(b, bop2); return bop2; } } } return bop; }
private Method getMethod(Service s, OperationInfo op) { Method m = op.getProperty(Method.class.getName(), Method.class); if (m != null) { return m; } MethodDispatcher md = (MethodDispatcher)s.get(MethodDispatcher.class.getName()); // The ibm jdk requires the simple frontend dependency to be // present for the SimpleMethodDispatcher cast below even if // md is null (sun jdk does not). So, for the jaxrs frontend, // we can exclude the simple frontend from the aegis databinding // dependency as long as this null check is here. if (md == null) { return null; } SimpleMethodDispatcher smd = (SimpleMethodDispatcher)md; return smd.getPrimaryMethod(op); }
public BindingOperationInfo getBindingOperation(Method method, Endpoint endpoint) { Map<BindingInfo, BindingOperationInfo> bops = infoMap.get(method); if (bops == null) { return null; } BindingOperationInfo bop = bops.get(endpoint.getEndpointInfo().getBinding()); if (bop == null) { OperationInfo o = methodToOp.get(method); if (o == null) { return null; } BindingInfo b = endpoint.getEndpointInfo().getBinding(); for (BindingOperationInfo bop2 : b.getOperations()) { if (bop2.getOperationInfo().equals(o)) { bop2 = getRealOperation(o, bop2); bops.put(b, bop2); return bop2; } } } return bop; }
public BindingOperationInfo getBindingOperation(Method method, Endpoint endpoint) { try { method = getImplementationMethod(method); } catch (NoSuchMethodException e) { // ignore } return super.getBindingOperation(method, endpoint); }
public void bind(OperationInfo o, Method... methods) { Method [] newMethods = new Method[methods.length]; int i = 0; for (Method m : methods) { try { newMethods[i] = getImplementationMethod(m); i++; } catch (NoSuchMethodException e) { if (m.getName().endsWith("Async") && (Future.class.equals(m.getReturnType()) || Response.class.equals(m.getReturnType()))) { newMethods[i] = m; i++; continue; } Class<?> endpointClass = implInfo.getImplementorClass(); Message msg = new Message("SEI_METHOD_NOT_FOUND", LOG, m.getName(), endpointClass.getName()); throw new ServiceConstructionException(msg, e); } } super.bind(o, newMethods); }
public BindingOperationInfo getBindingOperation(Method method, Endpoint endpoint) { Map<BindingInfo, BindingOperationInfo> bops = infoMap.get(method); if (bops == null) { return null; } BindingOperationInfo bop = bops.get(endpoint.getEndpointInfo().getBinding()); if (bop == null) { OperationInfo o = methodToOp.get(method); if (o == null) { return null; } BindingInfo b = endpoint.getEndpointInfo().getBinding(); for (BindingOperationInfo bop2 : b.getOperations()) { if (bop2.getOperationInfo().equals(o)) { bop2 = getRealOperation(o, bop2); bops.put(b, bop2); return bop2; } } } return bop; }