public void onCreate(Channel channel, boolean transactional) { for (ChannelListener delegate : this.delegates) { delegate.onCreate(channel, transactional); } }
public void onCreate(Channel channel, boolean transactional) { for (ChannelListener delegate : this.delegates) { delegate.onCreate(channel, transactional); } }
private ChannelProxy getCachedChannelProxy(ChannelCachingConnectionProxy connection, LinkedList<ChannelProxy> channelList, boolean transactional) { //NOSONAR LinkedList for addLast() Channel targetChannel = createBareChannel(connection, transactional); if (logger.isDebugEnabled()) { logger.debug("Creating cached Rabbit Channel from " + targetChannel); } getChannelListener().onCreate(targetChannel, transactional); Class<?>[] interfaces; if (this.publisherConfirms || this.publisherReturns) { interfaces = new Class<?>[] { ChannelProxy.class, PublisherCallbackChannel.class }; } else { interfaces = new Class<?>[] { ChannelProxy.class }; } return (ChannelProxy) Proxy.newProxyInstance(ClassUtils.getDefaultClassLoader(), interfaces, new CachedChannelInvocationHandler(connection, targetChannel, channelList, transactional)); }
private ChannelProxy getCachedChannelProxy(ChannelCachingConnectionProxy connection, LinkedList<ChannelProxy> channelList, boolean transactional) { //NOSONAR LinkedList for addLast() Channel targetChannel = createBareChannel(connection, transactional); if (logger.isDebugEnabled()) { logger.debug("Creating cached Rabbit Channel from " + targetChannel); } getChannelListener().onCreate(targetChannel, transactional); Class<?>[] interfaces; if (this.publisherConfirms || this.publisherReturns) { interfaces = new Class<?>[] { ChannelProxy.class, PublisherCallbackChannel.class }; } else { interfaces = new Class<?>[] { ChannelProxy.class }; } return (ChannelProxy) Proxy.newProxyInstance(ClassUtils.getDefaultClassLoader(), interfaces, new CachedChannelInvocationHandler(connection, targetChannel, channelList, transactional)); }
@Override public Channel createChannel(boolean transactional) { if (!isOpen()) { synchronized (this) { if (!isOpen()) { logger.debug("Detected closed connection. Opening a new one before creating Channel."); target = createBareConnection(); getConnectionListener().onCreate(target); } } } Channel channel = target.createChannel(transactional); getChannelListener().onCreate(channel, transactional); return channel; }