/** * Determines if the wire is one-way or request-reply. The first operation is used to determine if the contract is one-way as the binding does not support * mixing one-way and request-response operations on a service contract. * * @param chains the wire invocation chains * @param uri thr service URI. * @return true if the wire is one-way */ private boolean isOneWay(List<InvocationChain> chains, URI uri) { if (chains.size() < 1) { throw new AssertionError("Contract must have at least one operation: " + uri); } return chains.get(0).getPhysicalOperation().isOneWay(); }
private void attachInterceptors(Class<?> seiClass, MetroJavaWireTarget target, Wire wire, Supplier<?> factory) { Method[] methods = seiClass.getMethods(); int retries = target.getRetries(); for (InvocationChain chain : wire.getInvocationChains()) { Method method = null; for (Method m : methods) { if (chain.getPhysicalOperation().getName().equals(m.getName())) { method = m; break; } } boolean oneWay = chain.getPhysicalOperation().isOneWay(); MetroJavaTargetInterceptor targetInterceptor = new MetroJavaTargetInterceptor(factory, method, oneWay, retries, monitor); chain.addInterceptor(targetInterceptor); } }
InvocationChainHolder holder = getHolder(request); Interceptor interceptor = holder.getChain().getHeadInterceptor(); boolean oneWay = holder.getChain().getPhysicalOperation().isOneWay(); OperationPayloadTypes payloadTypes = holder.getPayloadTypes(); PayloadType inputType = payloadTypes.getInputType();
String operationName = physicalOperation.getName(); configuration.setOperationName(operationName); configuration.setOneWay(physicalOperation.isOneWay()); processJmsHeaders(configuration, metadata); OperationPayloadTypes payloadTypes = resolveOperation(operationName, types);