Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
public class Binding extends AbstractDeclarable {

public static enum DestinationType {
public enum DestinationType {
QUEUE, EXCHANGE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected String getEncoding() {

private static class SettableLevelZipOutputStream extends ZipOutputStream {

public SettableLevelZipOutputStream(OutputStream zipped, int level) {
private SettableLevelZipOutputStream(OutputStream zipped, int level) {
super(zipped);
this.setLevel(level);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ private class CachedChannelInvocationHandler implements InvocationHandler {

private final boolean transactional;

public CachedChannelInvocationHandler(ChannelCachingConnectionProxy connection,
private CachedChannelInvocationHandler(ChannelCachingConnectionProxy connection,
Channel target,
LinkedList<ChannelProxy> channelList,
boolean transactional) {
Expand Down Expand Up @@ -885,7 +885,7 @@ private class ChannelCachingConnectionProxy implements Connection, ConnectionPro

private final AtomicBoolean closeNotified = new AtomicBoolean(false);

public ChannelCachingConnectionProxy(Connection target) {
private ChannelCachingConnectionProxy(Connection target) {
this.target = target;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

import java.io.IOException;

import com.rabbitmq.client.Channel;

import org.springframework.amqp.AmqpIOException;
import org.springframework.transaction.NoTransactionException;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
Expand All @@ -25,6 +23,8 @@
import org.springframework.transaction.support.TransactionSynchronizationManager;
import org.springframework.util.Assert;

import com.rabbitmq.client.Channel;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you have different import config for AMQP project.
Or am I missing anything here again?
imports

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't changed anything in my STS; I have always had these settings, which (I think) I got from Mark:

screen shot 2015-12-08 at 10 12 25 am

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Doing the same settings and merging...
Good morning, BTW!


/**
* Helper class for managing a Spring based Rabbit {@link org.springframework.amqp.rabbit.connection.ConnectionFactory},
* in particular for obtaining transactional Rabbit resources for a given ConnectionFactory.
Expand Down Expand Up @@ -254,7 +254,7 @@ private static class RabbitResourceSynchronization extends

private final RabbitResourceHolder resourceHolder;

public RabbitResourceSynchronization(RabbitResourceHolder resourceHolder, Object resourceKey,
private RabbitResourceSynchronization(RabbitResourceHolder resourceHolder, Object resourceKey,
boolean locallyTransacted) {
super(resourceHolder, resourceKey);
this.resourceHolder = resourceHolder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ public void stop() {

private class InternalConsumer extends DefaultConsumer {

public InternalConsumer(Channel channel) {
private InternalConsumer(Channel channel) {
super(channel);
}

Expand Down Expand Up @@ -706,21 +706,21 @@ public byte[] getBody() {
@SuppressWarnings("serial")
private static class DeclarationException extends AmqpException {

public DeclarationException() {
private DeclarationException() {
super("Failed to declare queue(s):");
}

public DeclarationException(Throwable t) {
private DeclarationException(Throwable t) {
super("Failed to declare queue(s):", t);
}

private final List<String> failedQueues = new ArrayList<String>();

void addFailedQueue(String queue) {
private void addFailedQueue(String queue) {
this.failedQueues.add(queue);
}

public List<String> getFailedQueues() {
private List<String> getFailedQueues() {
return this.failedQueues;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ public void registerEndpoint(RabbitListenerEndpoint endpoint) {

private static class AmqpListenerEndpointDescriptor {

public final RabbitListenerEndpoint endpoint;
private final RabbitListenerEndpoint endpoint;

public final RabbitListenerContainerFactory<?> containerFactory;
private final RabbitListenerContainerFactory<?> containerFactory;

public AmqpListenerEndpointDescriptor(RabbitListenerEndpoint endpoint, RabbitListenerContainerFactory<?> containerFactory) {
private AmqpListenerEndpointDescriptor(RabbitListenerEndpoint endpoint, RabbitListenerContainerFactory<?> containerFactory) {
this.endpoint = endpoint;
this.containerFactory = containerFactory;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ private static class AggregatingCallback implements Runnable {

private final Runnable finishCallback;

public AggregatingCallback(int count, Runnable finishCallback) {
private AggregatingCallback(int count, Runnable finishCallback) {
this.count = new AtomicInteger(count);
this.finishCallback = finishCallback;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ private class AsyncMessageProcessingConsumer implements Runnable {

private volatile FatalListenerStartupException startupException;

public AsyncMessageProcessingConsumer(BlockingQueueConsumer consumer) {
private AsyncMessageProcessingConsumer(BlockingQueueConsumer consumer) {
this.consumer = consumer;
this.start = new CountDownLatch(1);
}
Expand All @@ -1142,7 +1142,7 @@ public AsyncMessageProcessingConsumer(BlockingQueueConsumer consumer) {
* @throws TimeoutException if the consumer hasn't started
* @throws InterruptedException if the consumer startup is interrupted
*/
public FatalListenerStartupException getStartupException() throws TimeoutException, InterruptedException {
private FatalListenerStartupException getStartupException() throws TimeoutException, InterruptedException {
start.await(60000L, TimeUnit.MILLISECONDS);//NOSONAR - ignore return value
return this.startupException;
}
Expand Down Expand Up @@ -1387,9 +1387,11 @@ protected void handleStartupFailure(BackOffExecution backOffExecution) throws Ex

@SuppressWarnings("serial")
private static class WrappedTransactionException extends RuntimeException {
public WrappedTransactionException(Throwable cause) {

private WrappedTransactionException(Throwable cause) {
super(cause);
}

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public MessageListenerAdapter() {
* @param delegate the delegate object
*/
public MessageListenerAdapter(Object delegate) {
setDelegate(delegate);
doSetDelegate(delegate);
}

/**
Expand All @@ -162,8 +162,8 @@ public MessageListenerAdapter(Object delegate) {
* @param messageConverter the message converter to use
*/
public MessageListenerAdapter(Object delegate, MessageConverter messageConverter) {
setDelegate(delegate);
setMessageConverter(messageConverter);
doSetDelegate(delegate);
super.setMessageConverter(messageConverter);
}

/**
Expand All @@ -174,7 +174,7 @@ public MessageListenerAdapter(Object delegate, MessageConverter messageConverter
*/
public MessageListenerAdapter(Object delegate, String defaultListenerMethod) {
this(delegate);
setDefaultListenerMethod(defaultListenerMethod);
this.defaultListenerMethod = defaultListenerMethod;
}

/**
Expand All @@ -185,6 +185,10 @@ public MessageListenerAdapter(Object delegate, String defaultListenerMethod) {
* @param delegate The delegate listener or POJO.
*/
public void setDelegate(Object delegate) {
doSetDelegate(delegate);
}

private void doSetDelegate(Object delegate) {
Assert.notNull(delegate, "Delegate must not be null");
this.delegate = delegate;
}
Expand Down