private PhysicalChannelConnection generateLocalConnection(LogicalConsumer consumer, LogicalChannel channel, PhysicalConnectionTarget target, ClassLoader classLoader) { // the channel does not have bindings, which means it is a local channel // construct a local connection to the channel URI uri = channel.getUri(); PhysicalConnectionSource source = new ChannelSource(uri, ChannelSide.CONSUMER); source.setSequence(consumer.getDefinition().getSequence()); source.setClassLoader(classLoader); Class<?> type = getType(consumer); boolean bound = channel.isBound(); return new PhysicalChannelConnection(uri, consumer.getUri(), source, target, type, bound); }
private PhysicalChannelConnection generateLocalConnection(LogicalConsumer consumer, LogicalChannel channel, PhysicalConnectionTarget target, ClassLoader classLoader) { // the channel does not have bindings, which means it is a local channel // construct a local connection to the channel URI uri = channel.getUri(); PhysicalConnectionSource source = new ChannelSource(uri, ChannelSide.CONSUMER); source.setSequence(consumer.getDefinition().getSequence()); source.setClassLoader(classLoader); Class<?> type = getType(consumer); boolean bound = channel.isBound(); return new PhysicalChannelConnection(uri, consumer.getUri(), source, target, type, bound); }
@SuppressWarnings({"unchecked"}) private PhysicalChannelConnection generateBoundConnection(LogicalConsumer consumer, LogicalChannel channel, DeliveryType deliveryType, ClassLoader classLoader) { // use the bindings on the channel to create a consumer binding configuration LogicalBinding<?> binding = channel.getBinding(); ConnectionBindingGenerator bindingGenerator = getGenerator(binding); PhysicalConnectionSource source = bindingGenerator.generateConnectionSource(consumer, binding, deliveryType); source.setSequence(consumer.getDefinition().getSequence()); source.setClassLoader(classLoader); URI uri = channel.getUri(); ChannelTarget target = new ChannelTarget(uri, ChannelSide.CONSUMER); target.setClassLoader(classLoader); Class<?> type = getType(consumer); return new PhysicalChannelConnection(uri, consumer.getUri(), source, target, type, true); }
@SuppressWarnings({"unchecked"}) private PhysicalChannelConnection generateBoundConnection(LogicalConsumer consumer, LogicalChannel channel, DeliveryType deliveryType, ClassLoader classLoader) { // use the bindings on the channel to create a consumer binding configuration LogicalBinding<?> binding = channel.getBinding(); ConnectionBindingGenerator bindingGenerator = getGenerator(binding); PhysicalConnectionSource source = bindingGenerator.generateConnectionSource(consumer, binding, deliveryType); source.setSequence(consumer.getDefinition().getSequence()); source.setClassLoader(classLoader); URI uri = channel.getUri(); ChannelTarget target = new ChannelTarget(uri, ChannelSide.CONSUMER); target.setClassLoader(classLoader); Class<?> type = getType(consumer); return new PhysicalChannelConnection(uri, consumer.getUri(), source, target, type, true); }