private void addJAXBInterceptor(PhysicalWireSource source, PhysicalOperation op, InvocationChain chain, ClassLoader targetClassLoader) { ClassLoader sourceClassLoader = source.getClassLoader(); List<DataType> jaxTypes = DataTypeHelper.createTypes(op); Interceptor jaxbInterceptor = interceptorFactory.createInterceptor(op, jaxTypes, DataTypeHelper.JAXB_TYPES, targetClassLoader, sourceClassLoader); chain.addInterceptor(jaxbInterceptor); }
private void addJAXBInterceptor(JmsWireSource source, PhysicalWireTarget target, PhysicalOperation op, InvocationChain chain) { ClassLoader sourceClassLoader = source.getClassLoader(); ClassLoader targetClassLoader = target.getClassLoader(); List<DataType> jaxTypes = DataTypeHelper.createTypes(op); Interceptor jaxbInterceptor = interceptorFactory.createInterceptor(op, DataTypeHelper.JAXB_TYPES, jaxTypes, targetClassLoader, sourceClassLoader); chain.addInterceptor(jaxbInterceptor); }
private void addTransformer(List<InvocationChain> chains, ClassLoader loader) throws Fabric3Exception { for (InvocationChain chain : chains) { PhysicalOperation physicalOperation = chain.getPhysicalOperation(); List<DataType> targetTypes = createTypes(physicalOperation); Interceptor interceptor = interceptorFactory.createInterceptor(physicalOperation, TRANSPORT_TYPES, targetTypes, loader, loader); chain.addInterceptor(new WrappingInterceptor()); chain.addInterceptor(interceptor); } }
public void connectToSender(String id, URI uri, List<InvocationChain> chains, ZeroMQMetadata metadata, ClassLoader loader) throws Fabric3Exception { SenderHolder holder; if (ZMQ.equals(uri.getScheme())) { DelegatingOneWaySender sender = new DelegatingOneWaySender(id, this, metadata); holder = new SenderHolder(sender); } else { holder = senders.get(uri.toString()); } if (holder == null) { boolean oneWay = isOneWay(chains, uri); holder = createSender(uri.toString(), oneWay, metadata); managementService.registerSender(id, holder.getSender()); } for (int i = 0, chainsSize = chains.size(); i < chainsSize; i++) { InvocationChain chain = chains.get(i); PhysicalOperation physicalOperation = chain.getPhysicalOperation(); List<DataType> sourceTypes = createTypes(physicalOperation); Interceptor interceptor = interceptorFactory.createInterceptor(physicalOperation, sourceTypes, TRANSPORT_TYPES, loader, loader); chain.addInterceptor(interceptor); chain.addInterceptor(new UnwrappingInterceptor()); interceptor = createInterceptor(holder, i); chain.addInterceptor(interceptor); } holder.getIds().add(id); }