diff --git a/spring-amqp/src/main/java/org/springframework/amqp/AmqpConnectException.java b/spring-amqp/src/main/java/org/springframework/amqp/AmqpConnectException.java index 06bc8a07..c1e990b6 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/AmqpConnectException.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/AmqpConnectException.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -18,7 +18,7 @@ import java.net.ConnectException; /** * RuntimeException wrapper for an {@link ConnectException} which can be commonly thrown from AMQP operations if the * remote process dies or there is a network issue. - * + * * @author Dave Syer */ @SuppressWarnings("serial") diff --git a/spring-amqp/src/main/java/org/springframework/amqp/AmqpException.java b/spring-amqp/src/main/java/org/springframework/amqp/AmqpException.java index d38e397c..75b1ea0a 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/AmqpException.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/AmqpException.java @@ -18,7 +18,7 @@ package org.springframework.amqp; /** * Base RuntimeException for errors that occur when executing AMQP operations. - * + * * @author Mark Fisher */ @SuppressWarnings("serial") diff --git a/spring-amqp/src/main/java/org/springframework/amqp/AmqpIOException.java b/spring-amqp/src/main/java/org/springframework/amqp/AmqpIOException.java index cc8bc408..801c4e40 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/AmqpIOException.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/AmqpIOException.java @@ -21,7 +21,7 @@ import java.io.IOException; /** * RuntimeException wrapper for an {@link IOException} which * can be commonly thrown from AMQP operations. - * + * * @author Mark Pollack */ @SuppressWarnings("serial") diff --git a/spring-amqp/src/main/java/org/springframework/amqp/AmqpUnsupportedEncodingException.java b/spring-amqp/src/main/java/org/springframework/amqp/AmqpUnsupportedEncodingException.java index d65907c5..c1a84145 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/AmqpUnsupportedEncodingException.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/AmqpUnsupportedEncodingException.java @@ -17,8 +17,8 @@ package org.springframework.amqp; /** - * RuntimeException for unsupported encoding in an AMQP operation. - * + * RuntimeException for unsupported encoding in an AMQP operation. + * * @author Mark Pollack */ @SuppressWarnings("serial") diff --git a/spring-amqp/src/main/java/org/springframework/amqp/ImmediateAcknowledgeAmqpException.java b/spring-amqp/src/main/java/org/springframework/amqp/ImmediateAcknowledgeAmqpException.java index 06811776..b174a99a 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/ImmediateAcknowledgeAmqpException.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/ImmediateAcknowledgeAmqpException.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -15,9 +15,9 @@ package org.springframework.amqp; /** * Special exception for listener implementations that want to signal that the current batch of messages should be * acknowledged immediately (i.e. as soon as possible) without rollback, and without consuming any more messages. - * + * * @author Dave Syer - * + * */ @SuppressWarnings("serial") public class ImmediateAcknowledgeAmqpException extends AmqpException { diff --git a/spring-amqp/src/main/java/org/springframework/amqp/UncategorizedAmqpException.java b/spring-amqp/src/main/java/org/springframework/amqp/UncategorizedAmqpException.java index e58b7d53..d0274494 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/UncategorizedAmqpException.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/UncategorizedAmqpException.java @@ -19,7 +19,7 @@ package org.springframework.amqp; /** * A "catch-all" exception type within the AmqpException hierarchy * when no more specific cause is known. - * + * * @author Mark Pollack */ @SuppressWarnings("serial") diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/AbstractExchange.java b/spring-amqp/src/main/java/org/springframework/amqp/core/AbstractExchange.java index 96e24599..b7175871 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/AbstractExchange.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/AbstractExchange.java @@ -21,11 +21,11 @@ import java.util.Map; /** - * Common properties that describe all exchange types. + * Common properties that describe all exchange types. *

Subclasses of this class are typically used with administrative operations that declare an exchange. - * + * * @author Mark Pollack - * + * * @see AmqpAdmin */ public abstract class AbstractExchange implements Exchange { @@ -36,18 +36,18 @@ public abstract class AbstractExchange implements Exchange { private final boolean autoDelete; - private final Map arguments; + private final Map arguments; /** - * Construct a new Exchange for bean usage. + * Construct a new Exchange for bean usage. * @param name the name of the exchange. */ public AbstractExchange(String name) { this(name, true, false); } - + /** - * Construct a new Exchange, given a name, durability flag, auto-delete flag. + * Construct a new Exchange, given a name, durability flag, auto-delete flag. * @param name the name of the exchange. * @param durable true if we are declaring a durable exchange (the exchange will survive a server restart) * @param autoDelete true if the server should delete the exchange when it is no longer in use @@ -57,7 +57,7 @@ public abstract class AbstractExchange implements Exchange { } /** - * Construct a new Exchange, given a name, durability flag, and auto-delete flag, and arguments. + * Construct a new Exchange, given a name, durability flag, and auto-delete flag, and arguments. * @param name the name of the exchange. * @param durable true if we are declaring a durable exchange (the exchange will survive a server restart) * @param autoDelete true if the server should delete the exchange when it is no longer in use @@ -103,10 +103,10 @@ public abstract class AbstractExchange implements Exchange { @Override public String toString() { - return "Exchange [name=" + name + + return "Exchange [name=" + name + ", type=" + this.getType() + ", durable=" + durable + - ", autoDelete=" + autoDelete + + ", autoDelete=" + autoDelete + ", arguments=" + arguments + "]"; } diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/AcknowledgeMode.java b/spring-amqp/src/main/java/org/springframework/amqp/core/AcknowledgeMode.java index aeb0ddd7..06b7c45e 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/AcknowledgeMode.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/AcknowledgeMode.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -14,7 +14,7 @@ package org.springframework.amqp.core; /** * @author Dave Syer - * + * */ public enum AcknowledgeMode { diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/Address.java b/spring-amqp/src/main/java/org/springframework/amqp/core/Address.java index 547df69d..adc9e70d 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/Address.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/Address.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -22,16 +22,16 @@ import org.springframework.util.StringUtils; * Represents an address for publication of an AMQP message. The AMQP 0-8 and 0-9 specifications have an unstructured * string that is used as a "reply to" address. There are however conventions in use and this class makes it easier to * follow these conventions, which can be easily summarised as: - * + * *

  * (exchangeType)://(exchange)/(routingKey)
  * 
- * + * * Here we also allow the exchange type to default to direct, and the exchange name to default to empty (so just a * routing key will work if you know the queue name). - * + * * @see ExchangeTypes - * + * * @author Mark Pollack * @author Mark Fisher * @author Dave Syer @@ -48,14 +48,14 @@ public class Address { /** * Create an Address instance from a structured String in the form - * + * *
 	 * (exchangeType)://(exchange)/(routingKey)
 	 * 
- * + * * where examples of valid exchangeType values can be found in the {@link ExchangeTypes} static * constants. - * + * * @param address a structured string. */ public Address(String address) { @@ -81,7 +81,7 @@ public class Address { /*** * Create an Address given the exchange type, exchange name and routing key. This will set the exchange type, name * and the routing key explicitly. - * + * * @param exchangeType * @param exchangeName * @param routingKey diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/AmqpAdmin.java b/spring-amqp/src/main/java/org/springframework/amqp/core/AmqpAdmin.java index 20920a03..cad85031 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/AmqpAdmin.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/AmqpAdmin.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -15,7 +15,7 @@ package org.springframework.amqp.core; /** * Specifies a basic set of portable AMQP administrative operations for AMQP > 0.8 - * + * * @author Mark Pollack * @author Dave Syer */ diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/AmqpTemplate.java b/spring-amqp/src/main/java/org/springframework/amqp/core/AmqpTemplate.java index 89292459..b83a9263 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/AmqpTemplate.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/AmqpTemplate.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -18,11 +18,11 @@ import org.springframework.amqp.support.converter.MessageConverter; /** * Specifies a basic set of AMQP operations. - * + * * Provides synchronous send and receive methods. The {@link #convertAndSend(Object)} and {@link #receiveAndConvert()} * methods allow let you send and receive POJO objects. Implementations are expected to delegate to an instance of * {@link MessageConverter} to perform conversion to and from AMQP byte[] payload type. - * + * * @author Mark Pollack * @author Mark Fisher */ @@ -32,7 +32,7 @@ public interface AmqpTemplate { /** * Send a message to a default exchange with a default routing key. - * + * * @param message a message to send * @throws AmqpException if there is a problem */ @@ -40,7 +40,7 @@ public interface AmqpTemplate { /** * Send a message to a default exchange with a specific routing key. - * + * * @param routingKey the routing key * @param message a message to send * @throws AmqpException if there is a problem @@ -49,7 +49,7 @@ public interface AmqpTemplate { /** * Send a message to a specific exchange with a specific routing key. - * + * * @param exchange the name of the exchange * @param routingKey the routing key * @param message a message to send @@ -61,7 +61,7 @@ public interface AmqpTemplate { /** * Convert a Java object to an Amqp {@link Message} and send it to a default exchange with a default routing key. - * + * * @param message a message to send * @throws AmqpException if there is a problem */ @@ -69,7 +69,7 @@ public interface AmqpTemplate { /** * Convert a Java object to an Amqp {@link Message} and send it to a default exchange with a specific routing key. - * + * * @param routingKey the routing key * @param message a message to send * @throws AmqpException if there is a problem @@ -78,7 +78,7 @@ public interface AmqpTemplate { /** * Convert a Java object to an Amqp {@link Message} and send it to a specific exchange with a specific routing key. - * + * * @param exchange the name of the exchange * @param routingKey the routing key * @param message a message to send @@ -88,7 +88,7 @@ public interface AmqpTemplate { /** * Convert a Java object to an Amqp {@link Message} and send it to a default exchange with a default routing key. - * + * * @param message a message to send * @param messagePostProcessor a processor to apply to the message before it is sent * @throws AmqpException if there is a problem @@ -97,7 +97,7 @@ public interface AmqpTemplate { /** * Convert a Java object to an Amqp {@link Message} and send it to a default exchange with a specific routing key. - * + * * @param routingKey the routing key * @param message a message to send * @param messagePostProcessor a processor to apply to the message before it is sent @@ -108,7 +108,7 @@ public interface AmqpTemplate { /** * Convert a Java object to an Amqp {@link Message} and send it to a specific exchange with a specific routing key. - * + * * @param exchange the name of the exchange * @param routingKey the routing key * @param message a message to send @@ -122,7 +122,7 @@ public interface AmqpTemplate { /** * Receive a message if there is one from a default queue. Returns immediately, possibly with a null value. - * + * * @return a message or null if there is none waiting * @throws AmqpException if there is a problem */ @@ -130,7 +130,7 @@ public interface AmqpTemplate { /** * Receive a message if there is one from a specific queue. Returns immediately, possibly with a null value. - * + * * @param queueName the name of the queue to poll * @return a message or null if there is none waiting * @throws AmqpException if there is a problem @@ -142,7 +142,7 @@ public interface AmqpTemplate { /** * Receive a message if there is one from a default queue and convert it to a Java object. Returns immediately, * possibly with a null value. - * + * * @return a message or null if there is none waiting * @throws AmqpException if there is a problem */ @@ -151,7 +151,7 @@ public interface AmqpTemplate { /** * Receive a message if there is one from a specific queue and convert it to a Java object. Returns immediately, * possibly with a null value. - * + * * @param queueName the name of the queue to poll * @return a message or null if there is none waiting * @throws AmqpException if there is a problem @@ -164,7 +164,7 @@ public interface AmqpTemplate { * Basic RPC pattern. Send a message to a default exchange with a default routing key and attempt to receive a * response. Implementations will normally set the reply-to header to an exclusive queue and wait up for some time * limited by a timeout. - * + * * @param message a message to send * @return the response if there is one * @throws AmqpException if there is a problem @@ -175,7 +175,7 @@ public interface AmqpTemplate { * Basic RPC pattern. Send a message to a default exchange with a specific routing key and attempt to receive a * response. Implementations will normally set the reply-to header to an exclusive queue and wait up for some time * limited by a timeout. - * + * * @param routingKey the routing key * @param message a message to send * @return the response if there is one @@ -187,7 +187,7 @@ public interface AmqpTemplate { * Basic RPC pattern. Send a message to a specific exchange with a specific routing key and attempt to receive a * response. Implementations will normally set the reply-to header to an exclusive queue and wait up for some time * limited by a timeout. - * + * * @param exchange the name of the exchange * @param routingKey the routing key * @param message a message to send @@ -202,7 +202,7 @@ public interface AmqpTemplate { * Basic RPC pattern with conversion. Send a Java object converted to a message to a default exchange with a default * routing key and attempt to receive a response, converting that to a Java object. Implementations will normally * set the reply-to header to an exclusive queue and wait up for some time limited by a timeout. - * + * * @param message a message to send * @return the response if there is one * @throws AmqpException if there is a problem @@ -213,7 +213,7 @@ public interface AmqpTemplate { * Basic RPC pattern with conversion. Send a Java object converted to a message to a default exchange with a * specific routing key and attempt to receive a response, converting that to a Java object. Implementations will * normally set the reply-to header to an exclusive queue and wait up for some time limited by a timeout. - * + * * @param routingKey the routing key * @param message a message to send * @return the response if there is one @@ -225,7 +225,7 @@ public interface AmqpTemplate { * Basic RPC pattern with conversion. Send a Java object converted to a message to a specific exchange with a * specific routing key and attempt to receive a response, converting that to a Java object. Implementations will * normally set the reply-to header to an exclusive queue and wait up for some time limited by a timeout. - * + * * @param exchange the name of the exchange * @param routingKey the routing key * @param message a message to send @@ -238,7 +238,7 @@ public interface AmqpTemplate { * Basic RPC pattern with conversion. Send a Java object converted to a message to a default exchange with a default * routing key and attempt to receive a response, converting that to a Java object. Implementations will normally * set the reply-to header to an exclusive queue and wait up for some time limited by a timeout. - * + * * @param message a message to send * @param messagePostProcessor a processor to apply to the message before it is sent * @return the response if there is one @@ -250,7 +250,7 @@ public interface AmqpTemplate { * Basic RPC pattern with conversion. Send a Java object converted to a message to a default exchange with a * specific routing key and attempt to receive a response, converting that to a Java object. Implementations will * normally set the reply-to header to an exclusive queue and wait up for some time limited by a timeout. - * + * * @param routingKey the routing key * @param message a message to send * @param messagePostProcessor a processor to apply to the message before it is sent @@ -263,7 +263,7 @@ public interface AmqpTemplate { * Basic RPC pattern with conversion. Send a Java object converted to a message to a specific exchange with a * specific routing key and attempt to receive a response, converting that to a Java object. Implementations will * normally set the reply-to header to an exclusive queue and wait up for some time limited by a timeout. - * + * * @param exchange the name of the exchange * @param routingKey the routing key * @param message a message to send diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/Binding.java b/spring-amqp/src/main/java/org/springframework/amqp/core/Binding.java index 8ccc9ff4..e926d614 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/Binding.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/Binding.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -19,11 +19,11 @@ import java.util.Map; * Simple container collecting information to describe a binding. Takes String destination and exchange names as * arguments to facilitate wiring using code based configuration. Can be used in conjunction with {@link AmqpAdmin}, or * created via a {@link BindingBuilder}. - * + * * @author Mark Pollack * @author Mark Fisher * @author Dave Syer - * + * * @see AmqpAdmin */ public class Binding { diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/BindingBuilder.java b/spring-amqp/src/main/java/org/springframework/amqp/core/BindingBuilder.java index 2d3c081c..0cf44341 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/BindingBuilder.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/BindingBuilder.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -22,7 +22,7 @@ import org.springframework.util.Assert; /** * Basic builder class to create bindings for a more fluent API style in code based configuration. - * + * * @author Mark Pollack * @author Mark Fisher * @author Dave Syer diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/CustomExchange.java b/spring-amqp/src/main/java/org/springframework/amqp/core/CustomExchange.java index 2b50d45c..e93a8185 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/CustomExchange.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/CustomExchange.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -19,9 +19,9 @@ import java.util.Map; * Simple container collecting information to describe a custom exchange. Custom exchange types are allowed by the AMQP * specification, and their names should start with "x-" (but this is not enforced here). Used in conjunction with * administrative operations. - * + * * @see AmqpAdmin - * + * * @author Dave Syer */ public class CustomExchange extends AbstractExchange { diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/DirectExchange.java b/spring-amqp/src/main/java/org/springframework/amqp/core/DirectExchange.java index 6c12d25c..3d4e063c 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/DirectExchange.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/DirectExchange.java @@ -21,9 +21,9 @@ import java.util.Map; /** * Simple container collecting information to describe a direct exchange. * Used in conjunction with administrative operations. - * + * * @see AmqpAdmin - * + * * @author Mark Pollack * @author Dave Syer */ diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/Exchange.java b/spring-amqp/src/main/java/org/springframework/amqp/core/Exchange.java index 90a72a66..f60a8e57 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/Exchange.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/Exchange.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -22,28 +22,28 @@ public interface Exchange { /** * The name of the exchange. - * + * * @return the name of the exchange */ String getName(); /** * The type of the exchange. See {@link ExchangeTypes} for some well-known examples. - * + * * @return the type of the exchange */ String getType(); /** * A durable exchange will survive a server restart - * + * * @return true if durable */ boolean isDurable(); /** * True if the server should delete the exchange when it is no longer in use (if all bindings are deleted). - * + * * @return true if auto-delete */ boolean isAutoDelete(); @@ -51,7 +51,7 @@ public interface Exchange { /** * A map of arguments used to declare the exchange. These are stored by the broker, but do not necessarily have any * meaning to the broker (depending on the exchange type). - * + * * @return the arguments */ Map getArguments(); diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/ExchangeTypes.java b/spring-amqp/src/main/java/org/springframework/amqp/core/ExchangeTypes.java index 35e4b854..3be49aed 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/ExchangeTypes.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/ExchangeTypes.java @@ -18,7 +18,7 @@ package org.springframework.amqp.core; /** * Constants for the standard Exchange type names. - * + * * @author Mark Fisher * @author Gary Russell */ diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/FanoutExchange.java b/spring-amqp/src/main/java/org/springframework/amqp/core/FanoutExchange.java index 02eafbb2..3e7cfda8 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/FanoutExchange.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/FanoutExchange.java @@ -22,16 +22,16 @@ import java.util.Map; * Simple container collecting information to describe a fanout exchange. * Used in conjunction with administrative operations. * @see AmqpAdmin - * + * * @author Mark Pollack * @author Dave Syer */ public class FanoutExchange extends AbstractExchange { public FanoutExchange(String name) { - super(name); + super(name); } - + public FanoutExchange(String name, boolean durable, boolean autoDelete) { super(name, durable, autoDelete); } diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/FederatedExchange.java b/spring-amqp/src/main/java/org/springframework/amqp/core/FederatedExchange.java index cf014edc..cd25031b 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/FederatedExchange.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/FederatedExchange.java @@ -19,7 +19,7 @@ package org.springframework.amqp.core; import java.util.Map; /** - * + * * @see AmqpAdmin * * @author Gary Russell diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/Message.java b/spring-amqp/src/main/java/org/springframework/amqp/core/Message.java index 20c84216..60fb8d6e 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/Message.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/Message.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -23,7 +23,7 @@ import org.springframework.amqp.utils.SerializationUtils; * as separate arguments. Spring AMQP defines a Message class as part of a more general AMQP domain model * representation. The purpose of the Message class is to simply encapsulate the body and properties within a single * instance so that the rest of the AMQP API can in turn be simpler. - * + * * @author Mark Pollack * @author Mark Fisher * @author Oleg Zhurakousky diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/MessageDeliveryMode.java b/spring-amqp/src/main/java/org/springframework/amqp/core/MessageDeliveryMode.java index f6b27834..a3b57f05 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/MessageDeliveryMode.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/MessageDeliveryMode.java @@ -17,11 +17,11 @@ package org.springframework.amqp.core; /** - * Enumeration for the message delivery mode. Can be persistent or + * Enumeration for the message delivery mode. Can be persistent or * non persistent. Use the method 'toInt' to get the appropriate value * that is used the he AMQP protocol instead of the ordinal() value when * passing into AMQP APIs. - * + * * @author Mark Pollack * */ @@ -56,5 +56,5 @@ public enum MessageDeliveryMode { } } } - + } diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/MessageListener.java b/spring-amqp/src/main/java/org/springframework/amqp/core/MessageListener.java index 64d7c3a6..503aa4aa 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/MessageListener.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/MessageListener.java @@ -18,7 +18,7 @@ package org.springframework.amqp.core; /** * Listener interface to receive asynchronous delivery of Amqp Messages. - * + * * @author Mark Pollack */ public interface MessageListener { diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/MessagePostProcessor.java b/spring-amqp/src/main/java/org/springframework/amqp/core/MessagePostProcessor.java index d74655bd..884b9977 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/MessagePostProcessor.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/MessagePostProcessor.java @@ -19,12 +19,12 @@ package org.springframework.amqp.core; import org.springframework.amqp.AmqpException; /** - * To be used with the send method of Amqp template classes (such as RabbitTemplate) + * To be used with the send method of Amqp template classes (such as RabbitTemplate) * that convert an object to a message. * It allows for further modification of the message after it has been processed * by the converter. This is useful for setting of Header and Properties. * - *

This often as an anonymous class within a method implementation. + *

This often as an anonymous class within a method implementation. * @author Mark Pollack */ public interface MessagePostProcessor { diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/MessageProperties.java b/spring-amqp/src/main/java/org/springframework/amqp/core/MessageProperties.java index edeaf5cb..fd483afb 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/MessageProperties.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/MessageProperties.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -19,7 +19,7 @@ import java.util.Map; /** * Message Properties for an AMQP message. - * + * * @author Mark Fisher * @author Mark Pollack * @author Gary Russell diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/Queue.java b/spring-amqp/src/main/java/org/springframework/amqp/core/Queue.java index d0330a60..c92210dd 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/Queue.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/Queue.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -17,7 +17,7 @@ import java.util.Map; /** * Simple container collecting information to describe a queue. Used in conjunction with AmqpAdmin. - * + * * @author Mark Pollack * @see AmqpAdmin */ @@ -35,7 +35,7 @@ public class Queue { /** * The queue is durable, non-exclusive and non auto-delete. - * + * * @param name the name of the queue. */ public Queue(String name) { @@ -44,7 +44,7 @@ public class Queue { /** * Construct a new queue, given a name and durability flag. The queue is non-exclusive and non auto-delete. - * + * * @param name the name of the queue. * @param durable true if we are declaring a durable queue (the queue will survive a server restart) */ @@ -88,7 +88,7 @@ public class Queue { /** * A durable queue will survive a server restart - * + * * @return true if durable */ public boolean isDurable() { @@ -97,7 +97,7 @@ public class Queue { /** * True if the server should only send messages to the declarer's connection. - * + * * @return true if auto-delete */ public boolean isExclusive() { @@ -107,7 +107,7 @@ public class Queue { /** * True if the server should delete the queue when it is no longer in use (the last consumer is cancelled). A queue * that never has any consumers will not be deleted automatically. - * + * * @return true if auto-delete */ public boolean isAutoDelete() { diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/TopicExchange.java b/spring-amqp/src/main/java/org/springframework/amqp/core/TopicExchange.java index 4991182d..83498b85 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/TopicExchange.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/TopicExchange.java @@ -21,7 +21,7 @@ import java.util.Map; /** * Simple container collecting information to describe a topic exchange. * Used in conjunction with administrative operations. - * + * * @author Mark Pollack * @author Dave Syer * @see AmqpAdmin @@ -33,7 +33,7 @@ public class TopicExchange extends AbstractExchange { } public TopicExchange(String name, boolean durable, boolean autoDelete) { - super(name, durable, autoDelete); + super(name, durable, autoDelete); } public TopicExchange(String name, boolean durable, boolean autoDelete, Map arguments) { diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/UniquelyNamedQueue.java b/spring-amqp/src/main/java/org/springframework/amqp/core/UniquelyNamedQueue.java index 9f63d2a5..2bfba5b7 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/UniquelyNamedQueue.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/UniquelyNamedQueue.java @@ -18,8 +18,8 @@ package org.springframework.amqp.core; import java.util.UUID; /** - * Create a queue with a unique name. - * + * Create a queue with a unique name. + * * @author Mark Pollack * */ @@ -31,7 +31,7 @@ public class UniquelyNamedQueue extends Queue { public UniquelyNamedQueue() { super(UUID.randomUUID().toString()); } - + /** * Create a uniquely named queue with a fixed prefix. The constructor argument specifies * the prefix which is prepended to a random UUID. diff --git a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/AbstractMessageConverter.java b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/AbstractMessageConverter.java index 0e5fa877..ce3ef6e7 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/AbstractMessageConverter.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/AbstractMessageConverter.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -20,7 +20,7 @@ import org.springframework.amqp.core.MessageProperties; /** * Convenient base class for {@link MessageConverter} implementations. * @author Dave Syer - * + * */ public abstract class AbstractMessageConverter implements MessageConverter { @@ -59,7 +59,7 @@ public abstract class AbstractMessageConverter implements MessageConverter { /** * Crate a message from the payload object and message properties provided. The message id will be added to the * properties if necessary later. - * + * * @param object the payload * @param messageProperties the message properties (headers) * @return a message diff --git a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/ClassMapper.java b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/ClassMapper.java index 78b9f315..bde58e3c 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/ClassMapper.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/ClassMapper.java @@ -21,10 +21,10 @@ import org.springframework.amqp.core.MessageProperties; /** * Strategy for setting metadata on messages such that one can create the class * that needs to be instantiated when receiving a message. - * + * * @author Mark Pollack * @author James Carr - * + * */ public interface ClassMapper { diff --git a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/JavaTypeMapper.java b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/JavaTypeMapper.java index 7b766556..9f09f749 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/JavaTypeMapper.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/JavaTypeMapper.java @@ -15,7 +15,7 @@ import org.springframework.amqp.core.MessageProperties; /** * Strategy for setting metadata on messages such that one can create the class that needs to be instantiated when * receiving a message. - * + * * @author Mark Pollack * @author James Carr * @author Sam Nelson diff --git a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/MarshallingMessageConverter.java b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/MarshallingMessageConverter.java index 94f8e67c..64460b27 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/MarshallingMessageConverter.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/MarshallingMessageConverter.java @@ -153,7 +153,7 @@ public class MarshallingMessageConverter extends AbstractMessageConverter implem try { ByteArrayInputStream bis = new ByteArrayInputStream(message.getBody()); StreamSource source = new StreamSource(bis); - return unmarshaller.unmarshal(source); + return unmarshaller.unmarshal(source); } catch (IOException ex) { throw new MessageConversionException("Could not access message content: " + message, ex); diff --git a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/MessageConversionException.java b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/MessageConversionException.java index 0b78e74f..7ceb657c 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/MessageConversionException.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/MessageConversionException.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -23,7 +23,7 @@ import org.springframework.amqp.AmqpException; * N.B. this is not an {@link AmqpException} because it is a a client exception, not a protocol or broker * problem. *

- * + * * @author Mark Fisher * @author Dave Syer */ diff --git a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SerializerMessageConverter.java b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SerializerMessageConverter.java index 46664ad3..700d8ce2 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SerializerMessageConverter.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SerializerMessageConverter.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -30,7 +30,7 @@ import org.springframework.core.serializer.Serializer; * {@link Serializer} and {@link Deserializer} abstractions in Spring. The {@link #toMessage(Object, MessageProperties)} * method simply checks the type of the provided instance while the {@link #fromMessage(Message)} method relies upon the * {@link MessageProperties#getContentType() content-type} of the provided Message. - * + * * @author Dave Syer */ public class SerializerMessageConverter extends AbstractMessageConverter { @@ -48,7 +48,7 @@ public class SerializerMessageConverter extends AbstractMessageConverter { /** * Flag to signal that the content type should be ignored and the deserializer used irrespective if it is a text * message. Defaults to false, in which case the default encoding is used to convert a text message to a String. - * + * * @param ignoreContentType the flag value to set */ public void setIgnoreContentType(boolean ignoreContentType) { @@ -65,7 +65,7 @@ public class SerializerMessageConverter extends AbstractMessageConverter { /** * The serializer to use for converting Java objects to message bodies. - * + * * @param serializer the serializer to set */ public void setSerializer(Serializer serializer) { @@ -74,7 +74,7 @@ public class SerializerMessageConverter extends AbstractMessageConverter { /** * The deserializer to use for converting from message body to Java object. - * + * * @param deserializer the deserializer to set */ public void setDeserializer(Deserializer deserializer) { diff --git a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SimpleMessageConverter.java b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SimpleMessageConverter.java index 6e3ee239..d4183e05 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SimpleMessageConverter.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SimpleMessageConverter.java @@ -35,7 +35,7 @@ import org.springframework.util.ClassUtils; * or byte arrays. The {@link #toMessage(Object, MessageProperties)} method simply checks the * type of the provided instance while the {@link #fromMessage(Message)} method relies upon the * {@link MessageProperties#getContentType() content-type} of the provided Message. - * + * * @author Mark Fisher * @author Oleg Zhurakousky */ @@ -58,7 +58,7 @@ public class SimpleMessageConverter extends AbstractMessageConverter implements * spaces. *

* Follows RMI's codebase conventions for dynamic class download. - * + * * @see org.springframework.remoting.rmi.CodebaseAwareObjectInputStream * @see java.rmi.server.RMIClassLoader */ @@ -93,7 +93,7 @@ public class SimpleMessageConverter extends AbstractMessageConverter implements catch (UnsupportedEncodingException e) { throw new MessageConversionException( "failed to convert text-based Message content", e); - } + } } else if (contentType != null && contentType.equals(MessageProperties.CONTENT_TYPE_SERIALIZED_OBJECT)) { @@ -104,7 +104,7 @@ public class SimpleMessageConverter extends AbstractMessageConverter implements "failed to convert serialized Message content", e); } catch (IllegalArgumentException e) { throw new MessageConversionException( - "failed to convert serialized Message content", e); + "failed to convert serialized Message content", e); } } } @@ -118,7 +118,7 @@ public class SimpleMessageConverter extends AbstractMessageConverter implements * Creates an AMQP Message from the provided Object. */ protected Message createMessage(Object object, MessageProperties messageProperties) throws MessageConversionException { - byte[] bytes = null; + byte[] bytes = null; if (object instanceof byte[]) { bytes = (byte[]) object; messageProperties.setContentType(MessageProperties.CONTENT_TYPE_BYTES); @@ -139,7 +139,7 @@ public class SimpleMessageConverter extends AbstractMessageConverter implements bytes = SerializationUtils.serialize(object); } catch (IllegalArgumentException e) { throw new MessageConversionException( - "failed to convert to serialized Message content", e); + "failed to convert to serialized Message content", e); } messageProperties.setContentType(MessageProperties.CONTENT_TYPE_SERIALIZED_OBJECT); } diff --git a/spring-amqp/src/main/java/org/springframework/amqp/utils/SerializationUtils.java b/spring-amqp/src/main/java/org/springframework/amqp/utils/SerializationUtils.java index 35434d5d..2ba7f984 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/utils/SerializationUtils.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/utils/SerializationUtils.java @@ -24,14 +24,14 @@ import java.io.ObjectOutputStream; /** * Static utility to help with serialization. - * + * * @author Dave Syer */ public class SerializationUtils { /** * Serialize the object provided. - * + * * @param object the object to serialize * @return an array of bytes representing the object in a portable fashion */ diff --git a/spring-amqp/src/test/java/org/springframework/amqp/core/BindingBuilderTests.java b/spring-amqp/src/test/java/org/springframework/amqp/core/BindingBuilderTests.java index 04daab7f..c4c158c5 100644 --- a/spring-amqp/src/test/java/org/springframework/amqp/core/BindingBuilderTests.java +++ b/spring-amqp/src/test/java/org/springframework/amqp/core/BindingBuilderTests.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. diff --git a/spring-amqp/src/test/java/org/springframework/amqp/core/MessagePropertiesTests.java b/spring-amqp/src/test/java/org/springframework/amqp/core/MessagePropertiesTests.java index 26368d23..bf078ace 100644 --- a/spring-amqp/src/test/java/org/springframework/amqp/core/MessagePropertiesTests.java +++ b/spring-amqp/src/test/java/org/springframework/amqp/core/MessagePropertiesTests.java @@ -25,7 +25,7 @@ import org.junit.Test; * */ public class MessagePropertiesTests { - + @Test public void testReplyTo() throws Exception { MessageProperties properties = new MessageProperties(); diff --git a/spring-amqp/src/test/java/org/springframework/amqp/support/converter/DefaultJavaTypeMapperTest.java b/spring-amqp/src/test/java/org/springframework/amqp/support/converter/DefaultJavaTypeMapperTest.java index 439d6fed..9a8db97b 100644 --- a/spring-amqp/src/test/java/org/springframework/amqp/support/converter/DefaultJavaTypeMapperTest.java +++ b/spring-amqp/src/test/java/org/springframework/amqp/support/converter/DefaultJavaTypeMapperTest.java @@ -212,7 +212,7 @@ public class DefaultJavaTypeMapperTest { assertThat(contentClassName, equalTo(String.class.getName())); assertThat(keyClassName, equalTo(SimpleTrade.class.getName())); } - + @Test public void fromClassShouldPopulateWithJavaTypeNameByDefault() { javaTypeMapper.fromClass(SimpleTrade.class, properties); @@ -230,7 +230,7 @@ public class DefaultJavaTypeMapperTest { assertEquals(SimpleTrade.class, clazz); } - + private Map> map(String string, Class clazz) { Map> map = new HashMap>(); map.put(string, clazz); diff --git a/spring-amqp/src/test/java/org/springframework/amqp/support/converter/SimpleTrade.java b/spring-amqp/src/test/java/org/springframework/amqp/support/converter/SimpleTrade.java index af1de286..728b0277 100644 --- a/spring-amqp/src/test/java/org/springframework/amqp/support/converter/SimpleTrade.java +++ b/spring-amqp/src/test/java/org/springframework/amqp/support/converter/SimpleTrade.java @@ -5,19 +5,19 @@ import java.math.BigDecimal; public class SimpleTrade { private String ticker; - + private long quantity; - + private BigDecimal price; - + private String orderType; - + private String accountName; - + private boolean buyRequest; - + private String userName; - + private String requestId; public String getTicker() { @@ -148,6 +148,6 @@ public class SimpleTrade { return false; return true; } - - + + } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/ErlangBadRpcException.java b/spring-erlang/src/main/java/org/springframework/erlang/ErlangBadRpcException.java index 0ee99c33..19dc0996 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/ErlangBadRpcException.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/ErlangBadRpcException.java @@ -26,11 +26,11 @@ import com.ericsson.otp.erlang.OtpErlangTuple; public class ErlangBadRpcException extends OtpException { private OtpErlangTuple reasonTuple; - + public ErlangBadRpcException(String reason) { super(reason); } - + public ErlangBadRpcException(OtpErlangTuple tuple) { super(tuple.toString()); this.reasonTuple = tuple; @@ -40,10 +40,10 @@ public class ErlangBadRpcException extends OtpException { return reasonTuple; } - - + + } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/ErlangErrorRpcException.java b/spring-erlang/src/main/java/org/springframework/erlang/ErlangErrorRpcException.java index dd0c72f3..6d32fa4f 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/ErlangErrorRpcException.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/ErlangErrorRpcException.java @@ -26,11 +26,11 @@ import com.ericsson.otp.erlang.OtpErlangTuple; public class ErlangErrorRpcException extends OtpException { private OtpErlangTuple reasonTuple; - + public ErlangErrorRpcException(String message) { super(message); } - + public ErlangErrorRpcException(OtpErlangTuple tuple) { super(tuple.toString()); this.reasonTuple = tuple; @@ -40,5 +40,5 @@ public class ErlangErrorRpcException extends OtpException { return reasonTuple; } - + } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/OtpAuthException.java b/spring-erlang/src/main/java/org/springframework/erlang/OtpAuthException.java index e043cd05..2749a31e 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/OtpAuthException.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/OtpAuthException.java @@ -18,7 +18,7 @@ package org.springframework.erlang; /** * Runtime exception mirroring the OTP OtpAuthException. - * + * * @author Mark Pollack */ @SuppressWarnings("serial") diff --git a/spring-erlang/src/main/java/org/springframework/erlang/OtpException.java b/spring-erlang/src/main/java/org/springframework/erlang/OtpException.java index d1c69776..f5c42a51 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/OtpException.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/OtpException.java @@ -18,7 +18,7 @@ package org.springframework.erlang; /** * Base RuntimeException for errors that occur when executing OTP operations. - * + * * @author Mark Pollack */ @SuppressWarnings("serial") diff --git a/spring-erlang/src/main/java/org/springframework/erlang/OtpIOException.java b/spring-erlang/src/main/java/org/springframework/erlang/OtpIOException.java index 43e63944..50594d96 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/OtpIOException.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/OtpIOException.java @@ -21,7 +21,7 @@ import java.io.IOException; /** * RuntimeException wrapper for an {@link IOException} which * can be commonly thrown from OTP operations. - * + * * @author Mark Pollack * @author Mark Fisher */ diff --git a/spring-erlang/src/main/java/org/springframework/erlang/UncategorizedOtpException.java b/spring-erlang/src/main/java/org/springframework/erlang/UncategorizedOtpException.java index 17677f5b..deb11a71 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/UncategorizedOtpException.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/UncategorizedOtpException.java @@ -19,7 +19,7 @@ package org.springframework.erlang; /** * A "catch-all" exception type within the OtpException hierarchy * when no more specific cause is known. - * + * * @author Mark Pollack */ @SuppressWarnings("serial") diff --git a/spring-erlang/src/main/java/org/springframework/erlang/connection/Connection.java b/spring-erlang/src/main/java/org/springframework/erlang/connection/Connection.java index d0952882..ee2f7133 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/connection/Connection.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/connection/Connection.java @@ -26,11 +26,11 @@ import com.ericsson.otp.erlang.OtpErlangObject; /** * A simple interface that is used to wrap access to the OtpConnection class in order to support * caching of OptConnections via method interception. - * + * * Note: The surface area of the API is all that is required to implement administrative functionality * for the Spring AMQP admin project. To access the underlying OtpConnection, use the method getTargetConnection * on the interface ConnectionProxy that is implemented by DefaultConnection. - * + * * @author Mark Pollack * */ @@ -40,20 +40,20 @@ public interface Connection { * Close the connection to the remote node. */ void close(); - + /** * Send an RPC request to the remote Erlang node. This convenience function * creates the following message and sends it to 'rex' on the remote node: - * + * *

      * { self, { call, Mod, Fun, Args, user } }
      * 
- * + * *

* Note that this method has unpredicatble results if the remote node is not * an Erlang node. *

- * + * * @param mod * the name of the Erlang module containing the function to * be called. @@ -62,38 +62,38 @@ public interface Connection { * @param args * a list of Erlang terms, to be used as arguments to the * function. - * + * * @exception java.io.IOException * if the connection is not active or a communication * error occurs. */ void sendRPC(final String mod, final String fun, final OtpErlangList args) throws IOException; - + /** * Receive an RPC reply from the remote Erlang node. This convenience * function receives a message from the remote node, and expects it to have * the following format: - * + * *
      * { rex, Term }
      * 
- * + * * @return the second element of the tuple if the received message is a * two-tuple, otherwise null. No further error checking is * performed. - * + * * @exception java.io.IOException * if the connection is not active or a communication * error occurs. - * + * * @exception OtpErlangExit * if an exit signal is received from a process on the * peer node. - * + * * @exception OtpAuthException * if the remote node sends a message containing an * invalid cookie. */ OtpErlangObject receiveRPC() throws IOException, OtpErlangExit, OtpAuthException; - + } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionFactory.java b/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionFactory.java index 168d5df7..bdda9e5c 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionFactory.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionFactory.java @@ -24,13 +24,13 @@ import com.ericsson.otp.erlang.OtpConnection; /** * An interface based ConnectionFactory for creating {@link OtpConnection}s. - * + * *

NOTE: The Rabbit API contains a ConnectionFactory class (same name). - * + * * @author Mark Pollack */ public interface ConnectionFactory { - Connection createConnection() throws UnknownHostException, OtpAuthException, IOException; + Connection createConnection() throws UnknownHostException, OtpAuthException, IOException; } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionFactoryUtils.java b/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionFactoryUtils.java index 2ff19956..45d0e154 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionFactoryUtils.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionFactoryUtils.java @@ -42,5 +42,5 @@ public class ConnectionFactoryUtils { logger.debug("Could not close Otp Connection", ex); } } - + } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionParameters.java b/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionParameters.java index 8032ad64..43e3d226 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionParameters.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionParameters.java @@ -30,12 +30,12 @@ import com.ericsson.otp.erlang.OtpSelf; public class ConnectionParameters { private OtpSelf otpSelf; - + private OtpPeer otpPeer; - + public ConnectionParameters(OtpSelf otpSelf, OtpPeer otpPeer) { Assert.notNull(otpSelf, "OtpSelf must be non-null"); - Assert.notNull(otpPeer, "OtpPeer must be non-null"); + Assert.notNull(otpPeer, "OtpPeer must be non-null"); this.otpSelf = otpSelf; this.otpPeer = otpPeer; } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionProxy.java b/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionProxy.java index ff278918..4bd4de15 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionProxy.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/connection/ConnectionProxy.java @@ -21,7 +21,7 @@ import com.ericsson.otp.erlang.OtpConnection; /** * Subinterface of {@link Connection} to be implemented by Connection proxies. * Allows access to the underlying target Connection - * + * * @author Mark Pollack * */ diff --git a/spring-erlang/src/main/java/org/springframework/erlang/connection/DefaultConnection.java b/spring-erlang/src/main/java/org/springframework/erlang/connection/DefaultConnection.java index dc3a64a0..032dbfe3 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/connection/DefaultConnection.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/connection/DefaultConnection.java @@ -31,20 +31,20 @@ import com.ericsson.otp.erlang.OtpErlangObject; public class DefaultConnection implements ConnectionProxy { private OtpConnection otpConnection; - - + + public DefaultConnection(OtpConnection otpConnection) { this.otpConnection = otpConnection; } public void close() { - otpConnection.close(); + otpConnection.close(); } public void sendRPC(String mod, String fun, OtpErlangList args) throws IOException { otpConnection.sendRPC(mod, fun, args); - + } public OtpErlangObject receiveRPC() throws IOException, OtpErlangExit, diff --git a/spring-erlang/src/main/java/org/springframework/erlang/connection/SimpleConnectionFactory.java b/spring-erlang/src/main/java/org/springframework/erlang/connection/SimpleConnectionFactory.java index 66fe8475..1f232483 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/connection/SimpleConnectionFactory.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/connection/SimpleConnectionFactory.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -51,14 +51,14 @@ import com.ericsson.otp.erlang.OtpSelf; * of the short and long formats, in particular they cannot be mixed freely in a network of communicating nodes, however * Jinterface makes no distinction. See the Erlang documentation for more information about nodenames. *

- * + * *

* The constructors for the AbstractNode classes will create names exactly as you provide them as long as the name * contains '@'. If the string you provide contains no '@', it will be treated as an alivename and the name of the local * host will be appended, resulting in a shortname. Nodenames longer than 255 characters will be truncated without * warning. *

- * + * *

* Upon initialization, this class attempts to read the file .erlang.cookie in the user's home directory, and uses the * trimmed first line of the file as the default cookie by those constructors lacking a cookie argument. If for any @@ -81,7 +81,7 @@ public class SimpleConnectionFactory implements ConnectionFactory, InitializingB private final String peerNodeName; private final String cookie; - + private OtpSelf otpSelf; private OtpPeer otpPeer; diff --git a/spring-erlang/src/main/java/org/springframework/erlang/connection/SingleConnectionFactory.java b/spring-erlang/src/main/java/org/springframework/erlang/connection/SingleConnectionFactory.java index 20a7e6b3..f61bfd02 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/connection/SingleConnectionFactory.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/connection/SingleConnectionFactory.java @@ -40,10 +40,10 @@ import com.ericsson.otp.erlang.OtpSelf; /** * A {@link ConnectionFactory} implementation that returns the same Connections from all * {@link #createConnection()} calls, and ignores calls to {@link Connection#close()}. - * + * * Provides a more traditional API to creating a connection to a remote erlang * node than the JInterface API. - * + * *

* The following is taken from the JInterface javadocs that describe the valid * node names that can be used. These naming constraints apply to the string @@ -58,7 +58,7 @@ import com.ericsson.otp.erlang.OtpSelf; * however Jinterface makes no distinction. See the Erlang documentation for * more information about nodenames. *

- * + * *

* The constructors for the AbstractNode classes will create names exactly as * you provide them as long as the name contains '@'. If the string you provide @@ -66,7 +66,7 @@ import com.ericsson.otp.erlang.OtpSelf; * host will be appended, resulting in a shortname. Nodenames longer than 255 * characters will be truncated without warning. *

- * + * *

* Upon initialization, this class attempts to read the file .erlang.cookie in * the user's home directory, and uses the trimmed first line of the file as the @@ -76,14 +76,14 @@ import com.ericsson.otp.erlang.OtpSelf; * using the system property "user.home", which may not be automatically set on * all platforms. *

- * + * * @author Mark Pollack */ public class SingleConnectionFactory implements ConnectionFactory, InitializingBean, DisposableBean { protected final Log logger = LogFactory.getLog(getClass()); - + private boolean uniqueSelfNodeName = true; private String selfNodeName; @@ -116,7 +116,7 @@ public class SingleConnectionFactory implements ConnectionFactory, this.selfNodeName = selfNodeName; this.peerNodeName = peerNodeName; } - + public boolean isUniqueSelfNodeName() { return uniqueSelfNodeName; } @@ -156,7 +156,7 @@ public class SingleConnectionFactory implements ConnectionFactory, this.connection = getSharedConnectionProxy(this.targetConnection); } } - + /** * Close the underlying shared connection. * The provider of this ConnectionFactory needs to care for proper shutdown. @@ -166,7 +166,7 @@ public class SingleConnectionFactory implements ConnectionFactory, public void destroy() { resetConnection(); } - + /** * Reset the underlying shared Connection, to be reinitialized on next access. */ @@ -182,7 +182,7 @@ public class SingleConnectionFactory implements ConnectionFactory, /** * Close the given Connection. - * + * * @param connection * the Connection to close */ @@ -202,7 +202,7 @@ public class SingleConnectionFactory implements ConnectionFactory, /** * Create a JInterface Connection via this class's ConnectionFactory. - * + * * @return the new Otp Connection * @throws OtpAuthException */ @@ -219,7 +219,7 @@ public class SingleConnectionFactory implements ConnectionFactory, * call to it but suppresses close calls. This is useful for allowing * application code to handle a special framework Connection just like an * ordinary Connection from a Rabbit ConnectionFactory. - * + * * @param target * the original Connection to wrap * @return the wrapped Connection @@ -235,7 +235,7 @@ public class SingleConnectionFactory implements ConnectionFactory, /* * (non-Javadoc) - * + * * @see * org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ @@ -246,7 +246,7 @@ public class SingleConnectionFactory implements ConnectionFactory, if (isUniqueSelfNodeName()) { selfNodeNameToUse = this.selfNodeName + "-" + UUID.randomUUID().toString(); logger.debug("Creating OtpSelf with node name = [" + selfNodeNameToUse + "]"); - } + } try { if (this.cookie == null) { this.otpSelf = new OtpSelf(selfNodeNameToUse.trim()); @@ -256,7 +256,7 @@ public class SingleConnectionFactory implements ConnectionFactory, } catch (IOException e) { throw new OtpIOException(e); } - this.otpPeer = new OtpPeer(this.peerNodeName.trim()); + this.otpPeer = new OtpPeer(this.peerNodeName.trim()); } private class SharedConnectionInvocationHandler implements diff --git a/spring-erlang/src/main/java/org/springframework/erlang/core/Application.java b/spring-erlang/src/main/java/org/springframework/erlang/core/Application.java index 8ceca86b..29f0e7cf 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/core/Application.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/core/Application.java @@ -21,9 +21,9 @@ import java.io.Serializable; /** * Describes an Erlang application. Only three fields are supported as that is the level * of information that rabbitmq returns when performing a status request. - * + * * See http://www.erlang.org/doc/man/app.html for full details - * + * * @author Mark Pollack * */ @@ -31,9 +31,9 @@ import java.io.Serializable; public class Application implements Serializable { private String description; - + private String id; - + private String version; public Application(String description, String id, String version) { @@ -63,5 +63,5 @@ public class Application implements Serializable { } - + } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/core/ConnectionCallback.java b/spring-erlang/src/main/java/org/springframework/erlang/core/ConnectionCallback.java index 864b6159..11760a4f 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/core/ConnectionCallback.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/core/ConnectionCallback.java @@ -25,7 +25,7 @@ import org.springframework.erlang.connection.Connection; public interface ConnectionCallback { /** - * Execute any number of operations against the supplied OTP connection, + * Execute any number of operations against the supplied OTP connection, * possibly returning a result. */ T doInConnection(Connection connection) throws Exception; //Not sure everything it throws diff --git a/spring-erlang/src/main/java/org/springframework/erlang/core/ErlangOperations.java b/spring-erlang/src/main/java/org/springframework/erlang/core/ErlangOperations.java index 8742c812..19f0270b 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/core/ErlangOperations.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/core/ErlangOperations.java @@ -31,16 +31,16 @@ import com.ericsson.otp.erlang.OtpErlangObject; public interface ErlangOperations { T execute(ConnectionCallback action) throws OtpException; - + OtpErlangObject executeErlangRpc(String module, String function, OtpErlangList args) throws OtpException; - - + + OtpErlangObject executeErlangRpc(String module, String function, OtpErlangObject... args) throws OtpException; - - + + OtpErlangObject executeRpc(String module, String function, Object... args) throws OtpException; - + Object executeAndConvertRpc(String module, String function, ErlangConverter converterToUse, Object... args) throws OtpException; - + Object executeAndConvertRpc(String module, String function, Object... args) throws OtpException; } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/core/ErlangTemplate.java b/spring-erlang/src/main/java/org/springframework/erlang/core/ErlangTemplate.java index dd5242e1..7816a102 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/core/ErlangTemplate.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/core/ErlangTemplate.java @@ -42,12 +42,12 @@ public class ErlangTemplate extends ErlangAccessor implements ErlangOperations { setConnectionFactory(connectionFactory); afterPropertiesSet(); } - + public OtpErlangObject executeErlangRpc(final String module, final String function, final OtpErlangList args) { return execute(new ConnectionCallback() { - public OtpErlangObject doInConnection(Connection connection) throws Exception { + public OtpErlangObject doInConnection(Connection connection) throws Exception { logger.debug("Sending RPC for module [" + module + "] function [" + function + "] args [" + args); - connection.sendRPC(module, function, args); + connection.sendRPC(module, function, args); //TODO consider dedicated response object. OtpErlangObject response = connection.receiveRPC(); logger.debug("Response received = " + response.toString()); @@ -56,7 +56,7 @@ public class ErlangTemplate extends ErlangAccessor implements ErlangOperations { } }); } - + public void handleResponseError(String module, String function, OtpErlangObject result) { //{badrpc,{'EXIT',{undef,[{rabbit_access_control,list_users,[[]]},{rpc,'-handle_call/3-fun-0-',5}]}}} @@ -66,7 +66,7 @@ public class ErlangTemplate extends ErlangAccessor implements ErlangOperations { { OtpErlangAtom responseAtom = (OtpErlangAtom)msg.elementAt(0); //TODO consider error handler strategy. - if (responseAtom.atomValue().equals("badrpc")) { + if (responseAtom.atomValue().equals("badrpc")) { if (msg.elementAt(1) instanceof OtpErlangTuple) { throw new ErlangBadRpcException( (OtpErlangTuple)msg.elementAt(1)); } else { @@ -82,23 +82,23 @@ public class ErlangTemplate extends ErlangAccessor implements ErlangOperations { } } } - + public OtpErlangObject executeErlangRpc(String module, String function, OtpErlangObject... args) { return executeRpc(module, function, new OtpErlangList(args)); } - + public OtpErlangObject executeRpc(String module, String function, Object... args) { return executeErlangRpc(module, function, (OtpErlangList) erlangConverter.toErlang(args)); } - + public Object executeAndConvertRpc(String module, String function, ErlangConverter converterToUse, Object... args) { return converterToUse.fromErlang(executeRpc(module, function, converterToUse.toErlang(args))); } - - public Object executeAndConvertRpc(String module, String function, Object... args) { + + public Object executeAndConvertRpc(String module, String function, Object... args) { return erlangConverter.fromErlangRpc(module, function, executeErlangRpc(module, function, (OtpErlangList)erlangConverter.toErlang(args))); } - + public ErlangConverter getErlangConverter() { return erlangConverter; } @@ -111,23 +111,23 @@ public class ErlangTemplate extends ErlangAccessor implements ErlangOperations { Assert.notNull(action, "Callback object must not be null"); Connection con = null; - try { + try { con = createConnection(); return action.doInConnection(con); - } + } catch (OtpException ex) { - throw ex; + throw ex; } catch (Exception ex) { - throw convertOtpAccessException(ex); + throw convertOtpAccessException(ex); } - finally { - org.springframework.erlang.connection.ConnectionFactoryUtils.releaseConnection(con, getConnectionFactory()); + finally { + org.springframework.erlang.connection.ConnectionFactoryUtils.releaseConnection(con, getConnectionFactory()); } // TODO: physically close and reopen the connection if there is an exception - + } - + /** * Convert the specified checked exception to * a Spring runtime exception equivalent. @@ -144,10 +144,10 @@ public class ErlangTemplate extends ErlangAccessor implements ErlangOperations { - - - - + + + + } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/core/Node.java b/spring-erlang/src/main/java/org/springframework/erlang/core/Node.java index 9a6efe5f..0dfa95d1 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/core/Node.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/core/Node.java @@ -15,7 +15,7 @@ */ /** - * Describes an Erlang node. + * Describes an Erlang node. */ package org.springframework.erlang.core; @@ -23,7 +23,7 @@ import java.io.Serializable; /** * Simple description class for an Erlang node. - * + * * @author Mark Pollack * */ @@ -44,5 +44,5 @@ public class Node implements Serializable { public String toString() { return "Node [name=" + name + "]"; } - + } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/support/ErlangAccessor.java b/spring-erlang/src/main/java/org/springframework/erlang/support/ErlangAccessor.java index 7868d905..31685adc 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/support/ErlangAccessor.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/support/ErlangAccessor.java @@ -38,26 +38,26 @@ public abstract class ErlangAccessor implements InitializingBean { protected final Log logger = LogFactory.getLog(getClass()); private ConnectionFactory connectionFactory; - + protected Connection createConnection() throws UnknownHostException, OtpAuthException, IOException { return getConnectionFactory().createConnection(); } - + public void setConnectionFactory(ConnectionFactory connectionFactory) { this.connectionFactory = connectionFactory; } - + public ConnectionFactory getConnectionFactory() { return this.connectionFactory; } - + public void afterPropertiesSet() { if (getConnectionFactory() == null) { throw new IllegalArgumentException("Property 'connectionFactory' is required"); } } - + protected OtpException convertOtpAccessException(Exception ex) { return ErlangUtils.convertOtpAccessException(ex); } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/support/ErlangUtils.java b/spring-erlang/src/main/java/org/springframework/erlang/support/ErlangUtils.java index b678f426..edf2f602 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/support/ErlangUtils.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/support/ErlangUtils.java @@ -40,17 +40,17 @@ public class ErlangUtils { if (con == null) { return; } - con.close(); + con.close(); } - + public static OtpException convertOtpAccessException(Exception ex) { Assert.notNull(ex, "Exception must not be null"); if (ex instanceof IOException) { return new OtpIOException((IOException) ex); - } + } if (ex instanceof OtpAuthException) { return new org.springframework.erlang.OtpAuthException((OtpAuthException) ex); - } + } //fallback return new UncategorizedOtpException(ex); } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/support/converter/ErlangConverter.java b/spring-erlang/src/main/java/org/springframework/erlang/support/converter/ErlangConverter.java index d808f33c..f493c351 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/support/converter/ErlangConverter.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/support/converter/ErlangConverter.java @@ -19,8 +19,8 @@ package org.springframework.erlang.support.converter; import com.ericsson.otp.erlang.OtpErlangObject; /** - * Converter between Java and Erlang Types. Additional support for converting results from RPC calls. - * + * Converter between Java and Erlang Types. Additional support for converting results from RPC calls. + * * @author Mark Pollack */ public interface ErlangConverter { @@ -40,6 +40,6 @@ public interface ErlangConverter { * @throws ErlangConversionException in case of conversion failure */ Object fromErlang(OtpErlangObject erlangObject) throws ErlangConversionException; - + Object fromErlangRpc(String module, String function, OtpErlangObject erlangObject) throws ErlangConversionException; } diff --git a/spring-erlang/src/main/java/org/springframework/erlang/support/converter/SimpleErlangConverter.java b/spring-erlang/src/main/java/org/springframework/erlang/support/converter/SimpleErlangConverter.java index 29a9e34a..178aa768 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/support/converter/SimpleErlangConverter.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/support/converter/SimpleErlangConverter.java @@ -37,7 +37,7 @@ import com.ericsson.otp.erlang.OtpErlangString; /** * Converter that supports the basic types and arrays. * @author Mark Pollack - * + * */ public class SimpleErlangConverter implements ErlangConverter { @@ -129,9 +129,9 @@ public class SimpleErlangConverter implements ErlangConverter { } else if (erlangObject instanceof OtpErlangShort) { return ((OtpErlangShort) erlangObject).shortValue(); } else if (erlangObject instanceof OtpErlangString) { - return ((OtpErlangString) erlangObject).stringValue(); + return ((OtpErlangString) erlangObject).stringValue(); } else if (erlangObject instanceof OtpErlangPid) { - return ((OtpErlangPid) erlangObject).toString(); + return ((OtpErlangPid) erlangObject).toString(); } else { throw new ErlangConversionException( "Could not convert Erlang object [" @@ -147,7 +147,7 @@ public class SimpleErlangConverter implements ErlangConverter { public static boolean extractBoolean(OtpErlangObject erlangObject) { return ((OtpErlangBoolean) erlangObject).booleanValue(); } - + public static String extractPid(OtpErlangObject value) { return ((OtpErlangPid)value).toString(); } diff --git a/spring-erlang/src/main/java/org/springframework/util/exec/Background.java b/spring-erlang/src/main/java/org/springframework/util/exec/Background.java index 8b00643e..32d062c4 100644 --- a/spring-erlang/src/main/java/org/springframework/util/exec/Background.java +++ b/spring-erlang/src/main/java/org/springframework/util/exec/Background.java @@ -22,7 +22,7 @@ import java.util.ArrayList; /** * Class to execute processes in the background. These processes - * will not exit once the controlling Java process exits. + * will not exit once the controlling Java process exits. */ public class Background { /** @@ -33,9 +33,9 @@ public class Background { throws IOException { File devNull; - if(Os.isFamily("unix")) + if(Os.isFamily("unix")) devNull = new File("/dev/null"); - else if (Os.isFamily("windows")) + else if (Os.isFamily("windows")) devNull = new File("NUL"); else throw new IllegalStateException("Unhandled Java environment"); @@ -49,10 +49,10 @@ public class Background { * @param appendOut If true, append the file with standard out, * else truncate or create a new file * @param errFile File to send standard err from the process to - * @param appendErr If true, append the file with standard error, + * @param appendErr If true, append the file with standard error, * else truncate or create a new file */ - public static void exec(String[] cmd, + public static void exec(String[] cmd, File outFile, boolean appendOut, File errFile, boolean appendErr) throws IOException @@ -65,8 +65,8 @@ public class Background { throw new IllegalStateException("Unhandled Java environment"); } - private static void execUnix(String[] cmd, - File outFile, boolean appendOut, + private static void execUnix(String[] cmd, + File outFile, boolean appendOut, File errFile, boolean appendErr) throws IOException { @@ -82,11 +82,11 @@ public class Background { execCmd = new String[] { "/bin/sh", "-c", - escaped.toString() + - (appendOut == true ? ">>" : ">") + + escaped.toString() + + (appendOut == true ? ">>" : ">") + Escape.escape(outFile.getAbsolutePath()) + " 2" + (appendErr == true ? ">>" : " >") + - Escape.escape(errFile.getAbsolutePath()) + + Escape.escape(errFile.getAbsolutePath()) + " >" : ">") + + tmpCmd.add((appendOut == true ? ">>" : ">") + Escape.escape(outFile.getAbsolutePath())); - tmpCmd.add((outFile.equals(errFile) ? " 2&" : " 2") + + tmpCmd.add((outFile.equals(errFile) ? " 2&" : " 2") + (appendErr == true ? ">>" : " >") + - Escape.escape(errFile.getAbsolutePath())); + Escape.escape(errFile.getAbsolutePath())); Runtime.getRuntime().exec(tmpCmd.toArray(cmd)); } diff --git a/spring-erlang/src/main/java/org/springframework/util/exec/Escape.java b/spring-erlang/src/main/java/org/springframework/util/exec/Escape.java index 17a5deb1..1550f106 100644 --- a/spring-erlang/src/main/java/org/springframework/util/exec/Escape.java +++ b/spring-erlang/src/main/java/org/springframework/util/exec/Escape.java @@ -26,7 +26,7 @@ public class Escape { } /** - * Escape a string by quoting the magical elements + * Escape a string by quoting the magical elements * (such as whitespace, quotes, slashes, etc.) */ public static String escape(String in){ @@ -42,7 +42,7 @@ public class Escape { if(outChars.length - numOut < 5){ outChars = enlargeArray(outChars); } - + if(Character.isWhitespace(inChars[i]) || inChars[i] == '\\' || inChars[i] == '\'' || diff --git a/spring-erlang/src/main/java/org/springframework/util/exec/Execute.java b/spring-erlang/src/main/java/org/springframework/util/exec/Execute.java index a29a67b0..4b7fec31 100644 --- a/spring-erlang/src/main/java/org/springframework/util/exec/Execute.java +++ b/spring-erlang/src/main/java/org/springframework/util/exec/Execute.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -28,8 +28,8 @@ import org.apache.commons.logging.LogFactory; * Runs an external program. Derived from ant exec task. All the 'backward compat with jdk1.1, 1.2' removed. Since * jdk1.3 supports working dir, no need for scripts. All ant-specific code has been removed as well, this is a * completely independent component. - * - * + * + * * @author thomas.haas@softwired-inc.com * @author Costin Leau */ @@ -133,7 +133,7 @@ public class Execute { /** * Creates a new execute object. - * + * * @param streamHandler the stream handler used to handle the input and output streams of the subprocess. */ public Execute(ExecuteStreamHandler streamHandler) { @@ -142,7 +142,7 @@ public class Execute { /** * Creates a new execute object. - * + * * @param streamHandler the stream handler used to handle the input and output streams of the subprocess. * @param watchdog a watchdog for the subprocess or null to to disable a timeout for the subprocess. */ @@ -153,7 +153,7 @@ public class Execute { /** * Returns the commandline used to create a subprocess. - * + * * @return the commandline used to create a subprocess */ public String[] getCommandline() { @@ -166,7 +166,7 @@ public class Execute { /** * Sets the commandline of the subprocess to launch. - * + * * @param commandline the commandline of the subprocess to launch */ public void setCommandline(String[] commandline) { @@ -175,7 +175,7 @@ public class Execute { /** * Set whether to propagate the default environment or not. - * + * * @param newenv whether to propagate the process environment. */ public void setNewenvironment(boolean newenv) { @@ -184,7 +184,7 @@ public class Execute { /** * Returns the environment used to create a subprocess. - * + * * @return the environment used to create a subprocess */ public String[] getEnvironment() { @@ -195,7 +195,7 @@ public class Execute { /** * Sets the environment variables for the subprocess to launch. - * + * * @param env array of Strings, each element of which has an environment variable settings in format * key=value */ @@ -205,10 +205,10 @@ public class Execute { /** * Sets the working directory of the process to execute. - * + * *

This is emulated using the antRun scripts unless the OS is Windows NT in which case a cmd.exe is spawned, or * MRJ and setting user.dir works, or JDK 1.3 and there is official support in java.lang.Runtime. - * + * * @param wd the working directory of the process. */ public void setWorkingDirectory(File wd) { @@ -217,7 +217,7 @@ public class Execute { /** * Runs a process defined by the command line and returns its exit status. - * + * * @return the exit status of the subprocess or INVALID * @throws Exception if launching of the subprocess failed */ @@ -300,7 +300,7 @@ public class Execute { /** * query the exit value of the process. - * + * * @return the exit value, 1 if the process was killed, or Project.INVALID if no exit value has been received */ public int getExitValue() { @@ -309,7 +309,7 @@ public class Execute { /** * Patch the current environment with the new values from the user. - * + * * @return the patched environment */ private String[] patchEnvironment() { @@ -349,7 +349,7 @@ public class Execute { /** * Wrapper for common execution patterns - * + * * @param envVars Environment variables to execute with (optional) * @param cmd a vector of the commands to execute * @param baseDir the base directory to run from (optional) diff --git a/spring-erlang/src/main/java/org/springframework/util/exec/ExecuteWatchdog.java b/spring-erlang/src/main/java/org/springframework/util/exec/ExecuteWatchdog.java index 014b52a9..55ca689d 100644 --- a/spring-erlang/src/main/java/org/springframework/util/exec/ExecuteWatchdog.java +++ b/spring-erlang/src/main/java/org/springframework/util/exec/ExecuteWatchdog.java @@ -29,13 +29,13 @@ package org.springframework.util.exec; * // it was killed on purpose by the watchdog * } * - + * @author thomas.haas@softwired-inc.com * @author Stephane Bailliez * @see Execute */ public class ExecuteWatchdog implements Runnable { - + /** the process to execute and watch for duration */ private Process process; @@ -44,7 +44,7 @@ public class ExecuteWatchdog implements Runnable { /** say whether or not the watchog is currently monitoring a process */ private boolean watch = false; - + /** exception that might be thrown during the process execution */ private Exception caught = null; @@ -69,7 +69,7 @@ public class ExecuteWatchdog implements Runnable { public void setDontkill( boolean b ) { dontkill=b; } - + /** * Watches the given process and terminates it, if it runs for too long. * All information from the previous run are reset. @@ -143,7 +143,7 @@ public class ExecuteWatchdog implements Runnable { cleanUp(); } } - + /** * reset the monitor flag and the process. diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AbstractExchangeParser.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AbstractExchangeParser.java index 08f409eb..55890b74 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AbstractExchangeParser.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AbstractExchangeParser.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -27,7 +27,7 @@ import org.w3c.dom.Element; /** * @author Dave Syer - * + * */ public abstract class AbstractExchangeParser extends AbstractSingleBeanDefinitionParser { diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AbstractRetryOperationsInterceptorFactoryBean.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AbstractRetryOperationsInterceptorFactoryBean.java index 6c5b5af5..b787873c 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AbstractRetryOperationsInterceptorFactoryBean.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AbstractRetryOperationsInterceptorFactoryBean.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -19,9 +19,9 @@ import org.springframework.retry.RetryOperations; /** * Convenient base class for interceptor factories. - * + * * @author Dave Syer - * + * */ public abstract class AbstractRetryOperationsInterceptorFactoryBean implements FactoryBean { diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AdminParser.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AdminParser.java index 998d655d..dc8eb50f 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AdminParser.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/AdminParser.java @@ -1,11 +1,11 @@ /* * Copyright 2010-2011 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/BindingFactoryBean.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/BindingFactoryBean.java index ca30b888..7f04b676 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/BindingFactoryBean.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/BindingFactoryBean.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -22,7 +22,7 @@ import org.springframework.beans.factory.FactoryBean; /** * @author Dave Syer - * + * */ public class BindingFactoryBean implements FactoryBean { diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/ConnectionFactoryParser.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/ConnectionFactoryParser.java index e9fbc671..e523b4b8 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/ConnectionFactoryParser.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/ConnectionFactoryParser.java @@ -1,11 +1,11 @@ /* * Copyright 2010-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/DirectExchangeParser.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/DirectExchangeParser.java index a57f9450..cd4bb2a0 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/DirectExchangeParser.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/DirectExchangeParser.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -25,7 +25,7 @@ import org.w3c.dom.Element; /** * @author Dave Syer - * + * */ public class DirectExchangeParser extends AbstractExchangeParser { diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FanoutExchangeParser.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FanoutExchangeParser.java index 99ce8561..6bbfb90b 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FanoutExchangeParser.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FanoutExchangeParser.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -24,7 +24,7 @@ import org.w3c.dom.Element; /** * @author Dave Syer - * + * */ public class FanoutExchangeParser extends AbstractExchangeParser { diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FederatedExchangeParser.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FederatedExchangeParser.java index 728ef77a..1bd6205d 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FederatedExchangeParser.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FederatedExchangeParser.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -24,7 +24,7 @@ import org.w3c.dom.Element; /** * @author Gary Russell - * + * */ public class FederatedExchangeParser extends AbstractExchangeParser { @@ -44,7 +44,7 @@ public class FederatedExchangeParser extends AbstractExchangeParser { protected Class getBeanClass(Element element) { return FederatedExchange.class; } - + @Override protected void doParse(Element element, ParserContext parserContext, diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/ListenerContainerParser.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/ListenerContainerParser.java index 7394cf46..6ff11167 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/ListenerContainerParser.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/ListenerContainerParser.java @@ -1,11 +1,11 @@ /* * Copyright 2010-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/QueueParser.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/QueueParser.java index e3ab0dba..19481cbe 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/QueueParser.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/QueueParser.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -26,7 +26,7 @@ import org.w3c.dom.Element; /** * @author Dave Syer - * + * */ public class QueueParser extends AbstractSingleBeanDefinitionParser { diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/RabbitNamespaceHandler.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/RabbitNamespaceHandler.java index 9f1d54f8..1df46b54 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/RabbitNamespaceHandler.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/RabbitNamespaceHandler.java @@ -20,7 +20,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport; /** * Namespace handler for Rabbit. - * + * * @author Mark Pollack * @author Mark Fisher * @author Gary Russell diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/StatelessRetryOperationsInterceptorFactoryBean.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/StatelessRetryOperationsInterceptorFactoryBean.java index ad2183fb..cd6ea859 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/StatelessRetryOperationsInterceptorFactoryBean.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/StatelessRetryOperationsInterceptorFactoryBean.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -30,11 +30,11 @@ import org.springframework.retry.support.RetryTemplate; * retry attempts are exhausted it can be processed using a {@link MessageRecoverer} if one is provided, in the same * transaction (in which case no exception is propagated). If a recoverer is not provided the exception will be * propagated and the message may be redelivered if the channel is transactional. - * + * * @see RetryOperations#execute(org.springframework.retry.RetryCallback, org.springframework.retry.RecoveryCallback) - * + * * @author Dave Syer - * + * */ public class StatelessRetryOperationsInterceptorFactoryBean extends AbstractRetryOperationsInterceptorFactoryBean { diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/AbstractConnectionFactory.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/AbstractConnectionFactory.java index 89eaf18e..9eba87ae 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/AbstractConnectionFactory.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/AbstractConnectionFactory.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -30,7 +30,7 @@ import com.rabbitmq.client.Address; /** * @author Dave Syer * @author Gary Russell - * + * */ public abstract class AbstractConnectionFactory implements ConnectionFactory, DisposableBean { @@ -100,16 +100,16 @@ public abstract class AbstractConnectionFactory implements ConnectionFactory, Di /** * A composite connection listener to be used by subclasses when creating and closing connections. - * + * * @return the connection listener */ protected ConnectionListener getConnectionListener() { return connectionListener; } - + /** * A composite channel listener to be used by subclasses when creating and closing channels. - * + * * @return the channel listener */ protected ChannelListener getChannelListener() { @@ -176,7 +176,7 @@ public abstract class AbstractConnectionFactory implements ConnectionFactory, Di } return temp; } - + public void destroy() { } } \ No newline at end of file diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ChannelListener.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ChannelListener.java index e115edf4..73ce261a 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ChannelListener.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ChannelListener.java @@ -22,7 +22,7 @@ import com.rabbitmq.client.Channel; * */ public interface ChannelListener { - + void onCreate(Channel channel, boolean transactional); } diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ChannelProxy.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ChannelProxy.java index 5ee2b251..d9312d11 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ChannelProxy.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ChannelProxy.java @@ -19,9 +19,9 @@ package org.springframework.amqp.rabbit.connection; import com.rabbitmq.client.Channel; /** - * Subinterface of {@link com.rabbitmq.client.Channel} to be implemented by + * Subinterface of {@link com.rabbitmq.client.Channel} to be implemented by * Channel proxies. Allows access to the underlying target Channel - * + * * @author Mark Pollack * @see CachingConnectionFactory */ diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CompositeChannelListener.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CompositeChannelListener.java index 4718fca8..21f5d981 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CompositeChannelListener.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CompositeChannelListener.java @@ -31,15 +31,15 @@ public class CompositeChannelListener implements ChannelListener { public void onCreate(Channel channel, boolean transactional) { for (ChannelListener delegate : delegates) { delegate.onCreate(channel, transactional); - } + } } public void setDelegates(List delegates) { this.delegates = new ArrayList(delegates); } - + public void addDelegate(ChannelListener delegate) { this.delegates.add(delegate); } - + } diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CompositeConnectionListener.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CompositeConnectionListener.java index 20e51006..2c528795 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CompositeConnectionListener.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CompositeConnectionListener.java @@ -29,21 +29,21 @@ public class CompositeConnectionListener implements ConnectionListener { public void onCreate(Connection connection) { for (ConnectionListener delegate : delegates) { delegate.onCreate(connection); - } + } } public void onClose(Connection connection) { for (ConnectionListener delegate : delegates) { delegate.onClose(connection); - } + } } public void setDelegates(List delegates) { this.delegates = new ArrayList(delegates); } - + public void addDelegate(ConnectionListener delegate) { this.delegates.add(delegate); } - + } diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/Connection.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/Connection.java index 98139e79..a5b93b42 100755 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/Connection.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/Connection.java @@ -1,5 +1,5 @@ /** - * + * */ package org.springframework.amqp.rabbit.connection; @@ -31,10 +31,10 @@ public interface Connection { * @throws AmqpException if an I/O problem is encountered */ void close() throws AmqpException; - + /** * Flag to indicate the status of the connection. - * + * * @return true if the connection is open */ boolean isOpen(); diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionFactory.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionFactory.java index 86e4c7d8..ee596994 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionFactory.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionFactory.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -17,10 +17,10 @@ import org.springframework.amqp.AmqpException; /** * An interface based ConnectionFactory for creating {@link com.rabbitmq.client.Connection Connections}. - * + * *

* NOTE: The Rabbit API contains a ConnectionFactory class (same name). - * + * * @author Mark Fisher * @author Dave Syer */ @@ -33,7 +33,7 @@ public interface ConnectionFactory { int getPort(); String getVirtualHost(); - + void addConnectionListener(ConnectionListener listener); } diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionListener.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionListener.java index ac663dd2..8c871ea9 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionListener.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionListener.java @@ -20,7 +20,7 @@ package org.springframework.amqp.rabbit.connection; * */ public interface ConnectionListener { - + void onCreate(Connection connection); void onClose(Connection connection); diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionProxy.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionProxy.java index d247054c..7f3a8600 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionProxy.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionProxy.java @@ -17,9 +17,9 @@ package org.springframework.amqp.rabbit.connection; /** - * Subinterface of {@link Connection} to be implemented by + * Subinterface of {@link Connection} to be implemented by * Connection proxies. Allows access to the underlying target Connection - * + * * @author Dave Syer * @see CachingConnectionFactory */ diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/RabbitAccessor.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/RabbitAccessor.java index b942551e..5bcc27c2 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/RabbitAccessor.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/RabbitAccessor.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -41,7 +41,7 @@ public abstract class RabbitAccessor implements InitializingBean { /** * Flag to indicate that channels created by this component will be transactional. - * + * * @param transactional the flag value to set */ public void setChannelTransacted(boolean transactional) { @@ -78,7 +78,7 @@ public abstract class RabbitAccessor implements InitializingBean { /** * Fetch an appropriate Connection from the given RabbitResourceHolder. - * + * * @param holder the RabbitResourceHolder * @return an appropriate Connection fetched from the holder, or null if none found */ @@ -88,7 +88,7 @@ public abstract class RabbitAccessor implements InitializingBean { /** * Fetch an appropriate Channel from the given RabbitResourceHolder. - * + * * @param holder the RabbitResourceHolder * @return an appropriate Channel fetched from the holder, or null if none found */ diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/SimpleConnection.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/SimpleConnection.java index a7948173..5ef70f53 100755 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/SimpleConnection.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/SimpleConnection.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/ChannelAwareMessageListener.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/ChannelAwareMessageListener.java index 8c6d8097..84da8d43 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/ChannelAwareMessageListener.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/ChannelAwareMessageListener.java @@ -22,7 +22,7 @@ import com.rabbitmq.client.Channel; /** * A message listener that is aware of the Channel on which the message was received. - * + * * @author Mark Pollack */ public interface ChannelAwareMessageListener { @@ -33,7 +33,7 @@ public interface ChannelAwareMessageListener { * typically sending reply messages through the given Session. * @param message the received AMQP message (never null) * @param channel the underlying Rabbit Channel (never null) - * @throws Exception + * @throws Exception */ void onMessage(Message message, Channel channel) throws Exception; diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitAdmin.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitAdmin.java index e436dda6..7a7b950a 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitAdmin.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitAdmin.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -37,7 +37,7 @@ import com.rabbitmq.client.Channel; /** * RabbitMQ implementation of portable AMQP administrative operations for AMQP >= 0.9.1 - * + * * @author Mark Pollack * @author Mark Fisher * @author Dave Syer @@ -211,7 +211,7 @@ public class RabbitAdmin implements AmqpAdmin, ApplicationContextAware, Initiali * {@link ConnectionFactory} to declare all exchanges and queues in the enclosing application context. If the * callback fails then it may cause other clients of the connection factory to fail, but since only exchanges, * queues and bindings are declared failure is not expected. - * + * * @see InitializingBean#afterPropertiesSet() * @see #initialize() */ @@ -394,7 +394,7 @@ public class RabbitAdmin implements AmqpAdmin, ApplicationContextAware, Initiali private boolean isDeclaringImplicitQueueBinding(Binding binding) { if (isImplicitQueueBinding(binding)) { if (logger.isDebugEnabled()) { - logger.debug("The default exchange is implicitly bound to every queue, with a routing key equal to the queue name."); + logger.debug("The default exchange is implicitly bound to every queue, with a routing key equal to the queue name."); } return true; } diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitOperations.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitOperations.java index 777df0ae..a955b17d 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitOperations.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitOperations.java @@ -26,6 +26,6 @@ import org.springframework.amqp.core.AmqpTemplate; */ public interface RabbitOperations extends AmqpTemplate { - T execute(ChannelCallback action) throws AmqpException; - + T execute(ChannelCallback action) throws AmqpException; + } diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/ActiveObjectCounter.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/ActiveObjectCounter.java index 7f27397d..c7c55895 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/ActiveObjectCounter.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/ActiveObjectCounter.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit; /** * @author Dave Syer - * + * */ public class ActiveObjectCounter { diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/FatalListenerExecutionException.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/FatalListenerExecutionException.java index 356a1c1d..689849f5 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/FatalListenerExecutionException.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/FatalListenerExecutionException.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2006 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -18,7 +18,7 @@ import org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter; /** * Exception to be thrown when the execution of a listener method failed unrecoverably. - * + * * @author Dave Syer * @see MessageListenerAdapter */ diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/FatalListenerStartupException.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/FatalListenerStartupException.java index 7fded23d..784c00dc 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/FatalListenerStartupException.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/FatalListenerStartupException.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2006 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -18,7 +18,7 @@ import org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter; /** * Exception to be thrown when the execution of a listener method failed on startup. - * + * * @author Dave Syer * @see MessageListenerAdapter */ diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/MessageRejectedWhileStoppingException.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/MessageRejectedWhileStoppingException.java index 9b358276..c06de258 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/MessageRejectedWhileStoppingException.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/MessageRejectedWhileStoppingException.java @@ -8,7 +8,7 @@ import org.springframework.amqp.AmqpException; */ @SuppressWarnings("serial") public class MessageRejectedWhileStoppingException extends AmqpException { - + public MessageRejectedWhileStoppingException() { super("Message listener container was stopping when a message was received"); } diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/MessageKeyGenerator.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/MessageKeyGenerator.java index dbad4ec4..af14bde1 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/MessageKeyGenerator.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/MessageKeyGenerator.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -16,7 +16,7 @@ import org.springframework.amqp.core.Message; /** * @author Dave Syer - * + * */ public interface MessageKeyGenerator { @@ -25,7 +25,7 @@ public interface MessageKeyGenerator { * about assuming uniqueness of any element of the message, especially considering the requirement that it be * repeatable. A message id is ideal, but may not be present (AMQP does not mandate it), and the message body is a * byte array whose contents might be repeatable, but its object value is not. - * + * * @param message the message to generate a key for * @return a unique key for this message */ diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/MessageRecoverer.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/MessageRecoverer.java index 33465c5e..c83e509f 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/MessageRecoverer.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/MessageRecoverer.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -16,13 +16,13 @@ import org.springframework.amqp.core.Message; /** * @author Dave Syer - * + * */ public interface MessageRecoverer { /** * Callback for message that was consumed but failed all retry attempts. - * + * * @param message the message to recover * @param cause the cause of the error */ diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/NewMessageIdentifier.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/NewMessageIdentifier.java index b3f968ac..a754fe3d 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/NewMessageIdentifier.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/NewMessageIdentifier.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -18,9 +18,9 @@ import org.springframework.amqp.core.Message; * An optimization for stateful retry of message processing. If a message is known to be "new", i.e. never consumed * before by this or any other client, then there are potential optimizations for managing the state associated with * tracking the processing of a message (e.g. there is no need to check a cache for a hit). - * + * * @author Dave Syer - * + * */ public interface NewMessageIdentifier { @@ -28,7 +28,7 @@ public interface NewMessageIdentifier { * Query a message to see if it has been seen before. Usually it is only possible to know if it has definitely not * been seen before (e.g. through the redelivered flag, which would be used by default). Clients can customize the * retry behaviour for failed messages by implementing this method. - * + * * @param message the message to test * @return true if the message is known to not have been consumed before */ diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/DefaultMessagePropertiesConverter.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/DefaultMessagePropertiesConverter.java index 61a93796..501db17a 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/DefaultMessagePropertiesConverter.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/DefaultMessagePropertiesConverter.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2011 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -33,7 +33,7 @@ import com.rabbitmq.client.LongString; /** * Default implementation of the {@link MessagePropertiesConverter} strategy. - * + * * @author Mark Fisher * @since 1.0 */ diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/MessagePropertiesConverter.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/MessagePropertiesConverter.java index 33172786..72fa6540 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/MessagePropertiesConverter.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/MessagePropertiesConverter.java @@ -24,7 +24,7 @@ import com.rabbitmq.client.AMQP.BasicProperties; /** * Strategy interface for converting between Spring AMQP {@link MessageProperties} * and RabbitMQ BasicProperties. - * + * * @author Mark Fisher * @since 1.0 */ diff --git a/spring-rabbit/src/main/resources/org/springframework/amqp/rabbit/config/spring-rabbit-1.1.xsd b/spring-rabbit/src/main/resources/org/springframework/amqp/rabbit/config/spring-rabbit-1.1.xsd index a78aaaa5..338b63e0 100644 --- a/spring-rabbit/src/main/resources/org/springframework/amqp/rabbit/config/spring-rabbit-1.1.xsd +++ b/spring-rabbit/src/main/resources/org/springframework/amqp/rabbit/config/spring-rabbit-1.1.xsd @@ -11,7 +11,7 @@ @@ -83,9 +83,9 @@ @@ -123,10 +123,10 @@ @@ -163,8 +163,8 @@ @@ -183,7 +183,7 @@ @@ -201,9 +201,9 @@ @@ -222,7 +222,7 @@ @@ -402,7 +402,7 @@ @@ -416,10 +416,10 @@ @@ -741,7 +741,7 @@ @@ -756,7 +756,7 @@ @@ -779,7 +779,7 @@ @@ -994,7 +994,7 @@ diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/MulticastMain.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/MulticastMain.java index 40e37863..40d43bea 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/MulticastMain.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/MulticastMain.java @@ -104,7 +104,7 @@ public class MulticastMain { Connection[] consumerConnections = new Connection[connectionCount]; for (int i = 0; i < connectionCount; i++) { Connection conn = factory.newConnection(); - consumerConnections[i] = conn; + consumerConnections[i] = conn; } Thread[] consumerThreads = new Thread[consumerCount]; for (int i = 0; i < consumerCount; i++) { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/QueueInfo.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/QueueInfo.java index 92f713dc..1ff82671 100755 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/QueueInfo.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/QueueInfo.java @@ -18,42 +18,42 @@ package org.springframework.amqp.rabbit.admin; /** * This class represents a Queue that is configured on the RabbitMQ broker - * + * * @author Mark Pollack * */ public class QueueInfo { - /*{app.stock.request={transactions=0, acks_uncommitted=0, + /*{app.stock.request={transactions=0, acks_uncommitted=0, * consumers=0, pid=#Pid, - * durable=false, messages=0, memory=2320, auto_delete=false, - * messages_ready=0, arguments=[], name=app.stock.request, - * messages_unacknowledged=0, messages_uncommitted=0}, + * durable=false, messages=0, memory=2320, auto_delete=false, + * messages_ready=0, arguments=[], name=app.stock.request, + * messages_unacknowledged=0, messages_uncommitted=0}, */ private long transactions; - + private long acksUncommitted; - + private long consumers; - + private String pid; - + private boolean durable; - + private long messages; - + private long memory; - + private boolean autoDelete; - + private long messagesReady; - + private String[] arguments; - + private String name; - + private long messagesUnacknowledged; - + private long messageUncommitted; public long getTransactions() { @@ -171,6 +171,6 @@ public class QueueInfo { + ", messagesUnacknowledged=" + messagesUnacknowledged + ", pid=" + pid + "]"; } - - + + } diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdmin.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdmin.java index cb9d37fa..87ee5fde 100755 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdmin.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdmin.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2011 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -52,7 +52,7 @@ import org.springframework.util.exec.Os; /** * Rabbit broker administration. Features: - * + * *

    *
  • Basic AMQP admin commands are provided, like declaring queues, exchanges and bindings.
  • *
  • Manage user accounts and virtual hosts.
  • @@ -60,13 +60,13 @@ import org.springframework.util.exec.Os; *
  • Start and stop the broker application (in a running process).
  • *
  • Inspect and manage the queues, e.g. listing message counts etc.
  • *
- * + * * Depending on your platform, to {@link #startNode() start the broker} you might need to set some environment * properties. The most common are available via constructors or setters in this class (e.g. * {@link #setRabbitLogBaseDirectory(String) RABBITMQ_LOG_BASE}). All others you can set via the OS (any setting that * RabbtMQ allows in its startup script), and some work via System properties as special convenience cases ( * ERLANG_HOME and RABBITMQ_HOME ). - * + * * @author Mark Pollack * @author Dave Syer * @author Helena Edelson @@ -120,7 +120,7 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { /** * Create an instance by supplying the erlang node name (e.g. "rabbit@myserver"), or simply the hostname (if the * alive name is "rabbit"). - * + * * @param nodeName the node name or hostname to use */ public RabbitBrokerAdmin(String nodeName) { @@ -129,9 +129,9 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { /** * Create an instance by supplying the erlang node name and cookie (unique string). - * + * * @param nodeName the node name or hostname to use - * + * * @param cookie the cookie value to use */ public RabbitBrokerAdmin(String nodeName, String cookie) { @@ -144,7 +144,7 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { * (usually "rabbit@<servername>" and 5672). If, as well as managing an existing broker, you need to start the * broker process, you will also need to set {@link #setRabbitLogBaseDirectory(String) RABBITMQ_LOG_BASE} and * {@link #setRabbitMnesiaBaseDirectory(String) RABBITMQ_MNESIA_BASE} to point to writable directories). - * + * * @param nodeName the node name or hostname to use * @param port the port number (overriding the default which is 5672) */ @@ -156,7 +156,7 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { * Create an instance by supplying the erlang node name, port number and cookie (unique string). If the node name * does not contain an @ character, it will be prepended with an alivename rabbit@ * (interpreting the supplied value as just the hostname). - * + * * @param nodeName the node name or hostname to use * @param port the port number (overriding the default which is 5672) * @param cookie the cookie value to use @@ -184,7 +184,7 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { /** * An async task executor for launching background processing when starting or stopping the broker. - * + * * @param executor the executor to set */ public void setExecutor(AsyncTaskExecutor executor) { @@ -194,7 +194,7 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { /** * The location of RABBITMQ_LOG_BASE to override the system default (which may be owned by another * user). Only needed for launching the broker process. Can also be set as a system property. - * + * * @param rabbitLogBaseDirectory the rabbit log base directory to set */ public void setRabbitLogBaseDirectory(String rabbitLogBaseDirectory) { @@ -204,7 +204,7 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { /** * The location of RABBITMQ_MNESIA_BASE to override the system default (which may be owned by another * user). Only needed for launching the broker process. Can also be set as a system property. - * + * * @param rabbitMnesiaBaseDirectory the rabbit Mnesia base directory to set */ public void setRabbitMnesiaBaseDirectory(String rabbitMnesiaBaseDirectory) { @@ -223,7 +223,7 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { * Timeout (milliseconds) to wait for the broker to come up. If the provided timeout is greater than zero then we * wait for that period for the broker to be ready. If it is not ready after that time the process is stopped. * Defaults to 0 (no wait). - * + * * @param timeout the timeout value to set in milliseconds */ public void setStartupTimeout(long timeout) { @@ -234,7 +234,7 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { * Allows users to adapt Erlang RPC (module, function) pairs to older, or different, versions of the * broker than the current target. The map is from String to String in the form * input_module%input_function -> output_module%output_function (using a % separator). - * + * * @param moduleAdapter the module adapter to set */ public void setModuleAdapter(Map moduleAdapter) { @@ -557,7 +557,7 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { * Find a directory whose name starts with a substring in a given parent directory. If there is none return null, * otherwise sort the results and return the best match (an exact match if there is one or the last one in a lexical * sort). - * + * * @param parent * @param child * @return the full name of a directory @@ -654,12 +654,12 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { /** * Convenience method for lazy initialization of the {@link ErlangTemplate} and associated trimmings. All RPC calls * should go through this method. - * + * * @param the type of the result * @param module the module to address remotely * @param function the function to call * @param args the arguments to pass - * + * * @return the result from the remote erl process converted to the correct type */ @SuppressWarnings("unchecked") @@ -690,13 +690,13 @@ public class RabbitBrokerAdmin implements RabbitBrokerOperations { /** * Safely convert a string to its bytes using the encoding provided. - * + * * @see #setEncoding(String) - * + * * @param string the value to convert - * + * * @return the bytes from the string using the encoding provided - * + * * @throws IllegalStateException if the encoding is ont supported */ private byte[] getBytes(String string) { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdminIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdminIntegrationTests.java index 65f41235..9d34f3dd 100755 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdminIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdminIntegrationTests.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -33,7 +33,7 @@ import org.springframework.amqp.rabbit.test.EnvironmentAvailable; import org.springframework.amqp.rabbit.test.Log4jLevelAdjuster; /** - * + * * @author Mark Pollack * @author Dave Syer * @author Helena Edelson diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdminLifecycleIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdminLifecycleIntegrationTests.java index f2e6a515..8309032e 100755 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdminLifecycleIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerAdminLifecycleIntegrationTests.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -46,7 +46,7 @@ public class RabbitBrokerAdminLifecycleIntegrationTests { @Rule public static EnvironmentAvailable environment = new EnvironmentAvailable("BROKER_INTEGRATION_TEST"); - + @Before public void init() throws Exception { FileUtils.deleteDirectory(new File("target/rabbitmq")); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerOperations.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerOperations.java index eda9e136..579fede6 100755 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerOperations.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitBrokerOperations.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2011 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -19,7 +19,7 @@ import java.util.regex.Pattern; /** * Performs administration tasks for RabbitMQ broker administration.

Goal is to support full CRUD of Exchanges, * Queues, Bindings, User, VHosts, etc.

Current implementations expose operations with basic type arguments via JMX. - * + * * @author Mark Pollack */ public interface RabbitBrokerOperations { @@ -66,7 +66,7 @@ public interface RabbitBrokerOperations { /** * Starts the RabbitMQ application on an already running node. This command is typically run after performing other - * management actions that required the RabbitMQ application to be stopped, e.g. reset. + * management actions that required the RabbitMQ application to be stopped, e.g. reset. */ void startBrokerApplication(); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitControlErlangConverter.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitControlErlangConverter.java index 0fc13189..e216d21c 100755 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitControlErlangConverter.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitControlErlangConverter.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -35,7 +35,7 @@ import com.ericsson.otp.erlang.OtpErlangTuple; /*** * Converter that understands the responses from the rabbit control module and related functionality. - * + * * @author Mark Pollack * @author Mark Fisher * @author Helena Edelson diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitStatus.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitStatus.java index ec89fb35..079cd9df 100755 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitStatus.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/admin/RabbitStatus.java @@ -24,7 +24,7 @@ import org.springframework.erlang.core.Node; /** * The status object returned from querying the broker - * + * * @author Mark Pollack * */ @@ -32,11 +32,11 @@ import org.springframework.erlang.core.Node; public class RabbitStatus implements Serializable { private List runningApplications; - + private List nodes; - + private List runningNodes; - + public RabbitStatus(List runningApplications, List nodes, List runningNodes) { super(); @@ -69,12 +69,12 @@ public class RabbitStatus implements Serializable { public List getRunningApplications() { return runningApplications; } - + public List getNodes() { return nodes; } - - public List getRunningNodes() { + + public List getRunningNodes() { return runningNodes; } diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/AdminParserTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/AdminParserTests.java index 7c804b3a..b98676df 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/AdminParserTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/AdminParserTests.java @@ -1,11 +1,11 @@ /* * Copyright 2010-2011 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -28,9 +28,9 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.util.StringUtils; /** - * + * * @author tomas.lukosius@opencredo.com - * + * */ public final class AdminParserTests { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ConnectionFactoryParserTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ConnectionFactoryParserTests.java index 513c730e..8e776576 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ConnectionFactoryParserTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ConnectionFactoryParserTests.java @@ -1,11 +1,11 @@ /* * Copyright 2010-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -31,10 +31,10 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import com.rabbitmq.client.Address; /** - * + * * @author Dave Syer * @author Gary Russell - * + * */ public final class ConnectionFactoryParserTests { @@ -54,14 +54,14 @@ public final class ConnectionFactoryParserTests { assertNull(dfa.getPropertyValue("executorService")); assertEquals(Boolean.TRUE, dfa.getPropertyValue("publisherConfirms")); assertEquals(Boolean.TRUE, dfa.getPropertyValue("publisherReturns")); - } - + } + @Test public void testNative() throws Exception { CachingConnectionFactory connectionFactory = beanFactory.getBean("native", CachingConnectionFactory.class); assertNotNull(connectionFactory); assertEquals(10, connectionFactory.getChannelCacheSize()); - } + } @Test public void testWithExecutor() throws Exception { @@ -87,7 +87,7 @@ public final class ConnectionFactoryParserTests { ExecutorService exec = beanFactory.getBean("execService", ExecutorService.class); assertSame(exec, executor); } - + @Test public void testMultiHost() throws Exception { CachingConnectionFactory connectionFactory = beanFactory.getBean("multiHost", CachingConnectionFactory.class); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ExchangeParserIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ExchangeParserIntegrationTests.java index ea5edde7..656f3024 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ExchangeParserIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ExchangeParserIntegrationTests.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ListenerContainerPlaceholderParserTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ListenerContainerPlaceholderParserTests.java index 85ddaca5..026ac75a 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ListenerContainerPlaceholderParserTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/ListenerContainerPlaceholderParserTests.java @@ -42,7 +42,7 @@ import org.springframework.core.io.ClassPathResource; public final class ListenerContainerPlaceholderParserTests { private BeanFactory beanFactory; - + @Before public void setUp() throws Exception { beanFactory = new GenericXmlApplicationContext(new ClassPathResource(getClass().getSimpleName() + "-context.xml", getClass())); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/QueueParserIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/QueueParserIntegrationTests.java index beb03ad7..f6ac13d2 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/QueueParserIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/QueueParserIntegrationTests.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -45,7 +45,7 @@ public final class QueueParserIntegrationTests { Queue queue = beanFactory.getBean("arguments", Queue.class); assertNotNull(queue); - + RabbitTemplate template = new RabbitTemplate(new CachingConnectionFactory(BrokerTestUtils.getPort())); RabbitAdmin rabbitAdmin = new RabbitAdmin(template.getConnectionFactory()); rabbitAdmin.deleteQueue(queue.getName()); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/QueueParserPlaceholderTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/QueueParserPlaceholderTests.java index 01fba78e..85d0674e 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/QueueParserPlaceholderTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/QueueParserPlaceholderTests.java @@ -26,7 +26,7 @@ import org.springframework.core.io.ClassPathResource; * */ public class QueueParserPlaceholderTests extends QueueParserTests { - + @Before @Override public void setUpDefaultBeanFactory() throws Exception { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/RabbitNamespaceHandlerTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/RabbitNamespaceHandlerTests.java index a5d2b0ab..16d035db 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/RabbitNamespaceHandlerTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/RabbitNamespaceHandlerTests.java @@ -82,7 +82,7 @@ public final class RabbitNamespaceHandlerTests { // 4 for each exchange type assertEquals(17, bindings.size()); } - + @Test public void testAdmin() throws Exception { assertNotNull(beanFactory.getBean("admin-test", RabbitAdmin.class)); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/AbstractConnectionFactoryTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/AbstractConnectionFactoryTests.java index 0716c8e1..04be9b23 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/AbstractConnectionFactoryTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/AbstractConnectionFactoryTests.java @@ -48,7 +48,7 @@ public abstract class AbstractConnectionFactoryTests { con.close(); assertEquals(1, called.get()); verify(mockConnection, never()).close(); - + connectionFactory.createConnection(); assertEquals(1, called.get()); @@ -59,7 +59,7 @@ public abstract class AbstractConnectionFactoryTests { verify(mockConnectionFactory, times(1)).newConnection((ExecutorService) null); } - + @Test public void testWithListenerRegisteredAfterOpen() throws IOException { @@ -86,7 +86,7 @@ public abstract class AbstractConnectionFactoryTests { con.close(); assertEquals(1, called.get()); verify(mockConnection, never()).close(); - + connectionFactory.createConnection(); assertEquals(1, called.get()); @@ -110,13 +110,13 @@ public abstract class AbstractConnectionFactoryTests { when(mockConnection1.isOpen()).thenReturn(false); AbstractConnectionFactory connectionFactory = createConnectionFactory(mockConnectionFactory); - + Connection connection = connectionFactory.createConnection(); // the dead connection should be discarded connection.createChannel(false); verify(mockConnectionFactory, times(2)).newConnection((ExecutorService) null); verify(mockConnection2, times(1)).createChannel(); - + connectionFactory.destroy(); verify(mockConnection2, times(1)).close(); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactoryTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactoryTests.java index 3a340b27..9b70ab28 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactoryTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactoryTests.java @@ -39,19 +39,19 @@ public class CachingConnectionFactoryTests extends AbstractConnectionFactoryTest com.rabbitmq.client.ConnectionFactory mockConnectionFactory = mock(com.rabbitmq.client.ConnectionFactory.class); com.rabbitmq.client.Connection mockConnection = mock(com.rabbitmq.client.Connection.class); Channel mockChannel = mock(Channel.class); - + when(mockConnectionFactory.newConnection((ExecutorService) null)).thenReturn(mockConnection); when(mockConnection.createChannel()).thenReturn(mockChannel); when(mockChannel.isOpen()).thenReturn(true); when(mockConnection.isOpen()).thenReturn(true); - + CachingConnectionFactory ccf = new CachingConnectionFactory(mockConnectionFactory); Connection con = ccf.createConnection(); - + Channel channel = con.createChannel(false); channel.close(); // should be ignored, and placed into channel cache. con.close(); // should be ignored - + Connection con2 = ccf.createConnection(); /* * will retrieve same channel object that was just put into channel cache @@ -59,12 +59,12 @@ public class CachingConnectionFactoryTests extends AbstractConnectionFactoryTest Channel channel2 = con2.createChannel(false); channel2.close(); // should be ignored con2.close(); // should be ignored - + Assert.assertSame(con, con2); Assert.assertSame(channel, channel2); verify(mockConnection, never()).close(); verify(mockChannel, never()).close(); - + } @Test public void testWithConnectionFactoryCacheSize() throws IOException { @@ -304,17 +304,17 @@ public class CachingConnectionFactoryTests extends AbstractConnectionFactoryTest Connection con = ccf.createConnection(); // This will return a proxy that surpresses calls to close - Channel channel1 = con.createChannel(false); + Channel channel1 = con.createChannel(false); Channel channel2 = con.createChannel(false); // Should be ignored, and add last into channel cache. - channel1.close(); + channel1.close(); channel2.close(); // remove first entry in cache (channel1) Channel ch1 = con.createChannel(false); // remove first entry in cache (channel2) - Channel ch2 = con.createChannel(false); + Channel ch2 = con.createChannel(false); Assert.assertSame(ch1, channel1); Assert.assertSame(ch2, channel2); @@ -323,7 +323,7 @@ public class CachingConnectionFactoryTests extends AbstractConnectionFactoryTest Channel target2 = ((ChannelProxy) ch2).getTargetChannel(); // make sure mokito returned different mocks for the channel - Assert.assertNotSame(target1, target2); + Assert.assertNotSame(target1, target2); ch1.close(); ch2.close(); @@ -343,7 +343,7 @@ public class CachingConnectionFactoryTests extends AbstractConnectionFactoryTest Assert.assertNotSame(con, con1); // This will return a proxy that surpresses calls to close - Channel channel3 = con.createChannel(false); + Channel channel3 = con.createChannel(false); Assert.assertNotSame(channel3, channel1); Assert.assertNotSame(channel3, channel2); } @@ -373,10 +373,10 @@ public class CachingConnectionFactoryTests extends AbstractConnectionFactoryTest Channel channel = con.createChannel(false); assertEquals(1, called.get()); channel.close(); - + con.close(); verify(mockConnection, never()).close(); - + connectionFactory.createConnection(); con.createChannel(false); assertEquals(1, called.get()); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/SingleConnectionFactory.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/SingleConnectionFactory.java index 72c6f033..32d980d0 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/SingleConnectionFactory.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/SingleConnectionFactory.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2011 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -23,7 +23,7 @@ import com.rabbitmq.client.Channel; /** * A {@link ConnectionFactory} implementation that returns the same Connections from all {@link #createConnection()} * calls, and ignores calls to {@link com.rabbitmq.client.Connection#close()}. - * + * * @author Mark Fisher * @author Mark Pollack * @author Dave Syer @@ -128,7 +128,7 @@ public class SingleConnectionFactory extends AbstractConnectionFactory { /** * Create a Connection. This implementation just delegates to the underlying Rabbit ConnectionFactory. Subclasses * typically will decorate the result to provide additional features. - * + * * @return the new Connection */ protected Connection doCreateConnection() { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/SingleConnectionFactoryTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/SingleConnectionFactoryTests.java index 45afd6d3..c95bbb66 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/SingleConnectionFactoryTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/SingleConnectionFactoryTests.java @@ -21,7 +21,7 @@ import com.rabbitmq.client.ConnectionFactory; * @author Dave Syer */ public class SingleConnectionFactoryTests extends AbstractConnectionFactoryTests { - + @Override protected AbstractConnectionFactory createConnectionFactory(ConnectionFactory connectionFactory) { return new SingleConnectionFactory(connectionFactory); @@ -50,10 +50,10 @@ public class SingleConnectionFactoryTests extends AbstractConnectionFactoryTests Channel channel = con.createChannel(false); assertEquals(1, called.get()); channel.close(); - + con.close(); verify(mockConnection, never()).close(); - + connectionFactory.createConnection(); con.createChannel(false); assertEquals(2, called.get()); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/Producer.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/Producer.java index 18aa3da1..7f05cc0d 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/Producer.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/Producer.java @@ -22,7 +22,7 @@ public class Producer { final String routingKey = TestConstants.ROUTING_KEY; QueueUtils.declareTestQueue(template, routingKey); - // send message + // send message sendMessages(template, TestConstants.EXCHANGE_NAME, routingKey, TestConstants.NUM_MESSAGES); } diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitAdminIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitAdminIntegrationTests.java index be158653..3a8e6382 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitAdminIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitAdminIntegrationTests.java @@ -272,7 +272,7 @@ public class RabbitAdminIntegrationTests { /** * Verify that a queue exists using the native Rabbit API to bypass all the connection and * channel caching and callbacks in Spring AMQP. - * + * * @param Queue The queue to verify * @return True if the queue exists */ diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitAdminTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitAdminTests.java index b596b3d6..e9cb6df0 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitAdminTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitAdminTests.java @@ -11,7 +11,7 @@ import org.springframework.amqp.rabbit.connection.SingleConnectionFactory; import org.springframework.context.support.GenericApplicationContext; public class RabbitAdminTests { - + @Rule public ExpectedException exception = ExpectedException.none(); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitTemplateIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitTemplateIntegrationTests.java index ff7d6239..efe77223 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitTemplateIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitTemplateIntegrationTests.java @@ -1,11 +1,11 @@ /* * Copyright 2010-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -657,7 +657,7 @@ public class RabbitTemplateIntegrationTests { }); String result = (String) template.convertSendAndReceive("", ROUTE, "message", new MessagePostProcessor() { - + public Message postProcessMessage(Message message) throws AmqpException { try { byte[] newBody = new String(message.getBody(), "UTF-8").toUpperCase().getBytes("UTF-8"); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/support/RabbitGatewaySupportTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/support/RabbitGatewaySupportTests.java index 25a5d57a..1a8c390e 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/support/RabbitGatewaySupportTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/support/RabbitGatewaySupportTests.java @@ -14,7 +14,7 @@ public class RabbitGatewaySupportTests { @Test public void testRabbitGatewaySupportWithConnectionFactory() throws Exception { - + org.springframework.amqp.rabbit.connection.ConnectionFactory mockConnectionFactory = mock(org.springframework.amqp.rabbit.connection.ConnectionFactory.class); final List test = new ArrayList(); RabbitGatewaySupport gateway = new RabbitGatewaySupport() { @@ -28,7 +28,7 @@ public class RabbitGatewaySupportTests { assertEquals("Correct RabbitTemplate", mockConnectionFactory, gateway.getRabbitTemplate().getConnectionFactory()); assertEquals("initGatway called", test.size(), 1); } - + @Test public void testRabbitGatewaySupportWithJmsTemplate() throws Exception { RabbitTemplate template = new RabbitTemplate(); @@ -41,6 +41,6 @@ public class RabbitGatewaySupportTests { gateway.setRabbitTemplate(template); gateway.afterPropertiesSet(); assertEquals("Correct RabbitTemplate", template, gateway.getRabbitTemplate()); - assertEquals("initGateway called", test.size(), 1); + assertEquals("initGateway called", test.size(), 1); } } diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/ActiveObjectCounterTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/ActiveObjectCounterTests.java index 47ceae75..d8b9671c 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/ActiveObjectCounterTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/ActiveObjectCounterTests.java @@ -30,9 +30,9 @@ import org.junit.Test; * */ public class ActiveObjectCounterTests { - + private ActiveObjectCounter counter = new ActiveObjectCounter(); - + @Test public void testActiveCount() throws Exception { final Object object1 = new Object(); diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/BlockingQueueConsumerIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/BlockingQueueConsumerIntegrationTests.java index bcebed90..2f69dedf 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/BlockingQueueConsumerIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/BlockingQueueConsumerIntegrationTests.java @@ -15,7 +15,7 @@ import org.springframework.amqp.rabbit.test.BrokerTestUtils; import org.springframework.amqp.rabbit.test.Log4jLevelAdjuster; public class BlockingQueueConsumerIntegrationTests { - + private static Queue queue = new Queue("test.queue"); @Rule diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerContainerMultipleQueueIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerContainerMultipleQueueIntegrationTests.java index 529f0f06..74cecc18 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerContainerMultipleQueueIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerContainerMultipleQueueIntegrationTests.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2011 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerManualAckIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerManualAckIntegrationTests.java index a00bcc36..e1f9182b 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerManualAckIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerManualAckIntegrationTests.java @@ -39,9 +39,9 @@ public class MessageListenerManualAckIntegrationTests { private int messageCount = 50; private int txSize = 1; - + private boolean transactional = false; - + private SimpleMessageListenerContainer container; @Rule diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerRecoveryRepeatIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerRecoveryRepeatIntegrationTests.java index ef7beec7..4a486c4d 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerRecoveryRepeatIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerRecoveryRepeatIntegrationTests.java @@ -34,9 +34,9 @@ import com.rabbitmq.client.Channel; /** * Long-running test created to facilitate profiling of SimpleMessageListenerContainer. - * + * * @author Dave Syer - * + * */ @Ignore public class MessageListenerRecoveryRepeatIntegrationTests { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerTxSizeIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerTxSizeIntegrationTests.java index b0f23ff5..2c3fc711 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerTxSizeIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/MessageListenerTxSizeIntegrationTests.java @@ -39,9 +39,9 @@ public class MessageListenerTxSizeIntegrationTests { private int messageCount = 12; private int txSize = 4; - + private boolean transactional = true; - + private SimpleMessageListenerContainer container; @Rule @@ -114,7 +114,7 @@ public class MessageListenerTxSizeIntegrationTests { } public class TestListener implements ChannelAwareMessageListener { - + private ThreadLocal count = new ThreadLocal(); private final CountDownLatch latch; diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/SimpleMessageListenerContainerTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/SimpleMessageListenerContainerTests.java index 674b2c44..258282bb 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/SimpleMessageListenerContainerTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/SimpleMessageListenerContainerTests.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -28,7 +28,7 @@ import org.springframework.transaction.support.DefaultTransactionStatus; /** * @author David Syer - * + * */ public class SimpleMessageListenerContainerTests { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/UnackedRawIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/UnackedRawIntegrationTests.java index 1a8bdff7..cb59af69 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/UnackedRawIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/UnackedRawIntegrationTests.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -31,9 +31,9 @@ import com.rabbitmq.client.QueueingConsumer.Delivery; /** * Used to verify raw Rabbit Java Client behaviour for corner cases. - * + * * @author Dave Syer - * + * */ @Ignore public class UnackedRawIntegrationTests { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/adapter/MessageListenerAdapterTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/adapter/MessageListenerAdapterTests.java index c23e4264..d52c10b2 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/adapter/MessageListenerAdapterTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/adapter/MessageListenerAdapterTests.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -25,7 +25,7 @@ import org.springframework.aop.framework.ProxyFactory; /** * @author Dave Syer - * + * */ public class MessageListenerAdapterTests { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerPanic.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerPanic.java index a281aa3c..b214db80 100755 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerPanic.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerPanic.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2011 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerRunning.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerRunning.java index 1a84a8c0..aeeab5db 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerRunning.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerRunning.java @@ -21,11 +21,11 @@ import org.springframework.util.StringUtils; * accessible. If the Rabbit broker is not running in the background all the tests here will simply be skipped because * of a violated assumption (showing as successful). Usage: *

- * + * *
  * @Rule
  * public static BrokerRunning brokerIsRunning = BrokerRunning.isRunning();
- * 
+ *
  * @Test
  * public void testSendAndReceive() throws Exception {
  * 	// ... test using RabbitTemplate etc.
@@ -35,12 +35,12 @@ import org.springframework.util.StringUtils;
  * The rule can be declared as static so that it only has to check once for all tests in the enclosing test case, but
  * there isn't a lot of overhead in making it non-static.
  * 

- * + * * @see Assume * @see AssumptionViolatedException - * + * * @author Dave Syer - * + * */ public class BrokerRunning extends TestWatchman { @@ -59,7 +59,7 @@ public class BrokerRunning extends TestWatchman { private final boolean purge; private Queue[] queues; - + private int DEFAULT_PORT = BrokerTestUtils.getPort(); private int port; @@ -68,7 +68,7 @@ public class BrokerRunning extends TestWatchman { /** * Ensure the broker is running and has an empty queue with the specified name in the default exchange. - * + * * @return a new rule that assumes an existing running broker */ public static BrokerRunning isRunningWithEmptyQueues(String... names) { @@ -81,7 +81,7 @@ public class BrokerRunning extends TestWatchman { /** * Ensure the broker is running and has an empty queue (which can be addressed via the default exchange). - * + * * @return a new rule that assumes an existing running broker */ public static BrokerRunning isRunningWithEmptyQueues(Queue... queues) { @@ -123,10 +123,10 @@ public class BrokerRunning extends TestWatchman { public void setPort(int port) { this.port = port; if (!brokerOffline.containsKey(port)) { - brokerOffline.put(port, true); + brokerOffline.put(port, true); } if (!brokerOnline.containsKey(port)) { - brokerOnline.put(port, true); + brokerOnline.put(port, true); } } diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerTestUtils.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerTestUtils.java index 3b6992bd..62539d9e 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerTestUtils.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/BrokerTestUtils.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -17,22 +17,22 @@ import org.springframework.amqp.rabbit.connection.ConnectionFactory; /** * Global convenience class for all integration tests, carrying constants and other utilities for broker set up. - * + * * @author Dave Syer - * + * */ public class BrokerTestUtils { public static final int DEFAULT_PORT = 5672; public static final int TRACER_PORT = 5673; - + public static final String ADMIN_NODE_NAME = "spring@localhost"; - + /** * The port that the broker is listening on (e.g. as input for a {@link ConnectionFactory}). - * + * * @return a port number */ public static int getPort() { @@ -41,7 +41,7 @@ public class BrokerTestUtils { /** * The port that the tracer is listening on (e.g. as input for a {@link ConnectionFactory}). - * + * * @return a port number */ public static int getTracerPort() { @@ -51,7 +51,7 @@ public class BrokerTestUtils { /** * An alternative port number than can safely be used to stop and start a broker, even when one is already running * on the standard port as a privileged user. Useful for tests involving {@link RabbitBrokerAdmin} on UN*X. - * + * * @return a port number */ public static int getAdminPort() { @@ -61,7 +61,7 @@ public class BrokerTestUtils { /** * Convenience factory for a {@link RabbitBrokerAdmin} instance that will usually start and stop cleanly on all * systems. - * + * * @return a {@link RabbitBrokerAdmin} instance */ public static RabbitBrokerAdmin getRabbitBrokerAdmin() { @@ -71,9 +71,9 @@ public class BrokerTestUtils { /** * Convenience factory for a {@link RabbitBrokerAdmin} instance that will usually start and stop cleanly on all * systems. - * + * * @param nodeName the name of the node - * + * * @return a {@link RabbitBrokerAdmin} instance */ public static RabbitBrokerAdmin getRabbitBrokerAdmin(String nodeName) { @@ -83,10 +83,10 @@ public class BrokerTestUtils { /** * Convenience factory for a {@link RabbitBrokerAdmin} instance that will usually start and stop cleanly on all * systems. - * + * * @param nodeName the name of the node * @param port the port to listen on - * + * * @return a {@link RabbitBrokerAdmin} instance */ public static RabbitBrokerAdmin getRabbitBrokerAdmin(String nodeName, int port) { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/EnvironmentAvailable.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/EnvironmentAvailable.java index e9f16541..bf466687 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/EnvironmentAvailable.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/EnvironmentAvailable.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2011 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/Log4jLevelAdjuster.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/Log4jLevelAdjuster.java index 076e693a..b75cc864 100755 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/Log4jLevelAdjuster.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/Log4jLevelAdjuster.java @@ -16,9 +16,9 @@ import org.junit.runners.model.Statement; * A JUnit method @Rule that changes the logger level for a set of classes * while a test method is running. Useful for performance or scalability tests * where we don't want to generate a large log in a tight inner loop. - * + * * @author Dave Syer - * + * */ public class Log4jLevelAdjuster implements MethodRule { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/RepeatProcessor.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/RepeatProcessor.java index f3b88afb..c5b62cb5 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/RepeatProcessor.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/RepeatProcessor.java @@ -1,11 +1,11 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. @@ -43,10 +43,10 @@ import org.springframework.test.annotation.Repeat; * A JUnit method @Rule that looks at Spring repeat annotations on methods and executes the test multiple times * (without re-initializing the test case if necessary). To avoid re-initializing use the {@link #isInitialized()} * method to protect the @Before and @After methods. - * + * * @author Dave Syer * @since 2.0 - * + * */ public class RepeatProcessor implements MethodRule { diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/transaction/RabbitTransactionManagerIntegrationTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/transaction/RabbitTransactionManagerIntegrationTests.java index 75e1f17c..9ad8499b 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/transaction/RabbitTransactionManagerIntegrationTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/transaction/RabbitTransactionManagerIntegrationTests.java @@ -62,7 +62,7 @@ public class RabbitTransactionManagerIntegrationTests { @Test public void testReceiveInTransactionWithRollback() throws Exception { // Makes receive (and send in principle) transactional - template.setChannelTransacted(true); + template.setChannelTransacted(true); template.convertAndSend(ROUTE, "message"); try { transactionTemplate.execute(new TransactionCallback() { diff --git a/spring-rabbit/src/test/resources/org/springframework/amqp/rabbit/config/AdminParserTests-1-context.xml b/spring-rabbit/src/test/resources/org/springframework/amqp/rabbit/config/AdminParserTests-1-context.xml index 37231432..a4b2875c 100644 --- a/spring-rabbit/src/test/resources/org/springframework/amqp/rabbit/config/AdminParserTests-1-context.xml +++ b/spring-rabbit/src/test/resources/org/springframework/amqp/rabbit/config/AdminParserTests-1-context.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - diff --git a/spring-rabbit/src/test/resources/org/springframework/amqp/rabbit/config/ConnectionFactoryParserTests-context.xml b/spring-rabbit/src/test/resources/org/springframework/amqp/rabbit/config/ConnectionFactoryParserTests-context.xml index cd7f1f84..5e5e9058 100644 --- a/spring-rabbit/src/test/resources/org/springframework/amqp/rabbit/config/ConnectionFactoryParserTests-context.xml +++ b/spring-rabbit/src/test/resources/org/springframework/amqp/rabbit/config/ConnectionFactoryParserTests-context.xml @@ -15,7 +15,7 @@ publisher-confirms="true" publisher-returns="true"/> - +