diff --git a/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java b/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java index 0dc040de38c..3539c22fc2c 100644 --- a/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java +++ b/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java @@ -28,10 +28,7 @@ import java.util.List; /** - *
- * A main class which setups up a classpath and then passes - * execution off to the ActiveMQ Artemis cli main. - *
+ * A main class which setups up a classpath and then passes execution off to the ActiveMQ Artemis cli main. */ public class Artemis { diff --git a/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/configuration/ArtemisClientConfiguration.java b/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/configuration/ArtemisClientConfiguration.java index 4bd816c39d7..65436c8f5e5 100644 --- a/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/configuration/ArtemisClientConfiguration.java +++ b/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/configuration/ArtemisClientConfiguration.java @@ -28,12 +28,12 @@ public interface ArtemisClientConfiguration { String REMOTE_CONNECTOR = NettyConnectorFactory.class.getName(); /** - * @return if present, sends a username for the connection + * {@return if present, sends a username for the connection} */ String getUsername(); /** - * @return the password for the connection. If username is set, password must be set + * {@return the password for the connection. If username is set, password must be set} */ String getPassword(); @@ -45,32 +45,32 @@ public interface ArtemisClientConfiguration { String getUrl(); /** - * @return The hostname to connect to + * {@return The hostname to connect to} */ String getHost(); /** - * @return the port number to connect to + * {@return the port number to connect to} */ Integer getPort(); /** - * @return the connector factory to use for connections. + * {@return the connector factory to use for connections} */ String getConnectorFactory(); /** - * @return Whether or not to start the embedded broker + * {@return whether to start the embedded broker} */ boolean startEmbeddedBroker(); /** - * @return whether or not this is an HA connection + * {@return whether this is an HA connection} */ boolean isHa(); /** - * @return whether or not the authentication parameters should be used + * {@return whether the authentication parameters should be used} */ boolean hasAuthentication(); } diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java index 28674b909f3..a68738eda08 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java @@ -62,14 +62,13 @@ /** * Artemis is the main CLI entry point for managing/running a broker. - * - * Want to start or debug a broker from an IDE? This is probably the best class to - * run. Make sure set the -Dartemis.instance=path/to/instance system property. - * You should also use the 'apache-artemis' module for the class path since that - * includes all artemis modules. - * - * Notice that this class should not use any logging as it's part of the bootstrap and using logging here could - * disrupt the order of bootstrapping on certain components (e.g. JMX being started from log4j) + *+ * Want to start or debug a broker from an IDE? This is probably the best class to run. Make sure set the + * -Dartemis.instance=path/to/instance system property. You should also use the 'apache-artemis' module for the class + * path since that includes all artemis modules. + *
+ * Notice that this class should not use any logging as it's part of the bootstrap and using logging here could disrupt
+ * the order of bootstrapping on certain components (e.g. JMX being started from log4j)
*/
@Command(name = "artemis", description = "ActiveMQ Artemis Command Line")
public class Artemis implements Runnable {
@@ -194,8 +193,7 @@ public static Object execute(boolean inputEnabled, boolean useSystemOut, boolean
}
/**
- * This method is used to validate exception returns.
- * Useful on test cases
+ * This method is used to validate exception returns. Useful on test cases.
*/
private static Object internalExecute(boolean shellEnabled, File artemisHome, File artemisInstance, File etcFolder, String[] args) throws Exception {
return internalExecute(shellEnabled, artemisHome, artemisInstance, etcFolder, args, new ActionContext());
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java
index b20abe1fd51..b475b6e4a95 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java
@@ -82,9 +82,11 @@ public void setHomeValues(File brokerHome, File brokerInstance, File etcFolder)
@Override
public String getBrokerInstance() {
if (brokerInstance == null) {
- /* We use File URI for locating files. The ARTEMIS_HOME variable is used to determine file paths. For Windows
- the ARTEMIS_HOME variable will include back slashes (An invalid file URI character path separator). For this
- reason we overwrite the ARTEMIS_HOME variable with backslashes replaced with forward slashes. */
+ /*
+ * We use File URI for locating files. The ARTEMIS_HOME variable is used to determine file paths. For Windows
+ * the ARTEMIS_HOME variable will include back slashes (An invalid file URI character path separator). For this
+ * reason we overwrite the ARTEMIS_HOME variable with backslashes replaced with forward slashes.
+ */
brokerInstance = System.getProperty("artemis.instance");
if (brokerInstance != null) {
brokerInstance = brokerInstance.replace("\\", "/");
@@ -188,9 +190,11 @@ public URI getBrokerURIInstance() {
@Override
public String getBrokerHome() {
if (brokerHome == null) {
- /* We use File URI for locating files. The ARTEMIS_HOME variable is used to determine file paths. For Windows
- the ARTEMIS_HOME variable will include back slashes (An invalid file URI character path separator). For this
- reason we overwrite the ARTEMIS_HOME variable with backslashes replaced with forward slashes. */
+ /*
+ * We use File URI for locating files. The ARTEMIS_HOME variable is used to determine file paths. For Windows
+ * the ARTEMIS_HOME variable will include back slashes (An invalid file URI character path separator). For this
+ * reason we overwrite the ARTEMIS_HOME variable with backslashes replaced with forward slashes.
+ */
brokerHome = System.getProperty("artemis.home");
if (brokerHome != null) {
brokerHome = brokerHome.replace("\\", "/");
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java
index cec5dae03f7..9a6a29a454e 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java
@@ -34,7 +34,7 @@
import picocli.CommandLine.Parameters;
/**
- * Abstract class where we can replace the configuration in various places *
+ * Abstract class where we can replace the configuration in various places
*/
public abstract class Configurable extends ActionAbstract {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java
index b600056add4..375d4d803e0 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java
@@ -28,8 +28,9 @@ public class InputAbstract extends ActionAbstract {
private static boolean inputEnabled = false;
/**
- * Test cases validating or using the CLI cannot deal with inputs,
- * so they are generally disabled, however the main method from the CLI will enable it back. */
+ * Test cases validating or using the CLI cannot deal with inputs, so they are generally disabled, however the main
+ * method from the CLI will enable it back.
+ */
public static void enableInput() {
inputEnabled = true;
}
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
index a8f56fa7cdf..7eb70011b1b 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
@@ -61,10 +61,8 @@ public class Run extends LockAbstract {
private Timer shutdownTimer;
/**
- * This will disable the System.exit at the end of the server.stop, as that means there are other things
- * happening on the same VM.
- *
- * @param embedded
+ * This will disable the System.exit at the end of the server.stop, as that means there are other things happening on
+ * the same VM.
*/
public static void setEmbedded(boolean embedded) {
Run.embedded = true;
@@ -164,8 +162,6 @@ public void deActivate() {
/**
* Add a simple shutdown hook to stop the server.
- *
- * @param configurationDir
*/
private void addShutdownHook(File configurationDir) {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/helper/HelperCreate.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/helper/HelperCreate.java
index e118cd22781..3f59777dbb2 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/helper/HelperCreate.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/helper/HelperCreate.java
@@ -30,8 +30,10 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/** This is a class simulating what the Artemis Maven Plugin does.
- * You may use by creating a new instance, filling the properties, and calling the method create */
+/**
+ * This is a class simulating what the Artemis Maven Plugin does. You may use by creating a new instance, filling the
+ * properties, and calling the method create
+ */
public class HelperCreate extends HelperBase {
public HelperCreate(String homeProperty) {
@@ -76,9 +78,6 @@ public HelperCreate(File artemisHome) {
private boolean failoverOnShutdown = false;
- /**
- * it will disable auto-tune
- */
private boolean noAutoTune = true;
private String messageLoadBalancing = "ON_DEMAND";
@@ -384,5 +383,4 @@ private void copyConfigurationFiles(String[] list,
}
}
}
-
}
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/AsyncJms2ProducerFacade.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/AsyncJms2ProducerFacade.java
index 49f5d4c29f3..297a3f9ccde 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/AsyncJms2ProducerFacade.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/AsyncJms2ProducerFacade.java
@@ -132,8 +132,8 @@ private void addedPendingSend() {
}
/**
- * if {@code true}, a subsequent {@link #trySend} would return {@link SendAttemptResult#Success}.
* If the session needs to be transactional then use the constructor which takes 2 sessions.
*
* @param inputStream the stream from which to read the XML for import
@@ -144,9 +144,9 @@ public void process(InputStream inputStream, ClientSession session) throws Excep
/**
* This is the constructor to use if you wish to import all messages transactionally.
- *
+ * Pass in a session which doesn't use auto-commit for sends, and one that does (for management operations necessary
+ * during import).
*
* @param inputStream the stream from which to read the XML for import
* @param session used for sending messages, doesn't need to auto-commit sends
@@ -511,6 +511,4 @@ private void bindAddress() throws Exception {
logger.debug("Binding {} already exists so won't re-bind.", addressName);
}
}
-
-
}
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/AddUser.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/AddUser.java
index 3f91ef7de82..54a7683e4d4 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/AddUser.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/AddUser.java
@@ -23,7 +23,7 @@
/**
* Adding a new user, example:
- * ./artemis user add --user-command-user guest --role admin --user-command-password ***
+ * {@literal ./artemis user add --user-command-user guest --role admin --user-command-password ***}
*/
@Command(name = "add", description = "Add a user.")
public class AddUser extends PasswordAction {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/RemoveUser.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/RemoveUser.java
index de17056cbc9..43b271fb0c9 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/RemoveUser.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/RemoveUser.java
@@ -22,7 +22,9 @@
/**
* Remove a user, example:
+ *
- * Please configure {@code blocks >= -XX:CompileThreshold} (ie by default on most JVMs is 10000) to favour the best JIT/OSR compilation (ie: Just In Time/On Stack Replacement)
- * if the test is running on a temporary file-system (eg: tmpfs on Linux) or without {@code fsync}.
+ * Please configure {@code blocks >= -XX:CompileThreshold} (ie by default on most JVMs is 10000) to favour the best
+ * JIT/OSR compilation (ie: Just In Time/On Stack Replacement) if the test is running on a temporary file-system (eg:
+ * tmpfs on Linux) or without {@code fsync}.
*
- * NOTE: The write latencies are provided only if {@code verbose && !(journalType == JournalType.ASYNCIO && !syncWrites)} (ie are used effective synchronous writes).
+ * NOTE: The write latencies are provided only if
+ * {@code verbose && !(journalType == JournalType.ASYNCIO && !syncWrites)} (ie are used effective synchronous
+ * writes).
*
* @param datafolder the folder where the journal files will be stored
* @param blockSize the size in bytes of each write on the journal
@@ -59,12 +61,12 @@ public class SyncCalculation {
* @param tries the number of tests
* @param verbose {@code true} to make the output verbose, {@code false} otherwise
* @param fsync if {@code true} the test is performing full durable writes, {@code false} otherwise
- * @param syncWrites if {@code true} each write is performed only if the previous one is completed, {@code false} otherwise (ie each try will wait only the last write)
+ * @param syncWrites if {@code true} each write is performed only if the previous one is completed, {@code false}
+ * otherwise (ie each try will wait only the last write)
* @param fileName the name of the journal file used for the test
* @param maxAIO the max number of in-flight IO requests (if {@code journalType} will support it)
* @param journalType the {@link JournalType} used for the tests
* @return the lowest elapsed time (in {@link TimeUnit#MILLISECONDS}) to perform a try
- * @throws Exception
*/
public static long syncTest(File datafolder,
int blockSize,
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java
index 2732d3caae6..303c956701e 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java
@@ -46,14 +46,10 @@ public static void cleanupProcess() {
}
/**
- * *
- *
* @param logname the prefix for log output
* @param location The location where this command is being executed from
* @param hook it will finish the process upon shutdown of the VM
* @param args The arguments being passwed to the the CLI tool
- * @return
- * @throws Exception
*/
public static Process build(String logname, File location, boolean hook, String... args) throws Exception {
boolean IS_WINDOWS = System.getProperty("os.name").toLowerCase().trim().startsWith("win");
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java
index 154a9dca7bd..b64b32dbb46 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java
@@ -125,10 +125,10 @@ public void createComponents() throws Exception {
components = fileDeploymentManager.buildService(securityManager, ManagementFactory.getPlatformMBeanServer(), activateCallback);
}
- /*
- * this makes sure the components are started in the correct order. Its simple at the mo as e only have core and jms but
- * will need impproving if we get more.
- * */
+ /**
+ * This makes sure the components are started in the correct order. Its simple at the mo as e only have core and jms
+ * but will need impproving if we get more.
+ */
private List
* The following code will also fail:
*
*
+ * By contrast, {@link #setIndex(int, int)} guarantees that it never throws an {@link IndexOutOfBoundsException} as
+ * long as the specified indexes meet basic constraints, regardless what the current index values of the buffer are:
*
*
- * Please note that the behavior of this method is different
- * from that of NIO buffer, which sets the {@code limit} to
+ * Please note that the behavior of this method is different from that of NIO buffer, which sets the {@code limit} to
* the {@code capacity} of the buffer.
*/
void clear();
/**
- * Marks the current {@code readerIndex} in this buffer. You can
- * reposition the current {@code readerIndex} to the marked
- * {@code readerIndex} by calling {@link #resetReaderIndex()}.
- * The initial value of the marked {@code readerIndex} is {@code 0}.
+ * Marks the current {@code readerIndex} in this buffer. You can reposition the current {@code readerIndex} to the
+ * marked {@code readerIndex} by calling {@link #resetReaderIndex()}. The initial value of the marked
+ * {@code readerIndex} is {@code 0}.
*/
void markReaderIndex();
/**
- * Repositions the current {@code readerIndex} to the marked
- * {@code readerIndex} in this buffer.
+ * Repositions the current {@code readerIndex} to the marked {@code readerIndex} in this buffer.
*
- * @throws IndexOutOfBoundsException if the current {@code writerIndex} is less than the marked
- * {@code readerIndex}
+ * @throws IndexOutOfBoundsException if the current {@code writerIndex} is less than the marked {@code readerIndex}
*/
void resetReaderIndex();
/**
- * Marks the current {@code writerIndex} in this buffer. You can
- * reposition the current {@code writerIndex} to the marked
- * {@code writerIndex} by calling {@link #resetWriterIndex()}.
- * The initial value of the marked {@code writerIndex} is {@code 0}.
+ * Marks the current {@code writerIndex} in this buffer. You can reposition the current {@code writerIndex} to the
+ * marked {@code writerIndex} by calling {@link #resetWriterIndex()}. The initial value of the marked
+ * {@code writerIndex} is {@code 0}.
*/
void markWriterIndex();
/**
- * Repositions the current {@code writerIndex} to the marked
- * {@code writerIndex} in this buffer.
+ * Repositions the current {@code writerIndex} to the marked {@code writerIndex} in this buffer.
*
* @throws IndexOutOfBoundsException if the current {@code readerIndex} is greater than the marked
* {@code writerIndex}
@@ -196,440 +179,373 @@ public interface ActiveMQBuffer extends DataInput {
void resetWriterIndex();
/**
- * Discards the bytes between the 0th index and {@code readerIndex}.
- * It moves the bytes between {@code readerIndex} and {@code writerIndex}
- * to the 0th index, and sets {@code readerIndex} and {@code writerIndex}
- * to {@code 0} and {@code oldWriterIndex - oldReaderIndex} respectively.
+ * Discards the bytes between the 0th index and {@code readerIndex}. It moves the bytes between {@code readerIndex}
+ * and {@code writerIndex} to the 0th index, and sets {@code readerIndex} and {@code writerIndex} to {@code 0} and
+ * {@code oldWriterIndex - oldReaderIndex} respectively.
*
* Please refer to the class documentation for more detailed explanation.
*/
void discardReadBytes();
/**
- * Gets a byte at the specified absolute {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Gets a byte at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return The byte at the specified index
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 1} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 1} is
+ * greater than {@code this.capacity}
*/
byte getByte(int index);
/**
- * Gets an unsigned byte at the specified absolute {@code index} in this
- * buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets an unsigned byte at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return an unsigned byte at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 1} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 1} is
+ * greater than {@code this.capacity}
*/
short getUnsignedByte(int index);
/**
- * Gets a 16-bit short integer at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a 16-bit short integer at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a 16-bit short integer at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 2} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 2} is
+ * greater than {@code this.capacity}
*/
short getShort(int index);
/**
- * Gets an unsigned 16-bit short integer at the specified absolute
- * {@code index} in this buffer. This method does not modify
- * {@code readerIndex} or {@code writerIndex} of this buffer.
+ * Gets an unsigned 16-bit short integer at the specified absolute {@code index} in this buffer. This method does
+ * not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return an unsigned 16-bit short integer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 2} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 2} is
+ * greater than {@code this.capacity}
*/
int getUnsignedShort(int index);
/**
- * Gets a 32-bit integer at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a 32-bit integer at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a 32-bit integer at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 4} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is
+ * greater than {@code this.capacity}
*/
int getInt(int index);
/**
- * Gets an unsigned 32-bit integer at the specified absolute {@code index}
- * in this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets an unsigned 32-bit integer at the specified absolute {@code index} in this buffer. This method does not
+ * modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index The index into this buffer
* @return an unsigned 32-bit integer at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 4} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is
+ * greater than {@code this.capacity}
*/
long getUnsignedInt(int index);
/**
- * Gets a 64-bit long integer at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a 64-bit long integer at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a 64-bit long integer at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 8} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 8} is
+ * greater than {@code this.capacity}
*/
long getLong(int index);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index} until the destination becomes
- * non-writable. This method is basically same with
- * {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this
- * method increases the {@code writerIndex} of the destination by the
- * number of the transferred bytes while
- * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * the source buffer (i.e. {@code this}).
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index} until
+ * the destination becomes non-writable. This method is basically same with
+ * {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this method increases the {@code writerIndex} of the
+ * destination by the number of the transferred bytes while {@link #getBytes(int, ActiveMQBuffer, int, int)} does
+ * not. This method does not modify {@code readerIndex} or {@code writerIndex} of the source buffer (i.e.
+ * {@code this}).
*
* @param index Index into the buffer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + dst.writableBytes} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + dst.writableBytes} is greater than {@code this.capacity}
*/
void getBytes(int index, ActiveMQBuffer dst);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index}. This method is basically same
- * with {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this
- * method increases the {@code writerIndex} of the destination by the
- * number of the transferred bytes while
- * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * the source buffer (i.e. {@code this}).
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index}. This
+ * method is basically same with {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this method increases
+ * the {@code writerIndex} of the destination by the number of the transferred bytes while
+ * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of the source buffer (i.e. {@code this}).
*
* @param length the number of bytes to transfer
* @param index Index into the buffer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code length} is greater than {@code dst.writableBytes}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if {@code index + length}
+ * is greater than {@code this.capacity}, or if {@code length} is greater than
+ * {@code dst.writableBytes}
*/
void getBytes(int index, ActiveMQBuffer dst, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex}
- * of both the source (i.e. {@code this}) and the destination.
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of both the source (i.e. {@code this}) and the
+ * destination.
*
* @param dst The destination bufferIndex the first index of the destination
* @param length The number of bytes to transfer
* @param index Index into the buffer
* @param dstIndex The index into the destination bufferThe destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if the specified {@code dstIndex} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code dstIndex + length} is greater than
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if the specified
+ * {@code dstIndex} is less than {@code 0}, if {@code index + length} is greater
+ * than {@code this.capacity}, or if {@code dstIndex + length} is greater than
* {@code dst.capacity}
*/
void getBytes(int index, ActiveMQBuffer dst, int dstIndex, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of this buffer
*
* @param index Index into the buffer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + dst.length} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + dst.length} is greater than {@code this.capacity}
*/
void getBytes(int index, byte[] dst);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex}
- * of this buffer.
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param dstIndex The first index of the destination
* @param length The number of bytes to transfer
* @param index Index into the buffer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if the specified {@code dstIndex} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code dstIndex + length} is greater than
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if the specified
+ * {@code dstIndex} is less than {@code 0}, if {@code index + length} is greater
+ * than {@code this.capacity}, or if {@code dstIndex + length} is greater than
* {@code dst.length}
*/
void getBytes(int index, byte[] dst, int dstIndex, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index} until the destination's position
- * reaches its limit.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer while the destination's {@code position} will be increased.
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index} until
+ * the destination's position reaches its limit. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of this buffer while the destination's {@code position} will be increased.
*
* @param index Index into the buffer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + dst.remaining()} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + dst.remaining()} is greater than {@code this.capacity}
*/
void getBytes(int index, ByteBuffer dst);
/**
- * Gets a char at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a char at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a char at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 2} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 2} is
+ * greater than {@code this.capacity}
*/
char getChar(int index);
/**
- * Gets a float at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a float at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a float at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 4} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is
+ * greater than {@code this.capacity}
*/
float getFloat(int index);
/**
- * Gets a double at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a double at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a double at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 8} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 8} is
+ * greater than {@code this.capacity}
*/
double getDouble(int index);
/**
- * Sets the specified byte at the specified absolute {@code index} in this
- * buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified byte at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified byte
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 1} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 1} is
+ * greater than {@code this.capacity}
*/
void setByte(int index, byte value);
/**
- * Sets the specified 16-bit short integer at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified 16-bit short integer at the specified absolute {@code index} in this buffer. This method does
+ * not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified 16-bit short integer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 2} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 2} is
+ * greater than {@code this.capacity}
*/
void setShort(int index, short value);
/**
- * Sets the specified 32-bit integer at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified 32-bit integer at the specified absolute {@code index} in this buffer. This method does not
+ * modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified 32-bit integer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 4} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is
+ * greater than {@code this.capacity}
*/
void setInt(int index, int value);
/**
- * Sets the specified 64-bit long integer at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified 64-bit long integer at the specified absolute {@code index} in this buffer. This method does
+ * not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified 64-bit long integer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 8} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 8} is
+ * greater than {@code this.capacity}
*/
void setLong(int index, long value);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the specified absolute {@code index} until the destination becomes
- * unreadable. This method is basically same with
- * {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this
- * method increases the {@code readerIndex} of the source buffer by
- * the number of the transferred bytes while
- * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * the source buffer (i.e. {@code this}).
+ * Transfers the specified source buffer's data to this buffer starting at the specified absolute {@code index} until
+ * the destination becomes unreadable. This method is basically same with
+ * {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this method increases the {@code readerIndex} of the
+ * source buffer by the number of the transferred bytes while {@link #getBytes(int, ActiveMQBuffer, int, int)} does
+ * not. This method does not modify {@code readerIndex} or {@code writerIndex} of the source buffer (i.e.
+ * {@code this}).
*
* @param index Index into the buffer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + src.readableBytes} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + src.readableBytes} is greater than {@code this.capacity}
*/
void setBytes(int index, ActiveMQBuffer src);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the specified absolute {@code index}. This method is basically same
- * with {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this
- * method increases the {@code readerIndex} of the source buffer by
- * the number of the transferred bytes while
- * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * the source buffer (i.e. {@code this}).
+ * Transfers the specified source buffer's data to this buffer starting at the specified absolute {@code index}. This
+ * method is basically same with {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this method increases
+ * the {@code readerIndex} of the source buffer by the number of the transferred bytes while
+ * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of the source buffer (i.e. {@code this}).
*
* @param length the number of bytes to transfer
* @param index Index into the buffer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code length} is greater than {@code src.readableBytes}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if {@code index + length}
+ * is greater than {@code this.capacity}, or if {@code length} is greater than
+ * {@code src.readableBytes}
*/
void setBytes(int index, ActiveMQBuffer src, int length);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex}
- * of both the source (i.e. {@code this}) and the destination.
+ * Transfers the specified source buffer's data to this buffer starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of both the source (i.e. {@code this}) and the
+ * destination.
*
* @param src The source bufferIndex the first index of the source
* @param length The number of bytes to transfer
* @param index Index into the buffer
* @param srcIndex The source buffer index
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if the specified {@code srcIndex} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code srcIndex + length} is greater than
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if the specified
+ * {@code srcIndex} is less than {@code 0}, if {@code index + length} is greater
+ * than {@code this.capacity}, or if {@code srcIndex + length} is greater than
* {@code src.capacity}
*/
void setBytes(int index, ActiveMQBuffer src, int srcIndex, int length);
/**
- * Transfers the specified source array's data to this buffer starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Transfers the specified source array's data to this buffer starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + src.length} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + src.length} is greater than {@code this.capacity}
*/
void setBytes(int index, byte[] src);
/**
- * Transfers the specified source array's data to this buffer starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Transfers the specified source array's data to this buffer starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param src The source buffer
* @param srcIndex The source buffer index
* @param length The number of bytes to transfer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if the specified {@code srcIndex} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code srcIndex + length} is greater than {@code src.length}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if the specified
+ * {@code srcIndex} is less than {@code 0}, if {@code index + length} is greater
+ * than {@code this.capacity}, or if {@code srcIndex + length} is greater than
+ * {@code src.length}
*/
void setBytes(int index, byte[] src, int srcIndex, int length);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the specified absolute {@code index} until the source buffer's position
- * reaches its limit.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Transfers the specified source buffer's data to this buffer starting at the specified absolute {@code index} until
+ * the source buffer's position reaches its limit. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + src.remaining()} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + src.remaining()} is greater than {@code this.capacity}
*/
void setBytes(int index, ByteBuffer src);
/**
- * Sets the specified char at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified char at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified char
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 2} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 2} is
+ * greater than {@code this.capacity}
*/
void setChar(int index, char value);
/**
- * Sets the specified float at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified float at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified float
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 4} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is
+ * greater than {@code this.capacity}
*/
void setFloat(int index, float value);
/**
- * Sets the specified double at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified double at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified double
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 8} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 8} is
+ * greater than {@code this.capacity}
*/
void setDouble(int index, double value);
/**
- * Gets a byte at the current {@code readerIndex} and increases
- * the {@code readerIndex} by {@code 1} in this buffer.
+ * Gets a byte at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 1} in this buffer.
*
* @return a byte at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 1}
@@ -638,8 +554,8 @@ public interface ActiveMQBuffer extends DataInput {
byte readByte();
/**
- * Gets an unsigned byte at the current {@code readerIndex} and increases
- * the {@code readerIndex} by {@code 1} in this buffer.
+ * Gets an unsigned byte at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 1} in
+ * this buffer.
*
* @return an unsigned byte at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 1}
@@ -648,8 +564,8 @@ public interface ActiveMQBuffer extends DataInput {
int readUnsignedByte();
/**
- * Gets a 16-bit short integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 2} in this buffer.
+ * Gets a 16-bit short integer at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 2}
+ * in this buffer.
*
* @return a 16-bit short integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 2}
@@ -658,8 +574,8 @@ public interface ActiveMQBuffer extends DataInput {
short readShort();
/**
- * Gets an unsigned 16-bit short integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 2} in this buffer.
+ * Gets an unsigned 16-bit short integer at the current {@code readerIndex} and increases the {@code readerIndex} by
+ * {@code 2} in this buffer.
*
* @return an unsigned 16-bit short integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 2}
@@ -668,8 +584,8 @@ public interface ActiveMQBuffer extends DataInput {
int readUnsignedShort();
/**
- * Gets a 32-bit integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 4} in this buffer.
+ * Gets a 32-bit integer at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 4} in
+ * this buffer.
*
* @return a 32-bit integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 4}
@@ -678,8 +594,8 @@ public interface ActiveMQBuffer extends DataInput {
int readInt();
/**
- * Gets a (potentially {@code null}) 32-bit integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 4} in this buffer.
+ * Gets a (potentially {@code null}) 32-bit integer at the current {@code readerIndex} and increases the
+ * {@code readerIndex} by {@code 4} in this buffer.
*
* @return a (potentially {@code null}) 32-bit integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 4}
@@ -687,8 +603,8 @@ public interface ActiveMQBuffer extends DataInput {
Integer readNullableInt();
/**
- * Gets an unsigned 32-bit integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 4} in this buffer.
+ * Gets an unsigned 32-bit integer at the current {@code readerIndex} and increases the {@code readerIndex} by
+ * {@code 4} in this buffer.
*
* @return an unsigned 32-bit integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 4}
@@ -696,8 +612,8 @@ public interface ActiveMQBuffer extends DataInput {
long readUnsignedInt();
/**
- * Gets a 64-bit integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 8} in this buffer.
+ * Gets a 64-bit integer at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 8} in
+ * this buffer.
*
* @return a 64-bit integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 8}
@@ -706,8 +622,8 @@ public interface ActiveMQBuffer extends DataInput {
long readLong();
/**
- * Gets a (potentially {@code null}) 64-bit integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 8} in this buffer.
+ * Gets a (potentially {@code null}) 64-bit integer at the current {@code readerIndex} and increases the
+ * {@code readerIndex} by {@code 8} in this buffer.
*
* @return a (potentially {@code null}) 64-bit integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 8}
@@ -715,8 +631,7 @@ public interface ActiveMQBuffer extends DataInput {
Long readNullableLong();
/**
- * Gets a char at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 2} in this buffer.
+ * Gets a char at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 2} in this buffer.
*
* @return a char at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 2}
@@ -725,8 +640,8 @@ public interface ActiveMQBuffer extends DataInput {
char readChar();
/**
- * Gets a float at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 4} in this buffer.
+ * Gets a float at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 4} in this
+ * buffer.
*
* @return a float at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 4}
@@ -735,8 +650,8 @@ public interface ActiveMQBuffer extends DataInput {
float readFloat();
/**
- * Gets a double at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 8} in this buffer.
+ * Gets a double at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 8} in this
+ * buffer.
*
* @return a double at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 8}
@@ -745,8 +660,8 @@ public interface ActiveMQBuffer extends DataInput {
double readDouble();
/**
- * Gets a boolean at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 1} in this buffer.
+ * Gets a boolean at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 1} in this
+ * buffer.
*
* @return a boolean at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 1}
@@ -755,8 +670,8 @@ public interface ActiveMQBuffer extends DataInput {
boolean readBoolean();
/**
- * Gets a (potentially {@code null}) boolean at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 1} in this buffer.
+ * Gets a (potentially {@code null}) boolean at the current {@code readerIndex} and increases the {@code readerIndex}
+ * by {@code 1} in this buffer.
*
* @return a (potentially {@code null}) boolean at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 1}
@@ -800,9 +715,8 @@ public interface ActiveMQBuffer extends DataInput {
String readUTF();
/**
- * Returns a new slice of this buffer's sub-region starting at the current
- * {@code readerIndex} and increases the {@code readerIndex} by the size
- * of the new slice (= {@code length}).
+ * Returns a new slice of this buffer's sub-region starting at the current {@code readerIndex} and increases the
+ * {@code readerIndex} by the size of the new slice (= {@code length}).
*
* @param length the size of the new slice
* @return the newly created slice
@@ -811,56 +725,47 @@ public interface ActiveMQBuffer extends DataInput {
ActiveMQBuffer readSlice(int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} until the destination becomes
- * non-writable, and increases the {@code readerIndex} by the number of the
- * transferred bytes. This method is basically same with
- * {@link #readBytes(ActiveMQBuffer, int, int)}, except that this method
- * increases the {@code writerIndex} of the destination by the number of
- * the transferred bytes while {@link #readBytes(ActiveMQBuffer, int, int)}
- * does not.
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} until the
+ * destination becomes non-writable, and increases the {@code readerIndex} by the number of the transferred bytes.
+ * This method is basically same with {@link #readBytes(ActiveMQBuffer, int, int)}, except that this method increases
+ * the {@code writerIndex} of the destination by the number of the transferred bytes while
+ * {@link #readBytes(ActiveMQBuffer, int, int)} does not.
*
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if {@code dst.writableBytes} is greater than
- * {@code this.readableBytes}
+ * @throws IndexOutOfBoundsException if {@code dst.writableBytes} is greater than {@code this.readableBytes}
*/
void readBytes(ActiveMQBuffer dst);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} and increases the {@code readerIndex}
- * by the number of the transferred bytes (= {@code length}). This method
- * is basically same with {@link #readBytes(ActiveMQBuffer, int, int)},
- * except that this method increases the {@code writerIndex} of the
- * destination by the number of the transferred bytes (= {@code length})
- * while {@link #readBytes(ActiveMQBuffer, int, int)} does not.
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} and
+ * increases the {@code readerIndex} by the number of the transferred bytes (= {@code length}). This method is
+ * basically same with {@link #readBytes(ActiveMQBuffer, int, int)}, except that this method increases the
+ * {@code writerIndex} of the destination by the number of the transferred bytes (= {@code length}) while
+ * {@link #readBytes(ActiveMQBuffer, int, int)} does not.
*
* @param dst The destination buffer
* @param length The number of bytes to transfer
- * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.readableBytes} or
- * if {@code length} is greater than {@code dst.writableBytes}
+ * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.readableBytes} or if
+ * {@code length} is greater than {@code dst.writableBytes}
*/
void readBytes(ActiveMQBuffer dst, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} and increases the {@code readerIndex}
- * by the number of the transferred bytes (= {@code length}).
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} and
+ * increases the {@code readerIndex} by the number of the transferred bytes (= {@code length}).
*
* @param dstIndex The destination buffer index
* @param length the number of bytes to transfer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code dstIndex} is less than {@code 0},
- * if {@code length} is greater than {@code this.readableBytes}, or
- * if {@code dstIndex + length} is greater than
- * {@code dst.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code dstIndex} is less than {@code 0}, if {@code length} is
+ * greater than {@code this.readableBytes}, or if {@code dstIndex + length} is
+ * greater than {@code dst.capacity}
*/
void readBytes(ActiveMQBuffer dst, int dstIndex, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} and increases the {@code readerIndex}
- * by the number of the transferred bytes (= {@code dst.length}).
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} and
+ * increases the {@code readerIndex} by the number of the transferred bytes (= {@code dst.length}).
*
* @param dst The destination buffer
* @throws IndexOutOfBoundsException if {@code dst.length} is greater than {@code this.readableBytes}
@@ -868,34 +773,30 @@ public interface ActiveMQBuffer extends DataInput {
void readBytes(byte[] dst);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} and increases the {@code readerIndex}
- * by the number of the transferred bytes (= {@code length}).
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} and
+ * increases the {@code readerIndex} by the number of the transferred bytes (= {@code length}).
*
* @param dstIndex The destination bufferIndex
* @param length the number of bytes to transfer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code dstIndex} is less than {@code 0},
- * if {@code length} is greater than {@code this.readableBytes}, or
- * if {@code dstIndex + length} is greater than {@code dst.length}
+ * @throws IndexOutOfBoundsException if the specified {@code dstIndex} is less than {@code 0}, if {@code length} is
+ * greater than {@code this.readableBytes}, or if {@code dstIndex + length} is
+ * greater than {@code dst.length}
*/
void readBytes(byte[] dst, int dstIndex, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} until the destination's position
- * reaches its limit, and increases the {@code readerIndex} by the
- * number of the transferred bytes.
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} until the
+ * destination's position reaches its limit, and increases the {@code readerIndex} by the number of the transferred
+ * bytes.
*
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if {@code dst.remaining()} is greater than
- * {@code this.readableBytes}
+ * @throws IndexOutOfBoundsException if {@code dst.remaining()} is greater than {@code this.readableBytes}
*/
void readBytes(ByteBuffer dst);
/**
- * Increases the current {@code readerIndex} by the specified
- * {@code length} in this buffer.
+ * Increases the current {@code readerIndex} by the specified {@code length} in this buffer.
*
* @param length The number of bytes to skip
* @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.readableBytes}
@@ -904,8 +805,8 @@ public interface ActiveMQBuffer extends DataInput {
int skipBytes(int length);
/**
- * Sets the specified byte at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 1} in this buffer.
+ * Sets the specified byte at the current {@code writerIndex} and increases the {@code writerIndex} by {@code 1} in
+ * this buffer.
*
* @param value The specified byte
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 1}
@@ -913,9 +814,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeByte(byte value);
/**
- * Sets the specified 16-bit short integer at the current
- * {@code writerIndex} and increases the {@code writerIndex} by {@code 2}
- * in this buffer.
+ * Sets the specified 16-bit short integer at the current {@code writerIndex} and increases the {@code writerIndex}
+ * by {@code 2} in this buffer.
*
* @param value The specified 16-bit short integer
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 2}
@@ -923,8 +823,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeShort(short value);
/**
- * Sets the specified 32-bit integer at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 4} in this buffer.
+ * Sets the specified 32-bit integer at the current {@code writerIndex} and increases the {@code writerIndex} by
+ * {@code 4} in this buffer.
*
* @param value The specified 32-bit integer
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 4}
@@ -932,8 +832,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeInt(int value);
/**
- * Sets the specified (potentially {@code null}) 32-bit integer at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 4} in this buffer.
+ * Sets the specified (potentially {@code null}) 32-bit integer at the current {@code writerIndex} and increases the
+ * {@code writerIndex} by {@code 4} in this buffer.
*
* @param value The specified (potentially {@code null}) 32-bit integer
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 4}
@@ -941,9 +841,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeNullableInt(Integer value);
/**
- * Sets the specified 64-bit long integer at the current
- * {@code writerIndex} and increases the {@code writerIndex} by {@code 8}
- * in this buffer.
+ * Sets the specified 64-bit long integer at the current {@code writerIndex} and increases the {@code writerIndex} by
+ * {@code 8} in this buffer.
*
* @param value The specified 64-bit long integer
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 8}
@@ -951,9 +850,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeLong(long value);
/**
- * Sets the specified (potentially {@code null}) 64-bit long integer at the current
- * {@code writerIndex} and increases the {@code writerIndex} by {@code 8}
- * in this buffer.
+ * Sets the specified (potentially {@code null}) 64-bit long integer at the current {@code writerIndex} and increases
+ * the {@code writerIndex} by {@code 8} in this buffer.
*
* @param value The specified (potentially {@code null}) 64-bit long integer
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 8}
@@ -961,8 +859,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeNullableLong(Long value);
/**
- * Sets the specified char at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 2} in this buffer.
+ * Sets the specified char at the current {@code writerIndex} and increases the {@code writerIndex} by {@code 2} in
+ * this buffer.
*
* @param chr The specified char
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 2}
@@ -970,8 +868,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeChar(char chr);
/**
- * Sets the specified float at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 4} in this buffer.
+ * Sets the specified float at the current {@code writerIndex} and increases the {@code writerIndex} by {@code 4} in
+ * this buffer.
*
* @param value The specified float
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 4}
@@ -979,8 +877,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeFloat(float value);
/**
- * Sets the specified double at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 8} in this buffer.
+ * Sets the specified double at the current {@code writerIndex} and increases the {@code writerIndex} by {@code 8} in
+ * this buffer.
*
* @param value The specified double
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 8}
@@ -1038,40 +936,35 @@ public interface ActiveMQBuffer extends DataInput {
void writeUTF(String utf);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the current {@code writerIndex} and increases the {@code writerIndex}
- * by the number of the transferred bytes (= {@code length}). This method
- * is basically same with {@link #writeBytes(ActiveMQBuffer, int, int)},
- * except that this method increases the {@code readerIndex} of the source
- * buffer by the number of the transferred bytes (= {@code length}) while
+ * Transfers the specified source buffer's data to this buffer starting at the current {@code writerIndex} and
+ * increases the {@code writerIndex} by the number of the transferred bytes (= {@code length}). This method is
+ * basically same with {@link #writeBytes(ActiveMQBuffer, int, int)}, except that this method increases the
+ * {@code readerIndex} of the source buffer by the number of the transferred bytes (= {@code length}) while
* {@link #writeBytes(ActiveMQBuffer, int, int)} does not.
*
* @param length the number of bytes to transfer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.writableBytes} or
- * if {@code length} is greater then {@code src.readableBytes}
+ * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.writableBytes} or if
+ * {@code length} is greater then {@code src.readableBytes}
*/
void writeBytes(ActiveMQBuffer src, int length);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the current {@code writerIndex} and increases the {@code writerIndex}
- * by the number of the transferred bytes (= {@code length}).
+ * Transfers the specified source buffer's data to this buffer starting at the current {@code writerIndex} and
+ * increases the {@code writerIndex} by the number of the transferred bytes (= {@code length}).
*
* @param srcIndex the first index of the source
* @param length the number of bytes to transfer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code srcIndex} is less than {@code 0},
- * if {@code srcIndex + length} is greater than
- * {@code src.capacity}, or
- * if {@code length} is greater than {@code this.writableBytes}
+ * @throws IndexOutOfBoundsException if the specified {@code srcIndex} is less than {@code 0}, if
+ * {@code srcIndex + length} is greater than {@code src.capacity}, or if
+ * {@code length} is greater than {@code this.writableBytes}
*/
void writeBytes(ActiveMQBuffer src, int srcIndex, int length);
/**
- * Transfers the specified source array's data to this buffer starting at
- * the current {@code writerIndex} and increases the {@code writerIndex}
- * by the number of the transferred bytes (= {@code src.length}).
+ * Transfers the specified source array's data to this buffer starting at the current {@code writerIndex} and
+ * increases the {@code writerIndex} by the number of the transferred bytes (= {@code src.length}).
*
* @param src The source buffer
* @throws IndexOutOfBoundsException if {@code src.length} is greater than {@code this.writableBytes}
@@ -1079,123 +972,103 @@ public interface ActiveMQBuffer extends DataInput {
void writeBytes(byte[] src);
/**
- * Transfers the specified source array's data to this buffer starting at
- * the current {@code writerIndex} and increases the {@code writerIndex}
- * by the number of the transferred bytes (= {@code length}).
+ * Transfers the specified source array's data to this buffer starting at the current {@code writerIndex} and
+ * increases the {@code writerIndex} by the number of the transferred bytes (= {@code length}).
*
* @param srcIndex the first index of the source
* @param length the number of bytes to transfer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code srcIndex} is less than {@code 0},
- * if {@code srcIndex + length} is greater than
- * {@code src.length}, or
- * if {@code length} is greater than {@code this.writableBytes}
+ * @throws IndexOutOfBoundsException if the specified {@code srcIndex} is less than {@code 0}, if
+ * {@code srcIndex + length} is greater than {@code src.length}, or if
+ * {@code length} is greater than {@code this.writableBytes}
*/
void writeBytes(byte[] src, int srcIndex, int length);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the current {@code writerIndex} until the source buffer's position
- * reaches its limit, and increases the {@code writerIndex} by the
- * number of the transferred bytes.
+ * Transfers the specified source buffer's data to this buffer starting at the current {@code writerIndex} until the
+ * source buffer's position reaches its limit, and increases the {@code writerIndex} by the number of the transferred
+ * bytes.
*
* @param src The source buffer
- * @throws IndexOutOfBoundsException if {@code src.remaining()} is greater than
- * {@code this.writableBytes}
+ * @throws IndexOutOfBoundsException if {@code src.remaining()} is greater than {@code this.writableBytes}
*/
void writeBytes(ByteBuffer src);
-
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the current {@code writerIndex} until the source buffer's position
- * reaches its limit, and increases the {@code writerIndex} by the
- * number of the transferred bytes.
+ * Transfers the specified source buffer's data to this buffer starting at the current {@code writerIndex} until the
+ * source buffer's position reaches its limit, and increases the {@code writerIndex} by the number of the transferred
+ * bytes.
*
* @param src The source buffer
- * @throws IndexOutOfBoundsException if {@code src.remaining()} is greater than
- * {@code this.writableBytes}
+ * @throws IndexOutOfBoundsException if {@code src.remaining()} is greater than {@code this.writableBytes}
*/
void writeBytes(ByteBuf src, int srcIndex, int length);
/**
- * Returns a copy of this buffer's readable bytes. Modifying the content
- * of the returned buffer or this buffer does not affect each other at all.
- * This method is identical to {@code buf.copy(buf.readerIndex(), buf.readableBytes())}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Returns a copy of this buffer's readable bytes. Modifying the content of the returned buffer or this buffer does
+ * not affect each other at all. This method is identical to
+ * {@code buf.copy(buf.readerIndex(), buf.readableBytes())}. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of this buffer.
*
- * @return a copy of this buffer's readable bytes.
+ * @return a copy of this buffer's readable bytes
*/
ActiveMQBuffer copy();
/**
- * Returns a copy of this buffer's sub-region. Modifying the content of
- * the returned buffer or this buffer does not affect each other at all.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Returns a copy of this buffer's sub-region. Modifying the content of the returned buffer or this buffer does not
+ * affect each other at all. This method does not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param length The number of bytes to copy
- * @return a copy of this buffer's readable bytes.
+ * @return a copy of this buffer's readable bytes
*/
ActiveMQBuffer copy(int index, int length);
/**
- * Returns a slice of this buffer's readable bytes. Modifying the content
- * of the returned buffer or this buffer affects each other's content
- * while they maintain separate indexes and marks. This method is
- * identical to {@code buf.slice(buf.readerIndex(), buf.readableBytes())}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Returns a slice of this buffer's readable bytes. Modifying the content of the returned buffer or this buffer
+ * affects each other's content while they maintain separate indexes and marks. This method is identical to
+ * {@code buf.slice(buf.readerIndex(), buf.readableBytes())}. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of this buffer.
*
* @return a slice of this buffer's readable bytes
*/
ActiveMQBuffer slice();
/**
- * Returns a slice of this buffer's sub-region. Modifying the content of
- * the returned buffer or this buffer affects each other's content while
- * they maintain separate indexes and marks.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Returns a slice of this buffer's sub-region. Modifying the content of the returned buffer or this buffer affects
+ * each other's content while they maintain separate indexes and marks. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param length The number of bytes
- * @return a slice of this buffer's sub-region.
+ * @return a slice of this buffer's sub-region
*/
ActiveMQBuffer slice(int index, int length);
/**
- * Returns a buffer which shares the whole region of this buffer.
- * Modifying the content of the returned buffer or this buffer affects
- * each other's content while they maintain separate indexes and marks.
- * This method is identical to {@code buf.slice(0, buf.capacity())}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
+ * Returns a buffer which shares the whole region of this buffer. Modifying the content of the returned buffer or
+ * this buffer affects each other's content while they maintain separate indexes and marks. This method is identical
+ * to {@code buf.slice(0, buf.capacity())}. This method does not modify {@code readerIndex} or {@code writerIndex} of
* this buffer.
*
- * @return a buffer which shares the whole region of this buffer.
+ * @return a buffer which shares the whole region of this buffer
*/
ActiveMQBuffer duplicate();
/**
- * Converts this buffer's readable bytes into a NIO buffer. The returned
- * buffer might or might not share the content with this buffer, while
- * they have separate indexes and marks. This method is identical to
- * {@code buf.toByteBuffer(buf.readerIndex(), buf.readableBytes())}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Converts this buffer's readable bytes into a NIO buffer. The returned buffer might or might not share the content
+ * with this buffer, while they have separate indexes and marks. This method is identical to
+ * {@code buf.toByteBuffer(buf.readerIndex(), buf.readableBytes())}. This method does not modify {@code readerIndex}
+ * or {@code writerIndex} of this buffer.
*
* @return A converted NIO ByteBuffer
*/
ByteBuffer toByteBuffer();
/**
- * Converts this buffer's sub-region into a NIO buffer. The returned
- * buffer might or might not share the content with this buffer, while
- * they have separate indexes and marks.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Converts this buffer's sub-region into a NIO buffer. The returned buffer might or might not share the content
+ * with this buffer, while they have separate indexes and marks. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param length The number of bytes
@@ -1204,8 +1077,8 @@ public interface ActiveMQBuffer extends DataInput {
ByteBuffer toByteBuffer(int index, int length);
/**
- * Release any underlying resources held by this buffer
- */
+ * Release any underlying resources held by this buffer
+ */
void release();
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java
index 328d3c8038e..057803c8e83 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java
@@ -60,7 +60,7 @@ public static ActiveMQBuffer dynamicBuffer(final byte[] bytes) {
/**
* Creates an ActiveMQBuffer wrapping an underlying NIO ByteBuffer
- *
+ *
* The position on this buffer won't affect the position on the inner buffer
*
* @param underlying the underlying NIO ByteBuffer
@@ -76,7 +76,7 @@ public static ActiveMQBuffer wrappedBuffer(final ByteBuffer underlying) {
/**
* Creates an ActiveMQBuffer wrapping an underlying ByteBuf
- *
+ *
* The position on this buffer won't affect the position on the inner buffer
*
* @param underlying the underlying NIO ByteBuffer
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQException.java
index 056ec290ce9..d96a141d11e 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQException.java
@@ -44,9 +44,9 @@ public ActiveMQException(String message, Throwable t, ActiveMQExceptionType type
this.type = type;
}
- /*
- * This constructor is needed only for the native layer
- */
+ /**
+ * This constructor is needed only for the native layer
+ */
public ActiveMQException(int code, String msg) {
super(msg);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQIllegalStateException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQIllegalStateException.java
index 3ee855b06de..f5a8935caa8 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQIllegalStateException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQIllegalStateException.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.api.core;
/**
- * An ActiveMQ Artemis resource is not in a legal state (e.g. calling ClientConsumer.receive() if a
- * MessageHandler is set).
+ * An ActiveMQ Artemis resource is not in a legal state (e.g. calling ClientConsumer.receive() if a MessageHandler is
+ * set).
*/
public final class ActiveMQIllegalStateException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQInterceptorRejectedPacketException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQInterceptorRejectedPacketException.java
index e52c113bf46..f1ac0c18606 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQInterceptorRejectedPacketException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQInterceptorRejectedPacketException.java
@@ -20,7 +20,6 @@
* An outgoing interceptor returned false.
* See org.apache.activemq.artemis.api.core.client.ServerLocator#addOutgoingInterceptor(org.apache.activemq.artemis.api.core.Interceptor)
*/
-// XXX I doubt any reader will make much sense of this Javadoc's text.
public final class ActiveMQInterceptorRejectedPacketException extends ActiveMQException {
private static final long serialVersionUID = -5798841227645281815L;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQLargeMessageInterruptedException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQLargeMessageInterruptedException.java
index 77c45b93cbb..bfe649afe9c 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQLargeMessageInterruptedException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQLargeMessageInterruptedException.java
@@ -16,9 +16,6 @@
*/
package org.apache.activemq.artemis.api.core;
-/**
- */
-// XXX
public class ActiveMQLargeMessageInterruptedException extends ActiveMQException {
private static final long serialVersionUID = 0;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQNativeIOError.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQNativeIOError.java
index 1ed755d2bac..90a529261c9 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQNativeIOError.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQNativeIOError.java
@@ -19,7 +19,6 @@
/**
* An error has happened at ActiveMQ's native (non-Java) code used in reading and writing data.
*/
-// XXX
public final class ActiveMQNativeIOError extends ActiveMQException {
private static final long serialVersionUID = 2355120980683293085L;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQObjectClosedException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQObjectClosedException.java
index 06dad546e5a..46e0c178cf2 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQObjectClosedException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQObjectClosedException.java
@@ -17,8 +17,7 @@
package org.apache.activemq.artemis.api.core;
/**
- * A client operation failed because the calling resource (ClientSession, ClientProducer, etc.) is
- * closed.
+ * A client operation failed because the calling resource (ClientSession, ClientProducer, etc.) is closed.
*/
public final class ActiveMQObjectClosedException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQRemoteDisconnectException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQRemoteDisconnectException.java
index 9d44b7d557b..ba89a8a3233 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQRemoteDisconnectException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQRemoteDisconnectException.java
@@ -19,7 +19,7 @@
import static org.apache.activemq.artemis.api.core.ActiveMQExceptionType.REMOTE_DISCONNECT;
/**
- * A security problem occurred (authentication issues, permission issues,...)
+ * A security problem occurred (authentication issues, permission issues, etc.)
*/
public final class ActiveMQRemoteDisconnectException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQReplicationTimeooutException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQReplicationTimeooutException.java
index b0075c3d150..eebff32c40a 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQReplicationTimeooutException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQReplicationTimeooutException.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.api.core;
/**
- * The creation of a session was rejected by the server (e.g. if the server is starting and has not
- * finish to be initialized.
+ * The creation of a session was rejected by the server (e.g. if the server is starting and has not finish to be
+ * initialized.
*/
public final class ActiveMQReplicationTimeooutException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSecurityException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSecurityException.java
index da51b3836dd..4ab8f343965 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSecurityException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSecurityException.java
@@ -19,7 +19,7 @@
import static org.apache.activemq.artemis.api.core.ActiveMQExceptionType.SECURITY_EXCEPTION;
/**
- * A security problem occurred (authentication issues, permission issues,...)
+ * A security problem occurred (authentication issues, permission issues, etc.)
*/
public final class ActiveMQSecurityException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSessionCreationException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSessionCreationException.java
index a2c973a4f9d..2be9bb810c9 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSessionCreationException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSessionCreationException.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.api.core;
/**
- * The creation of a session was rejected by the server (e.g. if the server is starting and has not
- * finish to be initialized.
+ * The creation of a session was rejected by the server (e.g. if the server is starting and has not finish to be
+ * initialized.
*/
public final class ActiveMQSessionCreationException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ParameterisedAddress.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ParameterisedAddress.java
index d6afbbe9727..daebf2745ad 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ParameterisedAddress.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ParameterisedAddress.java
@@ -112,13 +112,11 @@ public static SimpleString extractAddress(SimpleString address) {
}
/**
- * Given an address string, extract only the query portion if the address is
- * parameterized, otherwise return an empty {@link Map}.
+ * Given an address string, extract only the query portion if the address is parameterized, otherwise return an empty
+ * {@link Map}.
*
- * @param address
- * The address to operate on.
- *
- * @return a {@link Map} containing the parameters associated with the given address.
+ * @param address The address to operate on.
+ * @return a {@link Map} containing the parameters associated with the given address
*/
@SuppressWarnings("unchecked")
public static Map
* This object is used heavily throughout ActiveMQ Artemis for performance reasons.
*/
@@ -47,7 +47,6 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
private transient String[] paths;
-
/**
* Returns a SimpleString constructed from the {@code string} parameter.
*
@@ -102,11 +101,9 @@ public static SimpleString of(final char c) {
*
* If {@code string} is {@code null}, the return value will be {@code null} too.
*
- * @deprecated
- * Use {@link #of(String)} instead.
- *
* @param string String used to instantiate a SimpleString.
* @return A new SimpleString
+ * @deprecated Use {@link #of(String)} instead.
*/
@Deprecated(forRemoval = true)
public static SimpleString toSimpleString(final String string) {
@@ -118,12 +115,10 @@ public static SimpleString toSimpleString(final String string) {
*
* If {@code string} is {@code null}, the return value will be {@code null} too.
*
- * @deprecated
- * Use {@link #of(String, StringSimpleStringPool)} instead.
- *
* @param string String used to instantiate a SimpleString.
* @param pool The pool from which to create the SimpleString
* @return A new SimpleString
+ * @deprecated Use {@link #of(String, StringSimpleStringPool)} instead.
*/
@Deprecated(forRemoval = true)
public static SimpleString toSimpleString(final String string, StringSimpleStringPool pool) {
@@ -133,10 +128,8 @@ public static SimpleString toSimpleString(final String string, StringSimpleStrin
/**
* creates a SimpleString from a conventional String
*
- * @deprecated
- * Use {@link #of(String)} instead.
- *
* @param string the string to transform
+ * @deprecated Use {@link #of(String)} instead.
*/
@Deprecated(forRemoval = true)
public SimpleString(final String string) {
@@ -164,10 +157,8 @@ public SimpleString(final String string) {
/**
* creates a SimpleString from a byte array
*
- * @deprecated
- * Use {@link #of(byte[])} instead.
- *
* @param data the byte array to use
+ * @deprecated Use {@link #of(byte[])} instead.
*/
@Deprecated(forRemoval = true)
public SimpleString(final byte[] data) {
@@ -177,10 +168,8 @@ public SimpleString(final byte[] data) {
/**
* creates a SimpleString from a character
*
- * @deprecated
- * Use {@link #of(char)} instead.
- *
* @param c the char to use
+ * @deprecated Use {@link #of(char)} instead.
*/
@Deprecated(forRemoval = true)
public SimpleString(final char c) {
@@ -309,19 +298,17 @@ public int compareTo(final SimpleString o) {
}
/**
- * returns the underlying byte array of this SimpleString
- *
- * @return the byte array
+ * {@return the underlying byte array of this {@code SimpleString}}
*/
public byte[] getData() {
return data;
}
/**
- * returns true if the SimpleString parameter starts with the same data as this one. false if not.
+ * {@return {@code true} if the {@code SimpleString} parameter starts with the same data as this one, otherwise
+ * {@code false}}
*
* @param other the SimpleString to look for
- * @return true if this SimpleString starts with the same data
*/
public boolean startsWith(final SimpleString other) {
byte[] otherdata = other.data;
@@ -373,9 +360,8 @@ public String toString() {
}
/**
- * note the result of the first use is cached, the separator is configured on
- * the postoffice so will be static for the duration of a server instance.
- * calling with different separator values could give invalid results
+ * note the result of the first use is cached, the separator is configured on the postoffice so will be static for
+ * the duration of a server instance. calling with different separator values could give invalid results
*
* @param separator value from wildcardConfiguration
* @return String[] reference to the split paths or the cached value if previously called
@@ -417,8 +403,8 @@ public boolean equals(final Object other) {
* Returns {@code true} if the {@link SimpleString} encoded content into {@code bytes} is equals to {@code s},
* {@code false} otherwise.
*
- * It assumes that the {@code bytes} content is read using {@link SimpleString#readSimpleString(ByteBuf, int)} ie starting right after the
- * length field.
+ * It assumes that the {@code bytes} content is read using {@link SimpleString#readSimpleString(ByteBuf, int)} ie
+ * starting right after the length field.
*/
public boolean equals(final ByteBuf byteBuf, final int offset, final int length) {
return ByteUtil.equals(data, byteBuf, offset, length);
@@ -438,8 +424,8 @@ public int hashCode() {
}
/**
- * Splits this SimpleString into an array of SimpleString using the char param as the delimiter.
- * i.e. "a.b" would return "a" and "b" if . was the delimiter
+ * Splits this SimpleString into an array of SimpleString using the char param as the delimiter. i.e. "a.b" would
+ * return "a" and "b" if . was the delimiter
*
* @param delim The delimiter to split this SimpleString on.
* @return An array of SimpleStrings
@@ -547,7 +533,7 @@ private static List
* The component created will have {@code initialDelay} defaulted to {@code checkPeriod}.
*
- * @param scheduledExecutorService the {@link ScheduledExecutorService} that periodically trigger {@link #run()} on the configured {@code executor}
+ * @param scheduledExecutorService the {@link ScheduledExecutorService} that periodically trigger {@link #run()} on
+ * the configured {@code executor}
* @param executor the {@link Executor} that execute {@link #run()} when triggered
* @param checkPeriod the delay between the termination of one execution and the start of the next
* @param timeUnit the time unit of the {@code initialDelay} and {@code checkPeriod} parameters
- * @param onDemand if {@code true} the task won't be scheduled on {@link #start()}, {@code false} otherwise
+ * @param onDemand if {@code true} the task won't be scheduled on {@link #start()}, {@code false}
+ * otherwise
*/
public ActiveMQScheduledComponent(ScheduledExecutorService scheduledExecutorService,
Executor executor,
@@ -115,11 +125,12 @@ public ActiveMQScheduledComponent(ScheduledExecutorService scheduledExecutorServ
}
/**
- * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured {@code executor}.
- *
+ * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured
+ * {@code executor}.
*
- * This is useful for cases where we want our own scheduler executor: on {@link #start()} it will create a fresh new single-threaded {@link ScheduledExecutorService}
- * using {@link #getThreadFactory()} and {@link #getThisClassLoader()}, while on {@link #stop()} it will garbage it.
+ * This is useful for cases where we want our own scheduler executor: on {@link #start()} it will create a fresh new
+ * single-threaded {@link ScheduledExecutorService} using {@link #getThreadFactory()} and
+ * {@link #getThisClassLoader()}, while on {@link #stop()} it will garbage it.
*
* @param initialDelay the time to delay first execution
* @param checkPeriod the delay between the termination of one execution and the start of the next
@@ -131,11 +142,12 @@ public ActiveMQScheduledComponent(long initialDelay, long checkPeriod, TimeUnit
}
/**
- * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured {@code executor}.
+ * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured
+ * {@code executor}.
*
*
- * This is useful for cases where we want our own scheduler executor.
- * The component created will have {@code initialDelay} defaulted to {@code checkPeriod}.
+ * This is useful for cases where we want our own scheduler executor. The component created will have
+ * {@code initialDelay} defaulted to {@code checkPeriod}.
*
* @param checkPeriod the delay between the termination of one execution and the start of the next
* @param timeUnit the time unit of the {@code initialDelay} and {@code checkPeriod} parameters
@@ -186,7 +198,7 @@ private ClassLoader getThisClassLoader() {
*
- * When a delay request succeed it schedule a new execution to happen in {@link #getPeriod()}. This method can be used to obtain a list of the unwrapped types, such as
- *
+ * This method can be used to obtain a list of the unwrapped types, such as
+ *
* The decimal point is defined as dot '.'.
*
* @see RFC-4627 JSON Specification
@@ -45,9 +45,6 @@ public interface JsonNumber extends JsonValue {
BigDecimal bigDecimalValue();
- /**
- * @since 1.1
- */
default Number numberValue() {
throw new UnsupportedOperationException();
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObject.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObject.java
index b044edd20bf..4c150bee779 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObject.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObject.java
@@ -30,76 +30,85 @@
* }
* }
*
- *
- * A JsonObject is always also a Map which uses the attribute names as key mapping
- * to their JsonValues.
+ *
+ * A JsonObject is always also a Map which uses the attribute names as key mapping to their JsonValues.
*/
public interface JsonObject extends JsonValue, Map
+ * Calling any of those methods with either the {@code name} or {@code value} param as {@code null} will result in a
+ * {@code NullPointerException}
*/
public interface JsonObjectBuilder {
+
/**
- * Add the given JsonValue value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given JsonValue value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value the JsonValue to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, JsonValue value);
/**
- * Add the given String value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given String value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value the String value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, String value);
+
JsonObjectBuilder add(String name, String value, JsonValue defaultValue);
/**
- * Add the given BigInteger value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given BigInteger value to the JsonObject to be created. If a value with that name already exists it will
+ * be replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value the BigInteger value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, BigInteger value);
+
JsonObjectBuilder add(String name, BigInteger value, JsonValue defaultValue);
/**
- * Add the given BigDecimal value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given BigDecimal value to the JsonObject to be created. If a value with that name already exists it will
+ * be replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value the BigDecimal value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, BigDecimal value);
+
JsonObjectBuilder add(String name, BigDecimal value, JsonValue defaultValue);
/**
- * Add the given int value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given int value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, int value);
/**
- * Add the given long value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given long value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, long value);
/**
- * Add the given double value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given double value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, double value);
/**
- * Add the given boolean value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given boolean value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, boolean value);
/**
- * Add a {@link JsonValue#NULL} value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the null value.
+ * Add a {@link JsonValue#NULL} value to the JsonObject to be created. If a value with that name already exists it
+ * will be replaced by the null value.
+ *
* @param name the JSON attribute name
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder addNull(String name);
/**
- * Use the given {@link JsonObjectBuilder} to create a {@link JsonObject} which will be
- * added to the JsonObject to be created by this builder.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Use the given {@link JsonObjectBuilder} to create a {@link JsonObject} which will be added to the JsonObject to be
+ * created by this builder. If a value with that name already exists it will be replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param builder for creating the JsonObject to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, JsonObjectBuilder builder);
/**
- * Use the given {@link JsonArrayBuilder} to create a {@link JsonArray} which will be
- * added to the JsonObject to be created by this builder.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Use the given {@link JsonArrayBuilder} to create a {@link JsonArray} which will be added to the JsonObject to be
+ * created by this builder. If a value with that name already exists it will be replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param builder for creating the JsonArray to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, JsonArrayBuilder builder);
/**
- * @return a {@link JsonObject} based on the added values.
+ * {@return a {@link JsonObject} based on the added values}
*/
JsonObject build();
/**
* Add all of the attributes of the given {@link JsonObjectBuilder} to the current one
- *
- * @since 1.1
*/
default JsonObjectBuilder addAll(JsonObjectBuilder builder) {
throw new UnsupportedOperationException();
@@ -146,8 +156,6 @@ default JsonObjectBuilder addAll(JsonObjectBuilder builder) {
/**
* Remove the attribute with the given name from the builder.
- *
- * @since 1.1
*/
default JsonObjectBuilder remove(String name) {
throw new UnsupportedOperationException();
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonValue.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonValue.java
index a0e54488e34..afa6feba4ef 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonValue.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonValue.java
@@ -35,7 +35,6 @@ public interface JsonValue {
*/
JsonArray EMPTY_JSON_ARRAY = new JsonArrayImpl(javax.json.JsonValue.EMPTY_JSON_ARRAY);
-
/**
* A constant JsonValue for null values
*/
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
index 1654d482d5a..a6daeb4da14 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
@@ -65,7 +65,8 @@ static boolean isMessageLoggingEnabled() {
}
/**
- * @return a String representing the "caller" in the format "user(role)@remoteAddress" using ThreadLocal values (if set)
+ * {@return a String representing the "caller" in the format "user(role)@remoteAddress" using ThreadLocal values (if
+ * set)}
*/
static String getCaller() {
Subject subject = Subject.getSubject(AccessController.getContext());
@@ -76,9 +77,10 @@ static String getCaller() {
}
/**
- * @param subject the Subject to be used instead of the corresponding ThreadLocal Subject
- * @param remoteAddress the remote address to use; if null use the corresponding ThreadLocal remote address (if set)
- * @return a String representing the "caller" in the format "user(role)@remoteAddress"
+ * {@return a {@code String} representing the "caller" in the format "user(role)@remoteAddress"}
+ *
+ * @param subject the Subject to be used instead of the corresponding ThreadLocal Subject
+ * @param remoteAddress the remote address to use; if null use the corresponding ThreadLocal remote address (if set)
*/
static String getCaller(Subject subject, String remoteAddress) {
String user = "anonymous";
@@ -2131,11 +2133,7 @@ static void getPreparedTransactionMessageCount(Object source) {
@LogMessage(id = 601514, value = "User {} is getting preparedTransactionMessageCount property on target resource: {}", level = LogMessage.Level.INFO)
void getPreparedTransactionMessageCount(String user, Object source);
- /*
- * This logger is for message production and consumption and is on the hot path so enabled independently
- *
- * */
- //hot path log using a different logger
+ // This logger is for message production and consumption and is on the hot path so enabled independently
static void coreSendMessage(Subject user, String remoteAddress, String messageToString, Object context, String tx) {
MESSAGE_LOGGER.coreSendMessage(getCaller(user, remoteAddress), messageToString, context, tx);
}
@@ -2159,10 +2157,7 @@ static void coreAcknowledgeMessage(Subject user, String remoteAddress, String qu
@LogMessage(id = 601502, value = "User {} acknowledged message from {}: {}, transaction: {}", level = LogMessage.Level.INFO)
void coreAcknowledgeMessage(String user, String queue, String message, String tx);
- /*
- * This logger is focused on user interaction from the console or thru resource specific functions in the management layer/JMX
- * */
-
+ // This logger is focused on user interaction from the console or thru resource specific functions in the management layer/JMX
static void createAddressSuccess(String name, String routingTypes) {
RESOURCE_LOGGER.createAddressSuccess(getCaller(), name, routingTypes);
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractByteBufPool.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractByteBufPool.java
index 162f8067149..5be6902abaa 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractByteBufPool.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractByteBufPool.java
@@ -23,9 +23,9 @@
/**
* Thread-safe {@code
- * Differently from {@link String#intern()} it contains a fixed amount of entries and
- * when used by concurrent threads it doesn't ensure the uniqueness of the entries ie
- * the same entry could be allocated multiple times by concurrent calls.
+ * Differently from {@link String#intern()} it contains a fixed amount of entries and when used by concurrent threads it
+ * doesn't ensure the uniqueness of the entries ie the same entry could be allocated multiple times by concurrent
+ * calls.
*/
public abstract class AbstractByteBufPool
- * Differently from {@link String#intern()} it contains a fixed amount of entries and
- * when used by concurrent threads it doesn't ensure the uniqueness of the entries ie
- * the same entry could be allocated multiple times by concurrent calls.
+ * Differently from {@link String#intern()} it contains a fixed amount of entries and when used by concurrent threads it
+ * doesn't ensure the uniqueness of the entries ie the same entry could be allocated multiple times by concurrent
+ * calls.
*/
public abstract class AbstractPool {
@@ -51,7 +51,7 @@ public AbstractPool(final int capacity) {
protected abstract O create(I value);
/**
- * Returns {@code true} if the {@code entry} content is equal to {@code value};
+ * {@return {@code true} if the {@code entry} content is equal to {@code value};}
*/
protected abstract boolean isEqual(O entry, I value);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java
index b9c3c28342a..6edeaf5348f 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java
@@ -42,8 +42,8 @@ public final class ActiveMQThreadFactory implements ThreadFactory {
private final String prefix;
/**
- * Construct a new instance. The access control context of the calling thread will be the one used to create
- * new threads if a security manager is installed.
+ * Construct a new instance. The access control context of the calling thread will be the one used to create new
+ * threads if a security manager is installed.
*
* @param groupName the name of the thread group to assign threads to by default
* @param daemon whether the created threads should be daemon threads
@@ -54,8 +54,8 @@ public ActiveMQThreadFactory(final String groupName, final boolean daemon, final
}
/**
- * Construct a new instance. The access control context of the calling thread will be the one used to create
- * new threads if a security manager is installed.
+ * Construct a new instance. The access control context of the calling thread will be the one used to create new
+ * threads if a security manager is installed.
*
* @param groupName the name of the thread group to assign threads to by default
* @param daemon whether the created threads should be daemon threads
@@ -99,7 +99,9 @@ public Thread run() {
}
}
- /** It will wait all threads to finish */
+ /**
+ * It will wait all threads to finish
+ */
public boolean join(int timeout, TimeUnit timeUnit) {
try {
return active.await(timeout, timeUnit);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ArtemisCloseable.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ArtemisCloseable.java
index c6d3830ab28..f21921ce4c7 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ArtemisCloseable.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ArtemisCloseable.java
@@ -18,7 +18,9 @@
public interface ArtemisCloseable extends AutoCloseable {
- /** The main purpose of this interface is to hide the exception since it is not needed. */
+ /**
+ * The main purpose of this interface is to hide the exception since it is not needed.
+ */
@Override
void close();
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AutomaticLatch.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AutomaticLatch.java
index 36e5f8522c7..66d95f7b85c 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AutomaticLatch.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AutomaticLatch.java
@@ -16,11 +16,11 @@
*/
package org.apache.activemq.artemis.utils;
-/** An automatic latch has the same semantic as the ReusableLatch
- * However this class has a replaceable callback that could be called
- * when the number of elements reach zero.
- * With that you can either block to wait completion, or to send a callback to be
- * used when it reaches 0. */
+/**
+ * An automatic latch has the same semantic as the ReusableLatch However this class has a replaceable callback that
+ * could be called when the number of elements reach zero. With that you can either block to wait completion, or to send
+ * a callback to be used when it reaches 0.
+ */
public class AutomaticLatch extends AbstractLatch {
volatile Runnable afterCompletion;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java
index 0472598e739..53aace6c86a 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java
@@ -120,7 +120,9 @@ public static String bytesToHex(byte[] bytes) {
return new String(hexChars);
}
- /** Simplify reading of a byte array in a programmers understable way */
+ /**
+ * Simplify reading of a byte array in a programmers understable way
+ */
public static String debugByteArray(byte[] byteArray) {
StringWriter builder = new StringWriter();
PrintWriter writer = new PrintWriter(builder);
@@ -390,7 +392,8 @@ private static boolean equalsUnsafe(final byte[] left,
}
/**
- * This ensure a more exact resizing then {@link ByteBuf#ensureWritable(int)}, if needed.
* It won't try to trim a large enough buffer.
*/
public static void ensureExactWritable(ByteBuf buffer, int minWritableBytes) {
@@ -399,13 +402,12 @@ public static void ensureExactWritable(ByteBuf buffer, int minWritableBytes) {
}
}
-
/**
- * Returns {@code true} if the {@link SimpleString} encoded content into {@code bytes} is equals to {@code s},
+ * {@return {@code true} if the {@link SimpleString} encoded content into {@code bytes} is equals to {@code s}
* {@code false} otherwise.
*
- * It assumes that the {@code bytes} content is read using {@link SimpleString#readSimpleString(ByteBuf, int)} ie starting right after the
- * length field.
+ * It assumes that the {@code bytes} content is read using {@link SimpleString#readSimpleString(ByteBuf, int)} ie
+ * starting right after the length field.}
*/
public static boolean equals(final byte[] bytes, final ByteBuf byteBuf, final int offset, final int length) {
if (bytes.length != length)
@@ -479,7 +481,8 @@ public static void zeros(final ByteBuffer buffer) {
/**
* It zeroes {@code bytes} of the given {@code buffer}, starting (inclusive) from {@code offset}.
*
- * @throws IndexOutOfBoundsException if {@code offset + bytes > }{@link ByteBuffer#capacity()} or {@code offset >= }{@link ByteBuffer#capacity()}
+ * @throws IndexOutOfBoundsException if {@code offset + bytes > }{@link ByteBuffer#capacity()} or
+ * {@code offset >= }{@link ByteBuffer#capacity()}
* @throws IllegalArgumentException if {@code offset} or {@code capacity} are less then 0
* @throws ReadOnlyBufferException if {@code buffer} is read-only
*/
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ClassloadingUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ClassloadingUtil.java
index 2a4019947f4..14769a6204e 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ClassloadingUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ClassloadingUtil.java
@@ -25,12 +25,11 @@
import java.lang.invoke.MethodHandles;
/**
- * This class will be used to perform generic class-loader operations,
- * such as load a class first using TCCL, and then the classLoader used by ActiveMQ Artemis (ClassloadingUtil.getClass().getClassLoader()).
+ * This class will be used to perform generic class-loader operations, such as load a class first using TCCL, and then
+ * the classLoader used by ActiveMQ Artemis (ClassloadingUtil.getClass().getClassLoader()).
*
* Is't required to use a Security Block on any calls to this class.
*/
-
public final class ClassloadingUtil {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentUtil.java
index db2b86fc0dc..bddc29f5004 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentUtil.java
@@ -24,8 +24,9 @@ public class ConcurrentUtil {
/**
* Await for condition, handling
* spurious wakeups.
+ *
* @param condition condition to await for
- * @param timeout the maximum time to wait in milliseconds
+ * @param timeout the maximum time to wait in milliseconds
* @return value from {@link Condition#await(long, TimeUnit)}
*/
public static boolean await(final Condition condition, final long timeout) throws InterruptedException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
index bb25d3347a7..9a1d32e0659 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
@@ -39,15 +39,12 @@
/**
* A DefaultSensitiveDataCodec
- *
- * The default implementation of SensitiveDataCodec.
- * This class is used when the user indicates in the config
- * file to use a masked password but doesn't give a
- * codec implementation.
- *
- * It supports one-way hash (digest) and two-way (encrypt-decrpt) algorithms
- * The two-way uses "Blowfish" algorithm
- * The one-way uses "PBKDF2" hash algorithm
+ *
+ * The default implementation of SensitiveDataCodec. This class is used when the user indicates in the config file to
+ * use a masked password but doesn't give a codec implementation.
+ *
+ * It supports one-way hash (digest) and two-way (encrypt-decrpt) algorithms The two-way uses "Blowfish" algorithm The
+ * one-way uses "PBKDF2" hash algorithm
*/
public class DefaultSensitiveStringCodec implements SensitiveDataCodec
+ * The default ObjectFactory is typically changed out when running in a specialized container environment where
+ * service discovery needs to be done via the container system. For example, in an OSGi scenario.
*/
public interface ObjectFactory {
/**
+ * Creates an {@code Object} based on the input
+ *
* @param path the full service path
- * @return Object
+ * @return {@code Object}
* @throws IllegalAccessException illegal access
* @throws InstantiationException on instantiation error
* @throws IOException On IO Error
@@ -139,8 +140,7 @@ public FactoryFinder(String path) {
/**
* Creates a new instance of the given key
*
- * @param key is the key to add to the path to find a text file containing
- * the factory name
+ * @param key is the key to add to the path to find a text file containing the factory name
* @return a newly created instance
* @throws IllegalAccessException On illegal access
* @throws InstantiationException On can not instantiate exception
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FileUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FileUtil.java
index 68333f24fd8..d01bb705d21 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FileUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FileUtil.java
@@ -108,15 +108,13 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
});
}
-
/**
* Search and replace strings on a file
*
- * @param file file to be replaced
- * @param find string expected to match
+ * @param file file to be replaced
+ * @param find string expected to match
* @param replace string to be replaced
* @return true if the replacement was successful
- * @throws Exception
*/
public static boolean findReplace(File file, String find, String replace) throws Exception {
if (!file.exists()) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/HashProcessor.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/HashProcessor.java
index 0b441322968..5aadf12949f 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/HashProcessor.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/HashProcessor.java
@@ -24,18 +24,18 @@ public interface HashProcessor {
/**
* produce hash text from plain text
+ *
* @param plainText Plain text input
* @return the Hash value of the input plain text
- * @throws Exception
*/
String hash(String plainText) throws Exception;
/**
* compare the plain char array against the hash value
+ *
* @param inputValue value of the plain text
* @param storedHash the existing hash value
- * @return true if the char array matches the hash value,
- * otherwise false.
+ * @return true if the char array matches the hash value, otherwise false.
*/
boolean compare(char[] inputValue, String storedHash);
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/IPV6Util.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/IPV6Util.java
index 22535c693c5..8dffd1466ae 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/IPV6Util.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/IPV6Util.java
@@ -26,7 +26,8 @@ public static String encloseHost(final String host) {
if (host != null && host.contains(":")) {
String hostToCheck = host;
- /* strip off zone index since com.google.common.net.InetAddresses.isInetAddress() doesn't support it
+ /*
+ * strip off zone index since com.google.common.net.InetAddresses.isInetAddress() doesn't support it
* see https://en.wikipedia.org/wiki/IPv6_address#Link-local_addresses_and_zone_indices for more info
*/
if (host.contains("%")) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/JsonLoader.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/JsonLoader.java
index ab0490a2147..6ff1f04129e 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/JsonLoader.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/JsonLoader.java
@@ -30,8 +30,8 @@
import java.io.Reader;
/**
- * This is to make sure we use the proper classLoader to load JSon libraries.
- * This is equivalent to using {@link javax.json.Json}
+ * This is to make sure we use the proper classLoader to load JSon libraries. This is equivalent to using
+ * {@link javax.json.Json}
*/
public class JsonLoader {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java
index ed668f97d29..42f752875cf 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java
@@ -38,11 +38,11 @@ private PasswordMaskingUtil() {
/**
* This method deals with password masking and returns the password in its plain text form.
- * @param password : the original value of password string; interpreted as masked if wrapped in ENC()
- * or as plain text otherwise.
- * @param codecClass : the codec used to decode the password. Only when the password is interpreted
- * as masked will this codec be used. Ignored otherwise.
- * @return
+ *
+ * @param password : the original value of password string; interpreted as masked if wrapped in ENC() or as plain
+ * text otherwise.
+ * @param codecClass : the codec used to decode the password. Only when the password is interpreted as masked will
+ * this codec be used. Ignored otherwise.
*/
public static String resolveMask(String password, String codecClass) throws Exception {
return resolveMask(null, password, codecClass);
@@ -50,14 +50,13 @@ public static String resolveMask(String password, String codecClass) throws Exce
/**
* This method deals with password masking and returns the password in its plain text form.
- * @param maskPassword : explicit mask flag. If it's true, the password is interpreted as
- * masked. If it is false, the password is interpreted as plain text.
- * if it is null, the password will be interpreted as masked if the
- * password is wrapped in ENC(), or as plain text otherwise.
- * @param password : the original value of password string
- * @param codecClass : the codec used to decode the password. Only when the password is interpreted
- * as masked will this codec be used. Ignored otherwise.
- * @return
+ *
+ * @param maskPassword : explicit mask flag. If it's true, the password is interpreted as masked. If it is false, the
+ * password is interpreted as plain text. if it is null, the password will be interpreted as
+ * masked if the password is wrapped in ENC(), or as plain text otherwise.
+ * @param password : the original value of password string
+ * @param codecClass : the codec used to decode the password. Only when the password is interpreted as masked will
+ * this codec be used. Ignored otherwise.
*/
public static String resolveMask(Boolean maskPassword, String password, String codecClass) throws Exception {
String plainText = password;
@@ -155,14 +154,12 @@ public static HashProcessor getHashProcessor() {
return processor;
}
- /*
+ /**
* Loading the codec class.
*
* @param codecDesc This parameter must have the following format:
- *
- *
+ * In order to be fast is up to the caller to check arguments correctness. Original algorithm is on
+ * https://en.wikipedia.org/wiki/Data_structure_alignment.
*/
public static int align(final int value, final int pow2alignment) {
return (value + (pow2alignment - 1)) & ~(pow2alignment - 1);
@@ -37,7 +39,7 @@ public static int align(final int value, final int pow2alignment) {
* Is a value a positive power of two.
*
* @param value to be checked.
- * @return true if the number is a positive power of two otherwise false.
+ * @return true if the number is a positive power of two otherwise false
*/
public static boolean isPowOf2(final int value) {
return Integer.bitCount(value) == 1;
@@ -48,7 +50,7 @@ public static boolean isPowOf2(final int value) {
*
* @param value to be tested.
* @param pow2alignment boundary the address is tested against.
- * @return true if the address is on the aligned boundary otherwise false.
+ * @return true if the address is on the aligned boundary otherwise false
* @throws IllegalArgumentException if the alignment is not a power of 2
*/
public static boolean isAligned(final long value, final int pow2alignment) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Preconditions.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Preconditions.java
index 02d4fc55a15..5252133fe52 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Preconditions.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Preconditions.java
@@ -31,12 +31,13 @@ public static This class will use the framework provided to by AbstractQueuedSynchronizer. AbstractQueuedSynchronizer is the framework for any sort of concurrent synchronization, such as Semaphores, events, etc, based on AtomicIntegers. This class works just like CountDownLatch, with the difference you can also increase the counter It could be used for sync points when one process is feeding the latch while another will wait when everything is done. (e.g. waiting IO completions to finish) On ActiveMQ Artemis we have the requirement of increment and decrement a counter until the user fires a ready event (commit). At that point we just act as a regular countDown. Note: This latch is reusable. Once it reaches zero, you can call up again, and reuse it on further waits. For example: prepareTransaction will wait for the current completions, and further adds will be called on the latch. Later on when commit is called you can reuse the same latch.
+ * AbstractQueuedSynchronizer is the framework for any sort of concurrent synchronization, such as Semaphores, events,
+ * etc, based on AtomicIntegers.
+ *
+ * This class works just like CountDownLatch, with the difference you can also increase the counter
+ *
+ * It could be used for sync points when one process is feeding the latch while another will wait when everything is
+ * done. (e.g. waiting IO completions to finish)
+ *
+ * On ActiveMQ Artemis we have the requirement of increment and decrement a counter until the user fires a ready event
+ * (commit). At that point we just act as a regular countDown.
+ *
+ * Note: This latch is reusable. Once it reaches zero, you can call up again, and reuse it on further waits.
+ *
+ * For example: prepareTransaction will wait for the current completions, and further adds will be called on the latch.
+ * Later on when commit is called you can reuse the same latch.
*/
public class ReusableLatch extends AbstractLatch {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SelectorTranslator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SelectorTranslator.java
index 65a7ab2c467..e8c6947807f 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SelectorTranslator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SelectorTranslator.java
@@ -21,15 +21,15 @@
/**
* This class converts a JMS selector expression into an ActiveMQ Artemis core filter expression.
- *
+ *
* JMS selector and ActiveMQ Artemis filters use the same syntax but have different identifiers.
- *
- * We basically just need to replace the JMS header and property Identifier names
- * with the corresponding ActiveMQ Artemis field and header Identifier names.
- *
- * We must be careful not to substitute any literals, or identifiers whose name contains the name
- * of one we want to substitute.
- *
+ *
+ * We basically just need to replace the JMS header and property Identifier names with the corresponding ActiveMQ
+ * Artemis field and header Identifier names.
+ *
+ * We must be careful not to substitute any literals, or identifiers whose name contains the name of one we want to
+ * substitute.
+ *
* This makes it less trivial than a simple search and replace.
*/
public class SelectorTranslator {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SensitiveDataCodec.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SensitiveDataCodec.java
index 015af65c0f4..46d6772051d 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SensitiveDataCodec.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SensitiveDataCodec.java
@@ -20,9 +20,9 @@
/**
* A SensitiveDataCodec
- *
+ *
* This interface is used for implementing a value decoder.
- *
+ *
* It takes in a mask value and decode it.
*/
public interface SensitiveDataCodec Returns an upper case hexadecimal Returns an upper case hexadecimal {@code String} for the given
* character. The returned supplier is thread-safe. The delegate's {@code get()}
- * method will be invoked at most once. The supplier's serialized form does
- * not contain the cached value, which will be recalculated when {@code get()}
- * is called on the reserialized instance.
- *
- * If {@code delegate} is an instance created by an earlier call to {@code
- * memoize}, it is returned directly.
+ *
+ * The returned supplier is thread-safe. The delegate's {@code get()} method will be invoked at most once. The
+ * supplier's serialized form does not contain the cached value, which will be recalculated when {@code get()} is
+ * called on the reserialized instance.
+ *
+ * If {@code delegate} is an instance created by an earlier call to {@code memoize}, it is returned directly.
*/
public static
* This class will write UTFs directly to the ByteOutput (through the MessageBuffer interface)
*/
public final class UTF8Util {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUID.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUID.java
index 716267a9469..187785972f7 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUID.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUID.java
@@ -17,29 +17,23 @@
package org.apache.activemq.artemis.utils;
/**
- * UUID represents Universally Unique Identifiers (aka Global UID in Windows
- * world). UUIDs are usually generated via UUIDGenerator (or in case of 'Null
- * UUID', 16 zero bytes, via static method getNullUUID()), or received from
- * external systems.
+ * UUID represents Universally Unique Identifiers (aka Global UID in Windows world). UUIDs are usually generated via
+ * UUIDGenerator (or in case of 'Null UUID', 16 zero bytes, via static method getNullUUID()), or received from external
+ * systems.
*
- * By default class caches the string presentations of UUIDs so that description
- * is only created the first time it's needed. For memory stingy applications
- * this caching can be turned off (note though that if uuid.toString() is never
- * called, desc is never calculated so only loss is the space allocated for the
- * desc pointer... which can of course be commented out to save memory).
+ * By default class caches the string presentations of UUIDs so that description is only created the first time it's
+ * needed. For memory stingy applications this caching can be turned off (note though that if uuid.toString() is never
+ * called, desc is never calculated so only loss is the space allocated for the desc pointer... which can of course be
+ * commented out to save memory).
*
- * Similarly, hash code is calculated when it's needed for the first time, and
- * from thereon that value is just returned. This means that using UUIDs as keys
- * should be reasonably efficient.
+ * Similarly, hash code is calculated when it's needed for the first time, and from thereon that value is just returned.
+ * This means that using UUIDs as keys should be reasonably efficient.
*
- * UUIDs can be compared for equality, serialized, cloned and even sorted.
- * Equality is a simple bit-wise comparison. Ordering (for sorting) is done by
- * first ordering based on type (in the order of numeric values of types),
- * secondarily by time stamp (only for time-based time stamps), and finally by
- * straight numeric byte-by-byte comparison (from most to least significant
- * bytes).
+ * UUIDs can be compared for equality, serialized, cloned and even sorted. Equality is a simple bit-wise comparison.
+ * Ordering (for sorting) is done by first ordering based on type (in the order of numeric values of types), secondarily
+ * by time stamp (only for time-based time stamps), and finally by straight numeric byte-by-byte comparison (from most
+ * to least significant bytes).
*/
-
public final class UUID {
private static final String kHexChars = "0123456789abcdefABCDEF";
@@ -67,9 +61,7 @@ public final class UUID {
public static final byte TYPE_RANDOM_BASED = 4;
- /*
- * 'Standard' namespaces defined (suggested) by UUID specs:
- */
+ // 'Standard' namespaces defined (suggested) by UUID specs:
public static final String NAMESPACE_DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
public static final String NAMESPACE_URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
@@ -113,7 +105,9 @@ private UUID(final byte[] data) {
mId = data;
}
- /** This is for conversions between two types of UUID */
+ /**
+ * This is for conversions between two types of UUID
+ */
public UUID(java.util.UUID uuid) {
this(ByteUtil.doubleLongToBytes(uuid.getMostSignificantBits(), uuid.getLeastSignificantBits()));
}
@@ -123,16 +117,13 @@ public byte[] asBytes() {
}
/**
- * Could use just the default hash code, but we can probably create a better
- * identity hash (ie. same contents generate same hash) manually, without
- * sacrificing speed too much. Although multiplications with modulos would
+ * Could use just the default hash code, but we can probably create a better identity hash (ie. same contents
+ * generate same hash) manually, without sacrificing speed too much. Although multiplications with modulos would
* generate better hashing, let's use just shifts, and do 2 bytes at a time.
- *
+ * Of course, assuming UUIDs are randomized enough, even simpler approach might be good enough?
+ *
+ * Is this a good hash? ... one of these days I better read more about basic hashing techniques I swear!
*/
private static final int[] kShifts = {3, 7, 17, 21, 29, 4, 9};
@@ -211,8 +202,7 @@ public String toString() {
* Creates a 128bit number from the String representation of {@link UUID}.
*
* @param uuid The UUID
- * @return byte array that can be used to recreate a UUID instance from the given String
- * representation
+ * @return byte array that can be used to recreate a UUID instance from the given String representation
*/
public static byte[] stringToBytes(String uuid) {
byte[] data = new byte[16];
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java
index 69970771465..b6c6f29f72f 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java
@@ -71,19 +71,12 @@ public static UUIDGenerator getInstance() {
return UUIDGenerator.sSingleton;
}
- /*
- * ///////////////////////////////////////////////////// // Configuration
- * /////////////////////////////////////////////////////
- */
-
/**
- * Method for getting the shared random number generator used for generating
- * the UUIDs. This way the initialization cost is only taken once; access
- * need not be synchronized (or in cases where it has to, SecureRandom takes
- * care of it); it might even be good for getting really 'random' stuff to
- * get shared access..
+ * Method for getting the shared random number generator used for generating the UUIDs. This way the initialization
+ * cost is only taken once; access need not be synchronized (or in cases where it has to, SecureRandom takes care of
+ * it); it might even be good for getting really 'random' stuff to get shared access..
*
- * @return A Random number generator.
+ * @return A Random number generator
*/
public Random getRandomNumberGenerator() {
/*
@@ -121,7 +114,8 @@ public byte[] generateDummyAddress() {
Random rnd = getRandomNumberGenerator();
byte[] dummy = new byte[6];
rnd.nextBytes(dummy);
- /* Need to set the broadcast bit to indicate it's not a real
+ /*
+ * Need to set the broadcast bit to indicate it's not a real
* address.
*/
dummy[0] |= (byte) 0x01;
@@ -133,10 +127,10 @@ public byte[] generateDummyAddress() {
}
/**
- * If running java 6 or above, returns {@link NetworkInterface#getHardwareAddress()}, else return {@code null}.
- * The first hardware address is returned when iterating all the NetworkInterfaces
+ * If running java 6 or above, returns {@link NetworkInterface#getHardwareAddress()}, else return {@code null}. The
+ * first hardware address is returned when iterating all the NetworkInterfaces
*
- * @return A byte array containing the hardware address.
+ * @return A byte array containing the hardware address
*/
public static byte[] getHardwareAddress() {
try {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDTimer.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDTimer.java
index add7c126020..517997a7f6f 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDTimer.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDTimer.java
@@ -19,63 +19,50 @@
import java.util.Random;
/**
- * UUIDTimer produces the time stamps required for time-based UUIDs. It works as
- * outlined in the UUID specification, with following implementation:
+ * UUIDTimer produces the time stamps required for time-based UUIDs. It works as outlined in the UUID specification,
+ * with following implementation:
*
* Some additional assumptions about calculating the timestamp:
*
- * Note about synchronization: this class is assumed to always be called from a
- * synchronized context (caller locks on either this object, or a similar timer
- * lock), and so has no method synchronization.
+ * Note about synchronization: this class is assumed to always be called from a synchronized context (caller locks on
+ * either this object, or a similar timer lock), and so has no method synchronization.
*/
public class UUIDTimer {
+
/**
- * Since System.longTimeMillis() returns time from january 1st 1970, and
- * UUIDs need time from the beginning of gregorian calendar (15-oct-1582),
- * need to apply the offset:
+ * Since System.longTimeMillis() returns time from january 1st 1970, and UUIDs need time from the beginning of
+ * gregorian calendar (15-oct-1582), need to apply the offset:
*/
private static final long kClockOffset = 0x01b21dd213814000L;
/**
- * Also, instead of getting time in units of 100nsecs, we get something with
- * max resolution of 1 msec... and need the multiplier as well
+ * Also, instead of getting time in units of 100nsecs, we get something with max resolution of 1 msec... and need the
+ * multiplier as well
*/
private static final long kClockMultiplier = 10000;
@@ -94,27 +81,23 @@ public class UUIDTimer {
// // // Clock state:
/**
- * Additional state information used to protect against anomalous cases
- * (clock time going backwards, node id getting mixed up). Third byte is
- * actually used for seeding counter on counter overflow.
+ * Additional state information used to protect against anomalous cases (clock time going backwards, node id getting
+ * mixed up). Third byte is actually used for seeding counter on counter overflow.
*/
private final byte[] mClockSequence = new byte[3];
/**
- * Last physical timestamp value
* More specifically, any call B to the {@link #execute(Runnable)} method that happens-after another call A to the
* same method, will result in B's task running after A's.
*/
@@ -44,8 +44,10 @@ public boolean isFair() {
return fair;
}
+ /**
+ * If this OrderedExecutor is fair, it will yield for another executors after each task ran
+ */
@Override
- /** If this OrderedExecutor is fair, it will yield for another executors after each task ran */
public OrderedExecutor setFair(boolean fair) {
this.fair = fair;
return this;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorFactory.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorFactory.java
index 6ce3cc9ccb0..828e27d116e 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorFactory.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorFactory.java
@@ -21,6 +21,7 @@
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.utils.ExecutorFactory;
+
/**
* A factory for producing executors that run all tasks in order, which delegate to a single common executor instance.
*/
@@ -63,7 +64,9 @@ public ArtemisExecutor getExecutor() {
return new OrderedExecutor(parent).setFair(fair);
}
- /** I couldn't figure out how to make a new method to return a generic Actor with a given type */
+ /**
+ * I couldn't figure out how to make a new method to return a generic Actor with a given type
+ */
public Executor getParent() {
return parent;
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ProcessorBase.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ProcessorBase.java
index 323da6a5d7e..ea018e29e1b 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ProcessorBase.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ProcessorBase.java
@@ -38,8 +38,8 @@ public abstract class ProcessorBase
- * This method is safe to be called by different threads and its accuracy is subject to concurrent modifications.
- * As a historical context the first try to make a few objects more dynamic (e.g. AddressSettings) was
- * around BeanUtils however there was some implicit logic on when certain settings were Null or default values.
- * for that reason I decided for a meta-data approach where extra semantic could be applied for each individual attributes
- * rather than a generic BeanUtils parser.
+ * As a historical context the first try to make a few objects more dynamic (e.g. AddressSettings) was around BeanUtils
+ * however there was some implicit logic on when certain settings were Null or default values. for that reason I decided
+ * for a meta-data approach where extra semantic could be applied for each individual attributes rather than a generic
+ * BeanUtils parser.
*/
public class MetaBean
* It's safe to be used by many threads concurrently and has a max capacity of {@link Integer#MAX_VALUE}.
*/
public final class ConcurrentAppendOnlyChunkedList
* Offers same concurrency as ConcurrentHashMap but for a Set
*/
public class ConcurrentHashSet
* Provides similar methods as a {@literal ConcurrentMap
* Provides similar methods as a ConcurrentSet<Long> but since it's an open hash map with linear probing, no node
* allocations are required to store the values.
*
@@ -136,7 +136,6 @@ public boolean add(long item) {
/**
* Remove an existing entry if found
*
- * @param item
* @return true if removed or false if item was not present
*/
public boolean remove(long item) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedList.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedList.java
index e70f5caa80e..b060cf1fb38 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedList.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedList.java
@@ -38,10 +38,14 @@ public interface LinkedList
* This class is not thread safe.
*/
@@ -220,11 +220,10 @@ public void addSorted(E e) {
return;
}
- // in our usage, most of the times we will just add to the end
- // as the QueueImpl cancellations in AMQP will return the buffer back to the queue, in the order they were consumed.
- // There is an exception to that case, when there are more messages on the queue.
- // This would be an optimization for our usage.
- // avoiding scanning the entire List just to add at the end, so we compare the end first.
+ // In our usage, most of the times we will just add to the end as the QueueImpl cancellations in AMQP will
+ // return the buffer back to the queue in the order they were consumed. There is an exception to that case,
+ // when there are more messages on the queue. This would be an optimization for our usage - avoiding scanning
+ // the entire List just to add at the end, so we compare the end first.
if (comparator.compare(tail.val(), e) >= 0) {
logger.trace("addTail as e={} and tail={}", e, tail.val());
addTail(e);
@@ -255,14 +254,14 @@ public void addSorted(E e) {
return;
}
- // this shouldn't happen as the tail was compared before iterating
- // the only possibilities for this to happen are:
+ // This shouldn't happen as the tail was compared before iterating the only possibilities for this to happen
+ // are:
// - there is a bug on the comparator
// - This method is buggy
// - The list wasn't properly synchronized as this list does't support concurrent access
//
// Also I'm not bothering about creating a Logger ID for this, because the only reason for this code to exist
- // is because my OCD level is not letting this out.
+ // is because my OCD level is not letting this out.
throw new IllegalStateException("Cannot find a suitable place for your element, There's a mismatch in the comparator or there was concurrent adccess on the queue");
}
}
@@ -335,8 +334,7 @@ public E poll() {
@Override
public void clear() {
// Clearing all of the links between nodes is "unnecessary", but:
- // - helps a generational GC if the discarded nodes inhabit
- // more than one generation
+ // - helps a generational GC if the discarded nodes inhabit more than one generation
// - is sure to free memory even if there is a reachable Iterator
while (poll() != null) {
@@ -404,8 +402,8 @@ private void removeAfter(Node
* This iterator allows the last element to be repeated in the next call to hasNext or next
*/
public interface LinkedListIterator
+ * The implementation is based on Agrona
+ * IntHashSet but uses long primitive keys and a different {@link #MISSING_VALUE} to account for
+ * {@link Long#hashCode} being 0 for -1.
*/
public class LongHashSet extends AbstractSet
* This is used in QueueImpl when message groups is disabled.
*
* @param
+ * A supplier is required to provide the underlying collection needed when a new priority level is seen, and the end
+ * behaviour is that of the underlying collection, e.g. if set add will follow set's add semantics, if list, then list
+ * semantics.
+ *
* Methods getArray, setArray MUST never be exposed, and all array modifications must go through these.
*
* @param
* Only {@link #size()} and {@link #isEmpty()} are safe to be called concurrently.
*/
public interface PriorityLinkedList
* Differently from an {@code UnrolledLinkedList} this list doesn't optimize addition and removal to achieve a balanced
- * utilization among chunks ie a chunk is removed only if empty and chunks can't be merged.
- * This list has been optimized for small-sized chunks (ideally <= 32 elements): this allow search/removal to
- * be performed with a greedy approach despite a sparse chunk utilization (ie chunks contains few sparse elements).
* From the memory footprint's point of view, this list won't remove the last remaining array although empty to optimize
* the case where its capacity would be enough to hold incoming elements, hence saving a new array allocation.
*/
@@ -231,21 +232,21 @@ public long clear(Consumer super E> consumer) {
}
/**
- * Returns the number of elements of this list.
+ * {@return the number of elements of this list}
*/
public long size() {
return size;
}
/**
- * Returns the configured capacity of each sparse array/chunk.
+ * {@return the configured capacity of each sparse array/chunk}
*/
public int sparseArrayCapacity() {
return sparseArrayCapacity;
}
/**
- * Returns the number of sparse arrays/chunks of this list.
+ * {@return the number of sparse arrays/chunks of this list}
*/
public int sparseArraysCount() {
return list.size();
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/TypedProperties.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/TypedProperties.java
index e2a367ab368..f3c4bea74cd 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/TypedProperties.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/TypedProperties.java
@@ -57,9 +57,8 @@
/**
* Property Value Conversion.
*
- * This implementation follows section 3.5.4 of the Java Message Service specification
- * (Version 1.1 April 12, 2002).
- *
+ * This implementation follows section 3.5.4 of the Java Message Service specification (Version 1.1 April 12,
+ * 2002).
*/
public class TypedProperties {
@@ -498,8 +497,8 @@ private void forEachInternal(BiConsumer
+ * It is important that on nulling off the changedIterator, we atomically compare and set as the changedIterator
+ * could be further updated by another thread whilst we are resetting, the subsequent update simply would be picked
+ * up on the next reset.
*/
@Override
public void reset() {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerImpl.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerImpl.java
index 00599b3dcda..0e41034de9f 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerImpl.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerImpl.java
@@ -44,7 +44,8 @@ public class CriticalAnalyzerImpl implements CriticalAnalyzer {
public CriticalAnalyzerImpl() {
// this will make the scheduled component to start its own pool
- /* Important: The scheduled component should have its own thread pool...
+ /*
+ * Important: The scheduled component should have its own thread pool...
* otherwise in case of a deadlock, or a starvation of the server the analyzer won't pick up any
* issues and won't be able to shutdown the server or halt the VM
*/
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalCloseable.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalCloseable.java
index d02a80aec42..f818091dde9 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalCloseable.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalCloseable.java
@@ -20,11 +20,12 @@
public interface CriticalCloseable extends ArtemisCloseable {
-
- /** This will set something to be called right before closing.
- *
- * The use case that drove this call was a ReadWriteLock on the journal.
- * Imagine that you need to call enterCritical, readWrite.lock() and then unlock and leaveCritical.
- * By using this call I could reuse the same instance on the readWriteLock. */
+ /**
+ * This will set something to be called right before closing.
+ *
+ * The use case that drove this call was a ReadWriteLock on the journal. Imagine that you need to call enterCritical,
+ * readWrite.lock() and then unlock and leaveCritical. By using this call I could reuse the same instance on the
+ * readWriteLock.
+ */
void beforeClose(ArtemisCloseable otherCloseable);
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponent.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponent.java
index b28d9b9470a..5db5fb5aa4c 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponent.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponent.java
@@ -17,12 +17,11 @@
package org.apache.activemq.artemis.utils.critical;
/**
- * A Critical component enters and leaves a critical state.
- * You update a long every time you enter a critical path
- * you update a different long with a System.nanoTime every time you leave that path.
- *
- * If the enterCritical > leaveCritical at any point, then you need to measure the timeout.
- * if the system stops responding, then you have something irresponsive at the system.
+ * A Critical component enters and leaves a critical state. You update a long every time you enter a critical path you
+ * update a different long with a System.nanoTime every time you leave that path.
+ *
+ * If the enterCritical > leaveCritical at any point, then you need to measure the timeout. if the system stops
+ * responding, then you have something irresponsive at the system.
*/
public interface CriticalComponent {
@@ -32,8 +31,9 @@ public interface CriticalComponent {
/**
* Check if the component is expired at a given timeout.. on any of its paths.
+ *
* @param timeout - the timeout to check if the component is expired
- * @param reset - true to reset the component timer if it is expired
+ * @param reset - true to reset the component timer if it is expired
* @return -1 if it's ok, or the number of the path it failed
*/
boolean checkExpiration(long timeout, boolean reset);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponentImpl.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponentImpl.java
index ea08ce4bbc3..9daa4763c80 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponentImpl.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponentImpl.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.utils.critical;
/**
- * This is not abstract as it could be used through aggregations or extensions.
- * This is only good for cases where you call leave within the same thread as you called enter.
+ * This is not abstract as it could be used through aggregations or extensions. This is only good for cases where you
+ * call leave within the same thread as you called enter.
*/
public class CriticalComponentImpl implements CriticalComponent {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/MpscPool.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/MpscPool.java
index 86e016368ee..8afd521d735 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/MpscPool.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/MpscPool.java
@@ -23,13 +23,10 @@
import io.netty.util.internal.PlatformDependent;
-
/**
- * A simple encapsulation of Netty MpscQueue to provide a pool of objects.
- * Use this pool only when the borrowing of object (consume) is done on a single thread.
- * This is using a Multi Producer Single Consumer queue (MPSC).
- * If you need other uses you may create different strategies for ObjectPooling.
- * @param
+ * It is the job of the URISchema implementation to handle these fragments as needed.
+ */
private URI normalise(String uri) throws URISyntaxException {
if (uri.startsWith("(")) {
String[] split = uri.split("\\)", 2);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
index 4f83398eec3..3d4c413333c 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
@@ -72,8 +72,8 @@ protected int getPort(URI uri) {
}
/**
- * It will create a new Object for the URI selected schema.
- * the propertyOverrides is used to replace whatever was defined on the URL string
+ * It will create a new Object for the URI selected schema. the propertyOverrides is used to replace whatever was
+ * defined on the URL string
*
* @param uri The URI
* @param propertyOverrides used to replace whatever was defined on the URL string
@@ -87,8 +87,7 @@ public T newObject(URI uri, Map
+ * This class can be used to split composite URI's into their component parts and is used to extract any URI options
+ * from each URI in order to set specific properties on Beans.
+ *
+ * (copied from ActiveMQ Classic)
*/
public class URISupport {
/**
- * A composite URI can be split into one or more CompositeData object which each represent the
- * individual URIs that comprise the composite one.
+ * A composite URI can be split into one or more CompositeData object which each represent the individual URIs that
+ * comprise the composite one.
*/
public static class CompositeData {
@@ -121,7 +121,7 @@ public static StringBuilder appendParameters(StringBuilder sb, Map
+ * This method differs from the {@link URISupport#parseQuery(String)} method in that it handles composite URI types
+ * and will extract the URI options from the outermost composite URI.
*
* @param uri The URI whose query should be extracted and processed.
- * @return A Mapping of the URI options.
- * @throws java.net.URISyntaxException
+ * @return A Mapping of the URI options
*/
public static Map
+ * When the query options of a URI are applied to certain objects the used portion of the query options needs to be
+ * removed and replaced with those that remain so that other parts of the code can attempt to apply the remainder or
+ * give an error is unknown values were given. This method is used to update a URI with those remainder values.
*
* @param originalURI The URI whose current parameters are remove and replaced with the given remainder value.
* @param params The URI params that should be used to replace the current ones in the target.
- * @return a new URI that matches the original one but has its query options replaced with the given ones.
- * @throws java.net.URISyntaxException
+ * @return a new URI that matches the original one but has its query options replaced with the given ones
*/
public static URI createRemainingURI(URI originalURI, Map {
*
* @param packet the packet being received
* @param connection the connection the packet was received on
- * @return {@code true} to process the next interceptor and handle the packet,
- * {@code false} to abort processing of the packet
- * @throws ActiveMQException
+ * @return {@code true} to process the next interceptor and handle the packet, {@code false} to abort processing of
+ * the packet
*/
boolean intercept(P packet, RemotingConnection connection) throws ActiveMQException;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastEndpoint.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastEndpoint.java
index 7a275a478bc..5ff991c0634 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastEndpoint.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastEndpoint.java
@@ -39,29 +39,21 @@
public interface BroadcastEndpoint {
/**
- * This method initializes a BroadcastEndpoint as
- * a receiving end for broadcasts. After that data can be
- * received using one of its receiveBroadcast() methods.
- *
- * @throws Exception
+ * This method initializes a BroadcastEndpoint as a receiving end for broadcasts. After that data can be received
+ * using one of its receiveBroadcast() methods.
*/
void openClient() throws Exception;
/**
- * This method initializes a BroadcastEndpint as
- * a broadcaster. After that data can be sent
- * via its broadcast() method.
- *
- * @throws Exception
+ * This method initializes a BroadcastEndpint as a broadcaster. After that data can be sent via its broadcast()
+ * method.
*/
void openBroadcaster() throws Exception;
/**
- * Close the endpoint. Any related resources should
- * be cleaned up in this method.
+ * Close the endpoint. Any related resources should be cleaned up in this method.
*
* @param isBroadcast : indicates whether this endpoint serves as a broadcast or not.
- * @throws Exception
*/
void close(boolean isBroadcast) throws Exception;
@@ -69,7 +61,6 @@ public interface BroadcastEndpoint {
* Broadcasting data to the cluster.
*
* @param data : a byte array containing the data.
- * @throws Exception
*/
void broadcast(byte[] data) throws Exception;
@@ -77,20 +68,17 @@ public interface BroadcastEndpoint {
* Receives the broadcast data. It blocks until data is
* available.
*
- * @return the received data as byte array.
- * @throws Exception
+ * @return the received data as byte array
*/
byte[] receiveBroadcast() throws Exception;
/**
- * Receives the broadcast data with a timeout. It blocks until either
- * the data is available or the timeout is reached, whichever comes first.
+ * Receives the broadcast data with a timeout. It blocks until either the data is available or the timeout is
+ * reached, whichever comes first.
*
* @param time : how long the method should wait for the data to arrive.
* @param unit : unit of the time.
- * @return a byte array if data is arrived within the timeout, or null if no data
- * is available after the timeout.
- * @throws Exception
+ * @return a byte array if data is arrived within the timeout, or null if no data is available after the timeout.
*/
byte[] receiveBroadcast(long time, TimeUnit unit) throws Exception;
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java
index 168d840b01f..a7bc7720909 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java
@@ -22,8 +22,8 @@
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
/**
- * The basic configuration used to determine how the server will broadcast members
- * This is analogous to {@link DiscoveryGroupConfiguration}
+ * The basic configuration used to determine how the server will broadcast members This is analogous to
+ * {@link DiscoveryGroupConfiguration}
*/
public final class BroadcastGroupConfiguration implements Serializable {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java
index 175bacfa6c7..f9f5f24500b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java
@@ -24,7 +24,7 @@
/**
* An implementation of BroadcastEndpointFactory that uses an externally managed JChannel for JGroups clustering.
- *
+ *
* Note - the underlying JChannel is not closed in this implementation.
*/
public class ChannelBroadcastEndpointFactory implements BroadcastEndpointFactory {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/DiscoveryGroupConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/DiscoveryGroupConfiguration.java
index 11985fb8a05..17bf9bb73b5 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/DiscoveryGroupConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/DiscoveryGroupConfiguration.java
@@ -24,11 +24,12 @@
/**
* This file represents how we are using Discovery.
*
- * The discovery configuration could either use plain UDP, or JGroups.
+ * If using UDP, all the UDP properties will be filled and the jgroups properties will be {@code null}.
+ *
+ * If using JGroups, all the UDP properties will be -1 or {@code null} and the jgroups properties will be filled.
+ *
* If by any reason, both properties are filled, the JGroups takes precedence. That means, if
* {@code jgroupsFile != null} then the Grouping method used will be JGroups.
*/
@@ -42,9 +43,7 @@ public final class DiscoveryGroupConfiguration implements Serializable {
private long discoveryInitialWaitTimeout = ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT;
- /*
- * This is the actual object used by the class, it has to be transient so we can handle deserialization with a 2.2 client
- * */
+ // This is the actual object used by the class, it has to be transient so we can handle deserialization with a 2.2 client
private BroadcastEndpointFactory endpointFactory;
public DiscoveryGroupConfiguration() {
@@ -58,32 +57,20 @@ public long getRefreshTimeout() {
return refreshTimeout;
}
- /**
- * @param name the name to set
- */
public DiscoveryGroupConfiguration setName(final String name) {
this.name = name;
return this;
}
- /**
- * @param refreshTimeout the refreshTimeout to set
- */
public DiscoveryGroupConfiguration setRefreshTimeout(final long refreshTimeout) {
this.refreshTimeout = refreshTimeout;
return this;
}
- /**
- * @return the discoveryInitialWaitTimeout
- */
public long getDiscoveryInitialWaitTimeout() {
return discoveryInitialWaitTimeout;
}
- /**
- * @param discoveryInitialWaitTimeout the discoveryInitialWaitTimeout to set
- */
public DiscoveryGroupConfiguration setDiscoveryInitialWaitTimeout(long discoveryInitialWaitTimeout) {
this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout;
return this;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
index d50b7217e88..97e9525a2c6 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.api.core;
/**
- * Constants representing pre-defined message attributes that can be referenced in ActiveMQ Artemis core
- * filter expressions.
+ * Constants representing pre-defined message attributes that can be referenced in ActiveMQ Artemis core filter
+ * expressions.
*/
public final class FilterConstants {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java
index 75011229b3a..1ee402dcfbb 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java
@@ -28,7 +28,9 @@
*/
public interface ICoreMessage extends Message {
- /** The buffer will belong to this message, until release is called. */
+ /**
+ * The buffer will belong to this message, until release is called.
+ */
Message setBuffer(ByteBuf buffer);
ByteBuf getBuffer();
@@ -41,45 +43,34 @@ public interface ICoreMessage extends Message {
InputStream getBodyInputStream();
/**
- * Returns a new Buffer slicing the current Body.
+ * {@return a new Buffer slicing the current Body}
*/
ActiveMQBuffer getReadOnlyBodyBuffer();
/**
- * Returns the length in bytes of the body buffer.
+ * {@return the length in bytes of the body buffer}
*/
int getBodyBufferSize();
/**
- * Returns a readOnlyBodyBuffer or a decompressed one if the message is compressed.
- * or the large message buffer.
- * @return
+ * {@return a readOnlyBodyBuffer or a decompressed one if the message is compressed or the large message buffer}
*/
ActiveMQBuffer getDataBuffer();
- /**
- * Return the type of the message
- */
@Override
byte getType();
- /**
- * the type of the message
- */
@Override
CoreMessage setType(byte type);
/**
* We are really interested if this is a LargeServerMessage.
- *
- * @return
*/
boolean isServerMessage();
/**
- * The buffer to write the body.
- * Warning: If you just want to read the content of a message, use getDataBuffer() or getReadOnlyBuffer();
- * @return
+ * The buffer to write the body. Warning: If you just want to read the content of a message, use
+ * {@link #getDataBuffer()} or {@link #getReadOnlyBodyBuffer()}
*/
@Override
ActiveMQBuffer getBodyBuffer();
@@ -87,13 +78,12 @@ public interface ICoreMessage extends Message {
int getEndOfBodyPosition();
/**
- * Used on large messages treatment.
- * this method is used to transfer properties from a temporary CoreMessage to a definitive one.
- * This is used when before a Message was defined as a LargeMessages, its properties are then moved from the
- * Temporary message to its final LargeMessage object.
- *
- * Be careful as this will not perform a copy of the Properties.
- * For real copy, use the copy methods or copy constructors.
+ * Used on large messages treatment. this method is used to transfer properties from a temporary CoreMessage to a
+ * definitive one. This is used when before a Message was defined as a LargeMessages, its properties are then moved
+ * from the Temporary message to its final LargeMessage object.
+ *
+ * Be careful as this will not perform a copy of the Properties. For real copy, use the copy methods or copy
+ * constructors.
*/
void moveHeadersAndProperties(Message msg);
@@ -105,8 +95,7 @@ public interface ICoreMessage extends Message {
void receiveBuffer_1X(ByteBuf buffer);
/**
- * @return Returns the message in Map form, useful when encoding to JSON
- * @param valueSizeLimit
+ * {@inheritDoc}
*/
@Override
default Map
* To add an interceptor to ActiveMQ Artemis server, you have to modify the server configuration file
- * {@literal broker.xml}.
+ * To add it to a client, use
+ * {@link org.apache.activemq.artemis.api.core.client.ServerLocator#addIncomingInterceptor(Interceptor)}
*/
public interface Interceptor extends BaseInterceptor
* Note - this implementation does not close the JChannel, since its externally created.
*/
public class JGroupsChannelBroadcastEndpoint extends JGroupsBroadcastEndpoint {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
index f7bd4d607f1..7bf8fbfbd77 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
@@ -31,13 +31,13 @@
/**
* A Message is a routable instance that has a payload.
*
- * The payload (the "body") is opaque to the messaging system. A Message also has a fixed set of
- * headers (required by the messaging system) and properties (defined by the users) that can be used
- * by the messaging system to route the message (e.g. to ensure it matches a queue filter).
+ * The payload (the "body") is opaque to the messaging system. A Message also has a fixed set of headers (required by
+ * the messaging system) and properties (defined by the users) that can be used by the messaging system to route the
+ * message (e.g. to ensure it matches a queue filter).
*
- * Message can contain properties specified by the users. It is possible to convert from some types
- * to other types as specified by the following table:
+ * Message can contain properties specified by the users. It is possible to convert from some types to other types as
+ * specified by the following table:
*
- * If conversion is not allowed (for example calling {@code getFloatProperty} on a property set a
- * {@code boolean}), a {@link ActiveMQPropertyConversionException} will be thrown.
- *
- *
* User cases that will be covered by Message
- *
+ *
* Receiving a buffer:
- *
+ *
* Sending to a buffer:
- *
+ *
* later on when we added AMQP this name clashed with AMQPMessage.getUserID();
*
* @return the user id
@@ -406,7 +411,7 @@ default Message setValidatedUserID(String validatedUserID) {
}
/**
- * Returns whether this message is durable or not.
+ * {@return whether this message is durable or not}
*/
boolean isDurable();
@@ -423,8 +428,6 @@ default Message setValidatedUserID(String validatedUserID) {
/**
* Look at {@link #setAddress(SimpleString)} for the doc.
- * @param address
- * @return
*/
Message setAddress(String address);
@@ -432,16 +435,13 @@ default Message setValidatedUserID(String validatedUserID) {
/**
* This will set the address on CoreMessage.
- *
- * Note for AMQPMessages:
- * in AMQPMessages this will not really change the address on the message. Instead it will add a property
- * on extraProperties which only transverse internally at the broker.
- * Whatever you change here it won't affect anything towards the received message.
- *
+ *
+ * Note for AMQPMessages: in AMQPMessages this will not really change the address on the message. Instead it will add
+ * a property on extraProperties which only transverse internally at the broker. Whatever you change here it won't
+ * affect anything towards the received message.
+ *
* If you wish to change AMQPMessages address you will have to do it directly at the AMQP Message, however beware
* that AMQPMessages are not supposed to be changed at the broker, so only do it if you know what you are doing.
- * @param address
- * @return
*/
Message setAddress(SimpleString address);
@@ -450,9 +450,7 @@ default Message setValidatedUserID(String validatedUserID) {
Message setTimestamp(long timestamp);
/**
- * Returns the message priority.
- *
- * Values range from 0 (less priority) to 9 (more priority) inclusive.
+ * {@return the message priority; values range from 0 (less priority) to 9 (more priority) inclusive}
*/
byte getPriority();
@@ -465,12 +463,17 @@ default Message setValidatedUserID(String validatedUserID) {
*/
Message setPriority(byte priority);
- /** Used to receive this message from an encoded medium buffer */
+ /**
+ * Used to receive this message from an encoded medium buffer
+ */
void receiveBuffer(ByteBuf buffer);
- /** Used to send this message to an encoded medium buffer.
- * @param buffer the buffer used.
- * @param deliveryCount Some protocols (AMQP) will have this as part of the message. */
+ /**
+ * Used to send this message to an encoded medium buffer.
+ *
+ * @param buffer the buffer used.
+ * @param deliveryCount Some protocols (AMQP) will have this as part of the message.
+ */
void sendBuffer(ByteBuf buffer, int deliveryCount);
int getPersistSize();
@@ -479,7 +482,9 @@ default Message setValidatedUserID(String validatedUserID) {
void reloadPersistence(ActiveMQBuffer record, CoreMessageObjectPools pools);
- /** Propagate message modifications to clients. */
+ /**
+ * Propagate message modifications to clients.
+ */
default void reencode() {
// only valid probably on AMQP
}
@@ -499,7 +504,6 @@ default void referenceOriginalMessage(final Message original, final SimpleString
/**
* it will translate a property named HDR_DUPLICATE_DETECTION_ID.
- * @return
*/
default byte[] getDuplicateIDBytes() {
Object duplicateID = getDuplicateProperty();
@@ -534,59 +538,95 @@ default Object getDuplicateProperty() {
return null;
}
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putBooleanProperty(String key, boolean value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putByteProperty(String key, byte value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putBytesProperty(String key, byte[] value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putShortProperty(String key, short value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putCharProperty(String key, char value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putIntProperty(String key, int value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putLongProperty(String key, long value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putFloatProperty(String key, float value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putDoubleProperty(String key, double value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putBooleanProperty(SimpleString key, boolean value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putByteProperty(SimpleString key, byte value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putBytesProperty(SimpleString key, byte[] value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putShortProperty(SimpleString key, short value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putCharProperty(SimpleString key, char value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putIntProperty(SimpleString key, int value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putLongProperty(SimpleString key, long value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putFloatProperty(SimpleString key, float value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putDoubleProperty(SimpleString key, double value);
/**
@@ -599,10 +639,14 @@ default Object getDuplicateProperty() {
*/
Message putStringProperty(String key, String value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putObjectProperty(String key, Object value) throws ActiveMQPropertyConversionException;
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putObjectProperty(SimpleString key, Object value) throws ActiveMQPropertyConversionException;
Object removeProperty(String key);
@@ -666,14 +710,17 @@ default String getAnnotationString(SimpleString key) {
Object getAnnotation(SimpleString key);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
default Message setAnnotation(SimpleString key, Object value) {
putObjectProperty(key, value);
return this;
}
- /** To be called by the broker on ocasions such as DLQ and expiry.
- * When the broker is adding additional properties. */
+ /**
+ * To be called by the broker on ocasions such as DLQ and expiry. When the broker is adding additional properties.
+ */
default Message setBrokerProperty(SimpleString key, Object value) {
putObjectProperty(key, value);
return this;
@@ -707,22 +754,21 @@ default Long getIngressTimestamp() {
Message putStringProperty(SimpleString key, String value);
/**
- * Returns the size of the encoded message.
+ * {@return the size of the encoded message}
*/
int getEncodeSize();
/**
- * Return an estimate of the size of the message on the wire.
- * for LargeMessages this will contain whatever is needed to encode properties and the body size of large messages.
- * For AMQP this will return the whole body size of the message as the body will contain all the data including properties.
- * @return
+ * Return an estimate of the size of the message on the wire. for LargeMessages this will contain whatever is needed
+ * to encode properties and the body size of large messages. For AMQP this will return the whole body size of the
+ * message as the body will contain all the data including properties.
*/
default long getWholeMessageSize() {
return getEncodeSize();
}
/**
- * Returns all the names of the properties for this message.
+ * {@return all the names of the properties for this message}
*/
Set
+ * Additional validation on reference counting will be done If you set a system property named "ARTEMIS_REF_DEBUG" and
+ * enable logging on this class. Additional logging output will be written when reference counting is broken and these
+ * debug options are applied.
+ */
public class RefCountMessage {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -53,8 +54,9 @@ public static boolean isRefTraceEnabled() {
return REF_DEBUG && logger.isTraceEnabled();
}
- /** Sub classes constructors willing to debug reference counts,
- * can register the objectCleaner through this method. */
+ /**
+ * Sub classes constructors willing to debug reference counts, can register the objectCleaner through this method.
+ */
protected void registerDebug() {
if (debugStatus == null) {
debugStatus = new DebugState(this.toString());
@@ -73,8 +75,9 @@ private static class DebugState implements Runnable {
String description;
/**
- * Notice: This runnable cannot hold any reference back to message otherwise it won't ever happen and you will get a memory leak.
- * */
+ * Notice: This runnable cannot hold any reference back to message otherwise it won't ever happen and you will get
+ * a memory leak.
+ */
Runnable runWhenLeaked;
DebugState(String description) {
@@ -82,8 +85,9 @@ private static class DebugState implements Runnable {
addDebug("registered");
}
- /** this marks the Status as accounted for
- * and no need to report an issue when DEBUG hits */
+ /**
+ * this marks the Status as accounted for and no need to report an issue when DEBUG hits
+ */
void accountedFor() {
accounted = true;
}
@@ -143,7 +147,9 @@ String debugLocations() {
private volatile boolean errorCheck = true;
- /** has the refCount fired the action already? */
+ /**
+ * has the refCount fired the action already?
+ */
public boolean isReleased() {
return released;
}
@@ -167,7 +173,9 @@ public static void deferredDebug(RefCountMessage message, String debugMessage, O
message.deferredDebug(formattedDebug);
}
- /** Deferred debug, that will be used in case certain conditions apply to the RefCountMessage */
+ /**
+ * Deferred debug, that will be used in case certain conditions apply to the RefCountMessage
+ */
public void deferredDebug(String message) {
if (parentRef != null) {
parentRef.deferredDebug(message);
@@ -190,8 +198,8 @@ public int getDurableCount() {
}
/**
- * in certain cases the large message is copied from another LargeServerMessage
- * and the ref count needs to be on that place.
+ * in certain cases the large message is copied from another LargeServerMessage and the ref count needs to be on that
+ * place.
*/
private volatile RefCountMessage parentRef;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessageListener.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessageListener.java
index 256f0c3e79a..e0e9a583e84 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessageListener.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessageListener.java
@@ -17,7 +17,8 @@
package org.apache.activemq.artemis.api.core;
/**
- * These methods will be called during refCount operations */
+ * These methods will be called during refCount operations
+ */
public interface RefCountMessageListener {
void durableUp(Message message, int durableCount);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
index 41a584b36f0..9d2ba4cf013 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
@@ -28,12 +28,10 @@
import org.apache.activemq.artemis.utils.UUIDGenerator;
/**
- * A TransportConfiguration is used by a client to specify connections to a server and its backup if
- * one exists.
+ * A TransportConfiguration is used by a client to specify connections to a server and its backup if one exists.
*
- * Typically the constructors take the class name and parameters for needed to create the
- * connection. These will be different dependent on which connector is being used, i.e. Netty or
- * InVM etc. For example:
+ * Typically the constructors take the class name and parameters for needed to create the connection. These will be
+ * different dependent on which connector is being used, i.e. Netty or InVM etc. For example:
*
*
- * Once a {@link ClientSessionFactory} has been created, it can be further configured using its
- * setter methods before creating the sessions. Once a session is created, the factory can no longer
- * be modified (its setter methods will throw a {@link IllegalStateException}.
+ * Once a {@link ClientSessionFactory} has been created, it can be further configured using its setter methods before
+ * creating the sessions. Once a session is created, the factory can no longer be modified (its setter methods will
+ * throw a {@link IllegalStateException}.
*/
public final class ActiveMQClient {
@@ -224,7 +224,8 @@ public static synchronized void clearThreadPools(long time, TimeUnit unit) {
}
/**
- * Warning: This method has to be called before any clients or servers is started on the JVM otherwise previous ServerLocator would be broken after this call.
+ * Warning: This method has to be called before any clients or servers is started on the JVM otherwise previous
+ * ServerLocator would be broken after this call.
*/
public static synchronized void injectPools(ExecutorService globalThreadPool,
ScheduledExecutorService scheduledThreadPool,
@@ -286,16 +287,16 @@ public static int getGlobalFlowControlThreadPoolSize() {
}
/**
- * Initializes the global thread pools properties from System properties. This method will update the global
- * thread pool configuration based on defined System properties (or defaults if they are not set).
- * The System properties key names are as follow:
- *
+ * Initializes the global thread pools properties from System properties. This method will update the global thread
+ * pool configuration based on defined System properties (or defaults if they are not set). The System properties key
+ * names are as follow:
+ *
* ActiveMQClient.THREAD_POOL_MAX_SIZE_PROPERTY_KEY="activemq.artemis.client.global.thread.pool.max.size"
* ActiveMQClient.SCHEDULED_THREAD_POOL_SIZE_PROPERTY_KEY="activemq.artemis.client.global.scheduled.thread.pool.core.size
- *
- * The min value for max thread pool size is 2. If the value is not -1, but lower than 2, it will be ignored and will default to 2.
- * A value of -1 configures an unbounded thread pool.
- *
+ *
+ * The min value for max thread pool size is 2. If the value is not -1, but lower than 2, it will be ignored and will
+ * default to 2. A value of -1 configures an unbounded thread pool.
+ *
* Note: If global thread pools have already been created, they will not be updated with these new values.
*/
public static void initializeGlobalThreadPoolProperties() {
@@ -304,13 +305,13 @@ public static void initializeGlobalThreadPoolProperties() {
}
/**
- * Allows programmatical configuration of global thread pools properties. This method will update the global
- * thread pool configuration based on the provided values notifying all globalThreadPoolListeners.
- *
+ * Allows programmatical configuration of global thread pools properties. This method will update the global thread
+ * pool configuration based on the provided values notifying all globalThreadPoolListeners.
+ *
* Note: If global thread pools have already been created, they will not be updated with these new values.
- *
- * The min value for globalThreadMaxPoolSize is 2. If the value is not -1, but lower than 2, it will be ignored and will default to 2.
- * A value of -1 configures an unbounded thread pool.
+ *
+ * The min value for globalThreadMaxPoolSize is 2. If the value is not -1, but lower than 2, it will be ignored and
+ * will default to 2. A value of -1 configures an unbounded thread pool.
*/
public static void setGlobalThreadPoolProperties(int globalThreadMaxPoolSize, int globalScheduledThreadPoolSize, int globalFlowControlThreadPoolSize) {
@@ -333,10 +334,10 @@ public static ServerLocator createServerLocator(final String url) throws Excepti
}
/**
- * Create a ServerLocator which creates session factories using a static list of transportConfigurations, the ServerLocator is not updated automatically
- * as the cluster topology changes, and no HA backup information is propagated to the client
+ * Create a ServerLocator which creates session factories using a static list of transportConfigurations, the
+ * ServerLocator is not updated automatically as the cluster topology changes, and no HA backup information is
+ * propagated to the client
*
- * @param transportConfigurations
* @return the ServerLocator
*/
public static ServerLocator createServerLocatorWithoutHA(TransportConfiguration... transportConfigurations) {
@@ -344,11 +345,12 @@ public static ServerLocator createServerLocatorWithoutHA(TransportConfiguration.
}
/**
- * Create a ServerLocator which creates session factories using a static list of transportConfigurations, the ServerLocator is not updated automatically
- * as the cluster topology changes, and no HA backup information is propagated to the client
+ * Create a ServerLocator which creates session factories using a static list of transportConfigurations, the
+ * ServerLocator is not updated automatically as the cluster topology changes, and no HA backup information is
+ * propagated to the client
*
- * @param ha The Locator will support topology updates and ha (this required the server to be clustered, otherwise the first connection will timeout)
- * @param transportConfigurations
+ * @param ha The Locator will support topology updates and ha (this required the server to be clustered, otherwise
+ * the first connection will timeout)
* @return the ServerLocator
*/
public static ServerLocator createServerLocator(final boolean ha,
@@ -357,12 +359,11 @@ public static ServerLocator createServerLocator(final boolean ha,
}
/**
- * Create a ServerLocator which creates session factories from a set of active servers, no HA
- * backup information is propagated to the client
+ * Create a ServerLocator which creates session factories from a set of active servers, no HA backup information is
+ * propagated to the client
*
* The UDP address and port are used to listen for active servers in the cluster
*
- * @param groupConfiguration
* @return the ServerLocator
*/
public static ServerLocator createServerLocatorWithoutHA(final DiscoveryGroupConfiguration groupConfiguration) {
@@ -370,13 +371,11 @@ public static ServerLocator createServerLocatorWithoutHA(final DiscoveryGroupCon
}
/**
- * Create a ServerLocator which creates session factories from a set of active servers, no HA
- * backup information is propagated to the client The UDP address and port are used to listen for
- * active servers in the cluster
+ * Create a ServerLocator which creates session factories from a set of active servers, no HA backup information is
+ * propagated to the client The UDP address and port are used to listen for active servers in the cluster
*
- * @param ha The Locator will support topology updates and ha (this required the server to be
- * clustered, otherwise the first connection will timeout)
- * @param groupConfiguration
+ * @param ha The Locator will support topology updates and ha (this required the server to be clustered, otherwise
+ * the first connection will timeout)
* @return the ServerLocator
*/
public static ServerLocator createServerLocator(final boolean ha,
@@ -385,19 +384,19 @@ public static ServerLocator createServerLocator(final boolean ha,
}
/**
- * Create a ServerLocator which will receive cluster topology updates from the cluster as servers
- * leave or join and new backups are appointed or removed.
+ * Create a ServerLocator which will receive cluster topology updates from the cluster as servers leave or join and
+ * new backups are appointed or removed.
*
- * The initial list of servers supplied in this method is simply to make an initial connection to
- * the cluster, once that connection is made, up to date cluster topology information is
- * downloaded and automatically updated whenever the cluster topology changes.
+ * The initial list of servers supplied in this method is simply to make an initial connection to the cluster, once
+ * that connection is made, up to date cluster topology information is downloaded and automatically updated whenever
+ * the cluster topology changes.
*
- * If the topology includes backup servers that information is also propagated to the client so
- * that it can know which server to failover onto in case of active server failure.
+ * If the topology includes backup servers that information is also propagated to the client so that it can know
+ * which server to failover onto in case of active server failure.
*
- * @param initialServers The initial set of servers used to make a connection to the cluster.
- * Each one is tried in turn until a successful connection is made. Once a connection
- * is made, the cluster topology is downloaded and the rest of the list is ignored.
+ * @param initialServers The initial set of servers used to make a connection to the cluster. Each one is tried in
+ * turn until a successful connection is made. Once a connection is made, the cluster topology
+ * is downloaded and the rest of the list is ignored.
* @return the ServerLocator
*/
public static ServerLocator createServerLocatorWithHA(TransportConfiguration... initialServers) {
@@ -405,19 +404,17 @@ public static ServerLocator createServerLocatorWithHA(TransportConfiguration...
}
/**
- * Create a ServerLocator which will receive cluster topology updates from the cluster as servers
- * leave or join and new backups are appointed or removed.
+ * Create a ServerLocator which will receive cluster topology updates from the cluster as servers leave or join and
+ * new backups are appointed or removed.
*
- * The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP
- * broadcasts which contain connection information for members of the cluster. The broadcasted
- * connection information is simply used to make an initial connection to the cluster, once that
- * connection is made, up to date cluster topology information is downloaded and automatically
- * updated whenever the cluster topology changes.
+ * The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP broadcasts which
+ * contain connection information for members of the cluster. The broadcasted connection information is simply used
+ * to make an initial connection to the cluster, once that connection is made, up to date cluster topology
+ * information is downloaded and automatically updated whenever the cluster topology changes.
*
- * If the topology includes backup servers that information is also propagated to the client so
- * that it can know which server to failover onto in case of active server failure.
+ * If the topology includes backup servers that information is also propagated to the client so that it can know
+ * which server to failover onto in case of active server failure.
*
- * @param groupConfiguration
* @return the ServerLocator
*/
public static ServerLocator createServerLocatorWithHA(final DiscoveryGroupConfiguration groupConfiguration) {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java
index 7db6180a93f..91e7705e9b5 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java
@@ -21,23 +21,20 @@
/**
* A ClientConsumer receives messages from ActiveMQ Artemis queues.
- *
+ * Messages can be consumed synchronously by using the {@code receive()} methods which will block until a message is
+ * received (or a timeout expires) or asynchronously by setting a {@link MessageHandler}.
+ *
+ * These 2 types of consumption are exclusive: a ClientConsumer with a MessageHandler set will throw ActiveMQException
+ * if its {@code receive()} methods are called.
*
* @see ClientSession#createConsumer(String)
*/
public interface ClientConsumer extends AutoCloseable {
/**
- * The server's ID associated with this consumer.
- * ActiveMQ Artemis implements this as a long but this could be protocol dependent.
- *
- * @return
+ * The server's ID associated with this consumer. ActiveMQ Artemis implements this as a long but this could be
+ * protocol dependent.
*/
ConsumerContext getConsumerContext();
@@ -67,14 +64,14 @@ public interface ClientConsumer extends AutoCloseable {
ClientMessage receive(long timeout) throws ActiveMQException;
/**
- * Receives a message from a queue. This call will force a network trip to ActiveMQ Artemis server to
- * ensure that there are no messages in the queue which can be delivered to this consumer.
+ * Receives a message from a queue. This call will force a network trip to ActiveMQ Artemis server to ensure that
+ * there are no messages in the queue which can be delivered to this consumer.
*
- * This call will never wait indefinitely for a message, it will return {@code null} if no
- * messages are available for this consumer.
+ * This call will never wait indefinitely for a message, it will return {@code null} if no messages are available for
+ * this consumer.
*
- * Note however that there is a performance cost as an additional network trip to the server may
- * required to check the queue status.
+ * Note however that there is a performance cost as an additional network trip to the server may required to check
+ * the queue status.
*
* Calling this method on a closed consumer will throw an ActiveMQException.
*
@@ -84,8 +81,6 @@ public interface ClientConsumer extends AutoCloseable {
ClientMessage receiveImmediate() throws ActiveMQException;
/**
- * Returns the MessageHandler associated to this consumer.
- *
* Calling this method on a closed consumer will throw an ActiveMQException.
*
* @return the MessageHandler associated to this consumer or {@code null}
@@ -96,8 +91,8 @@ public interface ClientConsumer extends AutoCloseable {
/**
* Sets the MessageHandler for this consumer to consume messages asynchronously.
*
- * Note that setting a handler dedicates the parent session, and its child producers
- * and consumers, to the session-wide handler delivery thread of control.
+ * Note that setting a handler dedicates the parent session, and its child producers and consumers, to the
+ * session-wide handler delivery thread of control.
*
* Calling this method on a closed consumer will throw a ActiveMQException.
*
@@ -109,25 +104,18 @@ public interface ClientConsumer extends AutoCloseable {
/**
* Closes the consumer.
*
- * Once this consumer is closed, it can not receive messages, whether synchronously or
- * asynchronously.
- *
- * @throws ActiveMQException
+ * Once this consumer is closed, it can not receive messages, whether synchronously or asynchronously.
*/
@Override
void close() throws ActiveMQException;
/**
- * Returns whether the consumer is closed or not.
- *
- * @return
- * If the session responsible to acknowledge this message has {@code autoCommitAcks} set to
- * {@code true}, the transaction will automatically commit the current transaction. Otherwise,
- * this acknowledgement will not be committed until the client commits the session transaction.
+ * If the session responsible to acknowledge this message has {@code autoCommitAcks} set to {@code true}, the
+ * transaction will automatically commit the current transaction. Otherwise, this acknowledgement will not be
+ * committed until the client commits the session transaction.
*
* @throws ActiveMQException if an error occurred while acknowledging the message.
* @see ClientSession#isAutoCommitAcks()
@@ -59,9 +59,9 @@ public interface ClientMessage extends ICoreMessage {
/**
* Acknowledges reception of a single message.
*
- * If the session responsible to acknowledge this message has {@code autoCommitAcks} set to
- * {@code true}, the transaction will automatically commit the current transaction. Otherwise,
- * this acknowledgement will not be committed until the client commits the session transaction.
+ * If the session responsible to acknowledge this message has {@code autoCommitAcks} set to {@code true}, the
+ * transaction will automatically commit the current transaction. Otherwise, this acknowledgement will not be
+ * committed until the client commits the session transaction.
*
* @throws ActiveMQException if an error occurred while acknowledging the message.
* @see ClientSession#isAutoCommitAcks()
@@ -69,54 +69,46 @@ public interface ClientMessage extends ICoreMessage {
ClientMessage individualAcknowledge() throws ActiveMQException;
/**
- * This can be optionally used to verify if the entire message has been received.
- * It won't have any effect on regular messages but it may be helpful on large messages.
- * The use case for this is to make sure there won't be an exception while getting the buffer.
- * Using getBodyBuffer directly would have the same effect but you could get a Runtime non checked Exception
- * instead
- *
- * @throws ActiveMQException
+ * This can be optionally used to verify if the entire message has been received. It won't have any effect on regular
+ * messages but it may be helpful on large messages. The use case for this is to make sure there won't be an
+ * exception while getting the buffer. Using getBodyBuffer directly would have the same effect but you could get a
+ * Runtime non checked Exception instead
*/
void checkCompletion() throws ActiveMQException;
/**
- * Returns the size (in bytes) of this message's body
+ * {@return the size (in bytes) of this message's body}
*/
int getBodySize();
/**
* Sets the OutputStream that will receive the content of a message received in a non blocking way.
- *
* This method is used when consuming large messages
*
* @return this ClientMessage
- * @throws ActiveMQException
*/
ClientMessage setOutputStream(OutputStream out) throws ActiveMQException;
/**
- * Saves the content of the message to the OutputStream.
- * It will block until the entire content is transferred to the OutputStream.
- *
* This method is used when consuming large messages
*
* @param timeMilliseconds - 0 means wait forever
* @return true if it reached the end
- * @throws ActiveMQException
*/
boolean waitOutputStreamCompletion(long timeMilliseconds) throws ActiveMQException;
/**
* Sets the body's IntputStream.
- *
* This method is used when sending large messages
*
* @return this ClientMessage
@@ -125,15 +117,13 @@ public interface ClientMessage extends ICoreMessage {
/**
* Return the bodyInputStream for large messages
- * @return
*/
@Override
InputStream getBodyInputStream();
/**
- * The buffer to write the body.
- * Warning: If you just want to read the content of a message, use getDataBuffer() or getReadOnlyBuffer();
- * @return
+ * The buffer to write the body. Warning: If you just want to read the content of a message, use getDataBuffer() or
+ * getReadOnlyBuffer();
*/
@Override
ActiveMQBuffer getBodyBuffer();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java
index 4faeba7cb9d..c2b82bbd6fe 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java
@@ -21,43 +21,33 @@
import org.apache.activemq.artemis.api.core.SimpleString;
/**
- * A ClientProducer is used to send messages to a specific address. Messages are then routed on the
- * server to any queues that are bound to the address. A ClientProducer can either be created with a
- * specific address in mind or with none. With the latter the address must be provided using the
- * appropriate send() method.
* The sending semantics can change depending on what blocking semantics are set via
- * {@link ServerLocator#setBlockOnDurableSend(boolean)} and
- * {@link ServerLocator#setBlockOnNonDurableSend(boolean)} . If set to
- * true then for each message type, durable and non durable respectively, any exceptions such as the
- * address not existing or security exceptions will be thrown at the time of send. Alternatively if
- * set to false then exceptions will only be logged on the server.
- * The send rate can also be controlled via {@link ServerLocator#setProducerMaxRate(int)} and the
- * {@link ServerLocator#setProducerWindowSize(int)}.
+ * This will block until confirmation that the message has reached the server has been received if
+ * {@link ServerLocator#setBlockOnDurableSend(boolean)} or {@link ServerLocator#setBlockOnNonDurableSend(boolean)}
+ * are set to {@code true} for the specified message type.
*
* @param message the message to send
* @throws ActiveMQException if an exception occurs while sending the message
@@ -65,8 +55,8 @@ public interface ClientProducer extends AutoCloseable {
void send(Message message) throws ActiveMQException;
/**
- * Sends a message to the specified address instead of the ClientProducer's address.
* This message will be sent asynchronously.
*
* The handler will only get called if {@link ServerLocator#setConfirmationWindowSize(int) -1}.
@@ -78,12 +68,11 @@ public interface ClientProducer extends AutoCloseable {
void send(Message message, SendAcknowledgementHandler handler) throws ActiveMQException;
/**
- * Sends a message to the specified address instead of the ClientProducer's address.
+ * This will block until confirmation that the message has reached the server has been received if
+ * {@link ServerLocator#setBlockOnDurableSend(boolean)} or {@link ServerLocator#setBlockOnNonDurableSend(boolean)}
+ * are set to true for the specified message type.
*
* @param address the address where the message will be sent
* @param message the message to send
@@ -92,8 +81,8 @@ public interface ClientProducer extends AutoCloseable {
void send(SimpleString address, Message message) throws ActiveMQException;
/**
- * Sends a message to the specified address instead of the ClientProducer's address.
* This message will be sent asynchronously as long as {@link ServerLocator#setConfirmationWindowSize(int)} was set.
*
* Notice that if no confirmationWindowsize is set
@@ -106,12 +95,11 @@ public interface ClientProducer extends AutoCloseable {
void send(SimpleString address, Message message, SendAcknowledgementHandler handler) throws ActiveMQException;
/**
- * Sends a message to the specified address instead of the ClientProducer's address.
+ * This will block until confirmation that the message has reached the server has been received if
+ * {@link ServerLocator#setBlockOnDurableSend(boolean)} or {@link ServerLocator#setBlockOnNonDurableSend(boolean)}
+ * are set to true for the specified message type.
*
* @param address the address where the message will be sent
* @param message the message to send
@@ -128,30 +116,22 @@ public interface ClientProducer extends AutoCloseable {
void close() throws ActiveMQException;
/**
- * Returns whether the producer is closed or not.
- *
- * @return
+ * The ClientRequestor constructor is given a ClientSession and a request address. It creates a temporary queue for the
+ * responses and provides a request method that sends the request message and waits for its reply.
*/
public final class ClientRequestor implements AutoCloseable {
@@ -40,12 +40,11 @@ public final class ClientRequestor implements AutoCloseable {
/**
* Constructor for the ClientRequestor.
- *
+ *
* The implementation expects a ClientSession with automatic commits of sends and acknowledgements
*
* @param session a ClientSession uses to handle requests and replies
* @param requestAddress the address to send request messages to
- * @throws Exception
*/
public ClientRequestor(final ClientSession session, final SimpleString requestAddress) throws Exception {
queueSession = session;
@@ -64,25 +63,23 @@ public ClientRequestor(final ClientSession session, final String requestAddress)
}
/**
- * Sends a message to the request address and wait indefinitely for a reply.
- * The temporary queue is used for the REPLYTO_HEADER_NAME, and only one reply per request is expected
+ * Sends a message to the request address and wait indefinitely for a reply. The temporary queue is used for the
+ * REPLYTO_HEADER_NAME, and only one reply per request is expected
*
* @param request the message to send
* @return the reply message
- * @throws Exception
*/
public ClientMessage request(final ClientMessage request) throws Exception {
return request(request, 0);
}
/**
- * Sends a message to the request address and wait for the given timeout for a reply.
- * The temporary queue is used for the REPLYTO_HEADER_NAME, and only one reply per request is expected
+ * Sends a message to the request address and wait for the given timeout for a reply. The temporary queue is used for
+ * the REPLYTO_HEADER_NAME, and only one reply per request is expected
*
* @param request the message to send
* @param timeout the timeout to wait for a reply (in milliseconds)
* @return the reply message or {@code null} if no message is replied before the timeout elapses
- * @throws Exception
*/
public ClientMessage request(final ClientMessage request, final long timeout) throws Exception {
request.putStringProperty(ClientMessageImpl.REPLYTO_HEADER_NAME, replyQueue);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java
index 861f64d693d..cc0b5eea3f7 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java
@@ -24,31 +24,28 @@
import org.apache.activemq.artemis.api.core.ActiveMQException;
import org.apache.activemq.artemis.api.core.QueueAttributes;
import org.apache.activemq.artemis.api.core.QueueConfiguration;
-import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.RoutingType;
+import org.apache.activemq.artemis.api.core.SimpleString;
/**
* A ClientSession is a single-threaded parent object required for producing and consuming messages.
*
- * Only a single thread may be used to operate on the session and its child producers and consumers,
- * other than close() methods which may be called from another thread. Setting a MessageHandler on a
- * consumer renders the session, and all its child producers and consumers, to be dedicated to the
- * session-wide handler delivery thread of control.
+ * Only a single thread may be used to operate on the session and its child producers and consumers, other than close()
+ * methods which may be called from another thread. Setting a MessageHandler on a consumer renders the session, and all
+ * its child producers and consumers, to be dedicated to the session-wide handler delivery thread of control.
*/
public interface ClientSession extends XAResource, AutoCloseable {
/**
- * This is used to identify a ClientSession as used by the JMS Layer
- * The JMS Layer will add this through Meta-data, so the server or management layers
- * can identify session created over core API purely or through the JMS Layer
+ * This is used to identify a ClientSession as used by the JMS Layer The JMS Layer will add this through Meta-data,
+ * so the server or management layers can identify session created over core API purely or through the JMS Layer
*/
String JMS_SESSION_IDENTIFIER_PROPERTY = "jms-session";
/**
- * Just like {@link ClientSession.AddressQuery#JMS_SESSION_IDENTIFIER_PROPERTY} this is
- * used to identify the ClientID over JMS Session.
- * However this is only used when the JMS Session.clientID is set (which is optional).
- * With this property management tools and the server can identify the jms-client-id used over JMS
+ * Just like {@link ClientSession.AddressQuery#JMS_SESSION_IDENTIFIER_PROPERTY} this is used to identify the ClientID
+ * over JMS Session. However this is only used when the JMS Session.clientID is set (which is optional). With this
+ * property management tools and the server can identify the jms-client-id used over JMS
*/
String JMS_SESSION_CLIENT_ID_PROPERTY = "jms-client-id";
@@ -60,22 +57,22 @@ public interface ClientSession extends XAResource, AutoCloseable {
interface AddressQuery {
/**
- * Returns
* Notice: you will get an exception if the address or the filter doesn't match to an already existent queue
*
@@ -375,12 +356,14 @@ interface QueueQuery {
* @param queueName the name of the queue
* @param durable if the queue is durable
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createSharedQueue(QueueConfiguration)} instead
*/
@Deprecated
void createSharedQueue(SimpleString address, SimpleString queueName, boolean durable) throws ActiveMQException;
/**
- * Creates a transient queue. A queue that will exist as long as there are consumers. When the last consumer is closed the queue will be deleted
+ * Creates a transient queue. A queue that will exist as long as there are consumers. When the last consumer is
+ * closed the queue will be deleted
*
* Notice: you will get an exception if the address or the filter doesn't match to an already existent queue
*
@@ -389,6 +372,7 @@ interface QueueQuery {
* @param filter whether the queue is durable or not
* @param durable if the queue is durable
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createSharedQueue(QueueConfiguration)} instead
*/
@Deprecated
void createSharedQueue(SimpleString address,
@@ -403,6 +387,7 @@ void createSharedQueue(SimpleString address,
* @param queueName the name of the queue
* @param durable whether the queue is durable or not
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(String address, String queueName, boolean durable) throws ActiveMQException;
@@ -413,6 +398,7 @@ void createSharedQueue(SimpleString address,
* @param address the queue will be bound to this address
* @param queueName the name of the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(String address, String queueName) throws ActiveMQException;
@@ -423,6 +409,7 @@ void createSharedQueue(SimpleString address,
* @param address the queue will be bound to this address
* @param queueName the name of the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(SimpleString address, SimpleString queueName) throws ActiveMQException;
@@ -435,6 +422,7 @@ void createSharedQueue(SimpleString address,
* @param filter only messages which match this filter will be put in the queue
* @param durable whether the queue is durable or not
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(SimpleString address,
@@ -450,6 +438,7 @@ void createQueue(SimpleString address,
* @param durable whether the queue is durable or not
* @param filter only messages which match this filter will be put in the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(String address, String queueName, String filter, boolean durable) throws ActiveMQException;
@@ -463,6 +452,7 @@ void createQueue(SimpleString address,
* @param durable whether the queue is durable or not
* @param autoCreated whether to mark this queue as autoCreated or not
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(SimpleString address,
@@ -480,6 +470,7 @@ void createQueue(SimpleString address,
* @param durable whether the queue is durable or not
* @param autoCreated whether to mark this queue as autoCreated or not
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(String address, String queueName, String filter, boolean durable, boolean autoCreated) throws ActiveMQException;
@@ -490,6 +481,7 @@ void createQueue(SimpleString address,
* @param address the queue will be bound to this address
* @param queueName the name of the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createTemporaryQueue(SimpleString address, SimpleString queueName) throws ActiveMQException;
@@ -500,6 +492,7 @@ void createQueue(SimpleString address,
* @param address the queue will be bound to this address
* @param queueName the name of the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createTemporaryQueue(String address, String queueName) throws ActiveMQException;
@@ -511,6 +504,7 @@ void createQueue(SimpleString address,
* @param queueName the name of the queue
* @param filter only messages which match this filter will be put in the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createTemporaryQueue(SimpleString address,
@@ -524,50 +518,53 @@ void createTemporaryQueue(SimpleString address,
* @param queueName the name of the queue
* @param filter only messages which match this filter will be put in the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createTemporaryQueue(String address, String queueName, String filter) throws ActiveMQException;
- /** Deprecate **/
-
-
/**
* Creates a non-temporary queue.
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param durable whether the queue is durable or not
+ * @param queueName the name of the queue
+ * @param durable whether the queue is durable or not
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, boolean durable) throws ActiveMQException;
/**
- * Creates a transient queue. A queue that will exist as long as there are consumers. When the last consumer is closed the queue will be deleted
+ * Creates a transient queue. A queue that will exist as long as there are consumers. When the last consumer is
+ * closed the queue will be deleted
*
* Notice: you will get an exception if the address or the filter doesn't match to an already existent queue
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param durable if the queue is durable
+ * @param queueName the name of the queue
+ * @param durable if the queue is durable
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createSharedQueue(QueueConfiguration)} instead
*/
@Deprecated
void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString queueName, boolean durable) throws ActiveMQException;
/**
- * Creates a transient queue. A queue that will exist as long as there are consumers. When the last consumer is closed the queue will be deleted
+ * Creates a transient queue. A queue that will exist as long as there are consumers. When the last consumer is
+ * closed the queue will be deleted
*
* Notice: you will get an exception if the address or the filter doesn't match to an already existent queue
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter whether the queue is durable or not
- * @param durable if the queue is durable
+ * @param queueName the name of the queue
+ * @param filter whether the queue is durable or not
+ * @param durable if the queue is durable
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createSharedQueue(QueueConfiguration)} instead
*/
@Deprecated
void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter,
@@ -576,16 +573,17 @@ void createSharedQueue(SimpleString address, RoutingType routingType, SimpleStri
/**
* Creates Shared queue. A queue that will exist as long as there are consumers or is durable.
*
- * @param address the queue will be bound to this address
- * @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter whether the queue is durable or not
- * @param durable if the queue is durable
- * @param maxConsumers how many concurrent consumers will be allowed on this queue
+ * @param address the queue will be bound to this address
+ * @param routingType the routing type for this queue, MULTICAST or ANYCAST
+ * @param queueName the name of the queue
+ * @param filter whether the queue is durable or not
+ * @param durable if the queue is durable
+ * @param maxConsumers how many concurrent consumers will be allowed on this queue
* @param purgeOnNoConsumers whether to delete the contents of the queue when the last consumer disconnects
- * @param exclusive if the queue is exclusive queue
- * @param lastValue if the queue is last value queue
+ * @param exclusive if the queue is exclusive queue
+ * @param lastValue if the queue is last value queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createSharedQueue(QueueConfiguration)} instead
*/
@Deprecated
void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter,
@@ -594,23 +592,24 @@ void createSharedQueue(SimpleString address, RoutingType routingType, SimpleStri
/**
* Creates Shared queue. A queue that will exist as long as there are consumers or is durable.
*
- * @param address the queue will be bound to this address
- * @param queueName the name of the queue
+ * @param address the queue will be bound to this address
+ * @param queueName the name of the queue
* @param queueAttributes attributes for the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createSharedQueue(QueueConfiguration)} instead
*/
@Deprecated
void createSharedQueue(SimpleString address, SimpleString queueName, QueueAttributes queueAttributes) throws ActiveMQException;
-
/**
* Creates a non-temporary queue.
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param durable whether the queue is durable or not
+ * @param queueName the name of the queue
+ * @param durable whether the queue is durable or not
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(String address, RoutingType routingType, String queueName, boolean durable) throws ActiveMQException;
@@ -618,10 +617,11 @@ void createSharedQueue(SimpleString address, RoutingType routingType, SimpleStri
/**
* Creates a non-temporary queue non-durable queue.
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
+ * @param queueName the name of the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(String address, RoutingType routingType, String queueName) throws ActiveMQException;
@@ -629,10 +629,11 @@ void createSharedQueue(SimpleString address, RoutingType routingType, SimpleStri
/**
* Creates a non-temporary queue non-durable queue.
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
+ * @param queueName the name of the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName) throws ActiveMQException;
@@ -640,12 +641,13 @@ void createSharedQueue(SimpleString address, RoutingType routingType, SimpleStri
/**
* Creates a non-temporary queue.
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter only messages which match this filter will be put in the queue
- * @param durable whether the queue is durable or not
+ * @param queueName the name of the queue
+ * @param filter only messages which match this filter will be put in the queue
+ * @param durable whether the queue is durable or not
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter,
@@ -654,12 +656,13 @@ void createQueue(SimpleString address, RoutingType routingType, SimpleString que
/**
* Creates a non-temporaryqueue.
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter only messages which match this filter will be put in the queue
- * @param durable whether the queue is durable or not
+ * @param queueName the name of the queue
+ * @param filter only messages which match this filter will be put in the queue
+ * @param durable whether the queue is durable or not
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(String address, RoutingType routingType, String queueName, String filter, boolean durable) throws ActiveMQException;
@@ -674,6 +677,7 @@ void createQueue(SimpleString address, RoutingType routingType, SimpleString que
* @param durable whether the queue is durable or not
* @param autoCreated whether to mark this queue as autoCreated or not
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter,
@@ -682,15 +686,15 @@ void createQueue(SimpleString address, RoutingType routingType, SimpleString que
/**
* Creates a non-temporary queue.
*
- * @param address the queue will be bound to this address
- * @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter only messages which match this filter will be put in the queue
- * @param durable whether the queue is durable or not
- * @param autoCreated whether to mark this queue as autoCreated or not
- * @param maxConsumers how many concurrent consumers will be allowed on this queue
+ * @param address the queue will be bound to this address
+ * @param routingType the routing type for this queue, MULTICAST or ANYCAST
+ * @param queueName the name of the queue
+ * @param filter only messages which match this filter will be put in the queue
+ * @param durable whether the queue is durable or not
+ * @param autoCreated whether to mark this queue as autoCreated or not
+ * @param maxConsumers how many concurrent consumers will be allowed on this queue
* @param purgeOnNoConsumers whether to delete the contents of the queue when the last consumer disconnects
- * @throws ActiveMQException
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter,
@@ -699,17 +703,17 @@ void createQueue(SimpleString address, RoutingType routingType, SimpleString que
/**
* Creates a non-temporary queue.
*
- * @param address the queue will be bound to this address
- * @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter only messages which match this filter will be put in the queue
- * @param durable whether the queue is durable or not
- * @param autoCreated whether to mark this queue as autoCreated or not
- * @param maxConsumers how many concurrent consumers will be allowed on this queue
+ * @param address the queue will be bound to this address
+ * @param routingType the routing type for this queue, MULTICAST or ANYCAST
+ * @param queueName the name of the queue
+ * @param filter only messages which match this filter will be put in the queue
+ * @param durable whether the queue is durable or not
+ * @param autoCreated whether to mark this queue as autoCreated or not
+ * @param maxConsumers how many concurrent consumers will be allowed on this queue
* @param purgeOnNoConsumers whether to delete the contents of the queue when the last consumer disconnects
- * @param exclusive whether the queue should be exclusive
- * @param lastValue whether the queue should be lastValue
- * @throws ActiveMQException
+ * @param exclusive whether the queue should be exclusive
+ * @param lastValue whether the queue should be lastValue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter,
@@ -718,11 +722,11 @@ void createQueue(SimpleString address, RoutingType routingType, SimpleString que
/**
* Creates a non-temporary queue.
*
- * @param address the queue will be bound to this address
- * @param queueName the name of the queue
- * @param autoCreated whether to mark this queue as autoCreated or not
+ * @param address the queue will be bound to this address
+ * @param queueName the name of the queue
+ * @param autoCreated whether to mark this queue as autoCreated or not
* @param queueAttributes attributes for the queue
- * @throws ActiveMQException
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(SimpleString address, SimpleString queueName, boolean autoCreated, QueueAttributes queueAttributes) throws ActiveMQException;
@@ -737,6 +741,7 @@ void createQueue(SimpleString address, RoutingType routingType, SimpleString que
* @param durable whether the queue is durable or not
* @param autoCreated whether to mark this queue as autoCreated or not
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(String address, RoutingType routingType, String queueName, String filter, boolean durable, boolean autoCreated) throws ActiveMQException;
@@ -744,15 +749,15 @@ void createQueue(SimpleString address, RoutingType routingType, SimpleString que
/**
* Creates a non-temporaryqueue.
*
- * @param address the queue will be bound to this address
- * @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter only messages which match this filter will be put in the queue
- * @param durable whether the queue is durable or not
- * @param autoCreated whether to mark this queue as autoCreated or not
- * @param maxConsumers how many concurrent consumers will be allowed on this queue
+ * @param address the queue will be bound to this address
+ * @param routingType the routing type for this queue, MULTICAST or ANYCAST
+ * @param queueName the name of the queue
+ * @param filter only messages which match this filter will be put in the queue
+ * @param durable whether the queue is durable or not
+ * @param autoCreated whether to mark this queue as autoCreated or not
+ * @param maxConsumers how many concurrent consumers will be allowed on this queue
* @param purgeOnNoConsumers whether to delete the contents of the queue when the last consumer disconnects
- * @throws ActiveMQException
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(String address, RoutingType routingType, String queueName, String filter, boolean durable, boolean autoCreated,
@@ -761,17 +766,17 @@ void createQueue(String address, RoutingType routingType, String queueName, Stri
/**
* Creates a non-temporaryqueue.
*
- * @param address the queue will be bound to this address
- * @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter only messages which match this filter will be put in the queue
- * @param durable whether the queue is durable or not
- * @param autoCreated whether to mark this queue as autoCreated or not
- * @param maxConsumers how many concurrent consumers will be allowed on this queue
+ * @param address the queue will be bound to this address
+ * @param routingType the routing type for this queue, MULTICAST or ANYCAST
+ * @param queueName the name of the queue
+ * @param filter only messages which match this filter will be put in the queue
+ * @param durable whether the queue is durable or not
+ * @param autoCreated whether to mark this queue as autoCreated or not
+ * @param maxConsumers how many concurrent consumers will be allowed on this queue
* @param purgeOnNoConsumers whether to delete the contents of the queue when the last consumer disconnects
- * @param exclusive whether the queue should be exclusive
- * @param lastValue whether the queue should be lastValue
- * @throws ActiveMQException
+ * @param exclusive whether the queue should be exclusive
+ * @param lastValue whether the queue should be lastValue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createQueue(String address, RoutingType routingType, String queueName, String filter, boolean durable, boolean autoCreated,
@@ -780,10 +785,11 @@ void createQueue(String address, RoutingType routingType, String queueName, Stri
/**
* Creates a temporary queue.
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
+ * @param queueName the name of the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleString queueName) throws ActiveMQException;
@@ -791,10 +797,11 @@ void createQueue(String address, RoutingType routingType, String queueName, Stri
/**
* Creates a temporary queue.
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
+ * @param queueName the name of the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createTemporaryQueue(String address, RoutingType routingType, String queueName) throws ActiveMQException;
@@ -802,15 +809,16 @@ void createQueue(String address, RoutingType routingType, String queueName, Stri
/**
* Creates a temporary queue with a filter.
*
- * @param address the queue will be bound to this address
- * @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter only messages which match this filter will be put in the queue
- * @param maxConsumers how many concurrent consumers will be allowed on this queue
+ * @param address the queue will be bound to this address
+ * @param routingType the routing type for this queue, MULTICAST or ANYCAST
+ * @param queueName the name of the queue
+ * @param filter only messages which match this filter will be put in the queue
+ * @param maxConsumers how many concurrent consumers will be allowed on this queue
* @param purgeOnNoConsumers whether to delete the contents of the queue when the last consumer disconnects
- * @param exclusive if the queue is exclusive queue
- * @param lastValue if the queue is last value queue
+ * @param exclusive if the queue is exclusive queue
+ * @param lastValue if the queue is last value queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, int maxConsumers,
@@ -819,10 +827,11 @@ void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleS
/**
* Creates a temporary queue with a filter.
*
- * @param address the queue will be bound to this address
- * @param queueName the name of the queue
+ * @param address the queue will be bound to this address
+ * @param queueName the name of the queue
* @param queueAttributes attributes for the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createTemporaryQueue(SimpleString address, SimpleString queueName, QueueAttributes queueAttributes) throws ActiveMQException;
@@ -830,11 +839,12 @@ void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleS
/**
* Creates a temporary queue with a filter.
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter only messages which match this filter will be put in the queue
+ * @param queueName the name of the queue
+ * @param filter only messages which match this filter will be put in the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter) throws ActiveMQException;
@@ -842,11 +852,12 @@ void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleS
/**
* Creates a temporary queue with a filter.
*
- * @param address the queue will be bound to this address
+ * @param address the queue will be bound to this address
* @param routingType the routing type for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter only messages which match this filter will be put in the queue
+ * @param queueName the name of the queue
+ * @param filter only messages which match this filter will be put in the queue
* @throws ActiveMQException in an exception occurs while creating the queue
+ * @deprecated use {@link #createQueue(QueueConfiguration)} instead
*/
@Deprecated
void createTemporaryQueue(String address, RoutingType routingType, String queueName, String filter) throws ActiveMQException;
@@ -910,13 +921,12 @@ void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleS
/**
* Creates a ClientConsumer to consume or browse messages from the queue with the given name.
*
- * If
- * If
- * If
- * If
- * If
- * If
- * If
- * If
- * If
- * If
- * If
- * If
- * If
- * If
- * If
- * If
+ * It is possible to configure a factory using the setter methods only if no session has been created. Once a session is
+ * created, the configuration is fixed and any call to a setter method will throw an IllegalStateException.
*/
public interface ClientSessionFactory extends AutoCloseable {
@@ -48,10 +49,9 @@ public interface ClientSessionFactory extends AutoCloseable {
ClientSession createTransactedSession() throws ActiveMQException;
/**
- * Creates a non-transacted session.
- * Message sends and acknowledgements are automatically committed by the session. This does not
- * mean that messages are automatically acknowledged, only that when messages are acknowledged,
- * the session will automatically commit the transaction containing the acknowledgements.
+ * Creates a non-transacted session. Message sends and acknowledgements are automatically committed by the
+ * session. This does not mean that messages are automatically acknowledged, only that when messages are
+ * acknowledged, the session will automatically commit the transaction containing the acknowledgements.
*
* @return a non-transacted ClientSession
* @throws ActiveMQException if an exception occurs while creating the session
@@ -61,8 +61,9 @@ public interface ClientSessionFactory extends AutoCloseable {
/**
* Creates a session.
*
- * @param autoCommitSends
- * It is possible to pre-acknowledge messages on the server so that the client can avoid additional network trip
- * to the server to acknowledge messages. While this increase performance, this does not guarantee delivery (as messages
- * can be lost after being pre-acknowledged on the server). Use with caution if your application design permits it.
+ * It is possible to pre-acknowledge messages on the server so that the client can avoid additional network
+ * trip to the server to acknowledge messages. While this increase performance, this does not guarantee delivery (as
+ * messages can be lost after being pre-acknowledged on the server). Use with caution if your application design
+ * permits it.
*
* @param xa whether the session support XA transaction semantic or not
- * @param autoCommitSends
- * It is possible to pre-acknowledge messages on the server so that the client can avoid additional network trip
- * to the server to acknowledge messages. While this increase performance, this does not guarantee delivery (as messages
- * can be lost after being pre-acknowledged on the server). Use with caution if your application design permits it.
+ * It is possible to pre-acknowledge messages on the server so that the client can avoid additional network
+ * trip to the server to acknowledge messages. While this increase performance, this does not guarantee delivery (as
+ * messages can be lost after being pre-acknowledged on the server). Use with caution if your application design
+ * permits it.
*
* @param username the user name
* @param password the user password
* @param xa whether the session support XA transaction semantic or not
- * @param autoCommitSends
- * It is possible to pre-acknowledge messages on the server so that the client can avoid additional network trip
- * to the server to acknowledge messages. While this increase performance, this does not guarantee delivery (as messages
- * can be lost after being pre-acknowledged on the server). Use with caution if your application design permits it.
+ * It is possible to pre-acknowledge messages on the server so that the client can avoid additional network
+ * trip to the server to acknowledge messages. While this increase performance, this does not guarantee delivery (as
+ * messages can be lost after being pre-acknowledged on the server). Use with caution if your application design
+ * permits it.
*
* @param username the user name
* @param password the user password
* @param xa whether the session support XA transaction semantic or not
- * @param autoCommitSends
- * Used to get notification of topology events. After adding a listener to the cluster connection,
- * the listener receives {@link #nodeUP(TopologyMember, boolean)} for all the current topology
- * members.
+ * Used to get notification of topology events. After adding a listener to the cluster connection, the listener receives
+ * {@link #nodeUP(TopologyMember, boolean)} for all the current topology members.
*/
public interface ClusterTopologyListener {
/**
* Triggered when a node joins the cluster.
*
- * @param member
- * @param last if the whole cluster topology is being transmitted (after adding the listener to
- * the cluster connection) this parameter will be {@code true} for the last topology
- * member.
+ * @param last if the whole cluster topology is being transmitted (after adding the listener to the cluster
+ * connection) this parameter will be {@code true} for the last topology member.
*/
void nodeUP(TopologyMember member, boolean last);
/**
* Triggered when a node leaves the cluster.
*
- * @param eventUID
- * @param nodeID the id of the node leaving the cluster
+ * @param nodeID the id of the node leaving the cluster
*/
void nodeDown(long eventUID, String nodeID);
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/FailoverEventListener.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/FailoverEventListener.java
index dae0e6a873d..21e5e171417 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/FailoverEventListener.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/FailoverEventListener.java
@@ -22,7 +22,8 @@
public interface FailoverEventListener {
/**
- * Notifies that a connection state has changed according the specified event type.
* This method is called when failover is detected, if it fails and when it's completed
*
* @param eventType The type of event
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/MessageHandler.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/MessageHandler.java
index 64fa15d3529..8e488405e89 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/MessageHandler.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/MessageHandler.java
@@ -19,8 +19,8 @@
/**
* A MessageHandler is used to receive message asynchronously.
*
- * To receive messages asynchronously, a MessageHandler is set on a ClientConsumer. Every time the
- * consumer will receive a message, it will call the handler's {@code onMessage()} method.
+ * To receive messages asynchronously, a MessageHandler is set on a ClientConsumer. Every time the consumer will receive
+ * a message, it will call the handler's {@code onMessage()} method.
*
* @see ClientConsumer#setMessageHandler(MessageHandler)
*/
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/SendAcknowledgementHandler.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/SendAcknowledgementHandler.java
index ad45a5f9e2c..afc9b9f9cac 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/SendAcknowledgementHandler.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/SendAcknowledgementHandler.java
@@ -19,19 +19,16 @@
import org.apache.activemq.artemis.api.core.Message;
/**
- * A SendAcknowledgementHandler notifies a client when a message sent asynchronously has been
- * received by the server.
+ * A SendAcknowledgementHandler notifies a client when a message sent asynchronously has been received by the server.
*
- * If the session is not blocking when sending durable or non-durable messages, the session can set
- * a SendAcknowledgementHandler to be notified later when the messages has been received by the
- * server. The method {@link #sendAcknowledged(Message)} will be called with the message that was
- * sent asynchronously.
+ * If the session is not blocking when sending durable or non-durable messages, the session can set a
+ * SendAcknowledgementHandler to be notified later when the messages has been received by the server. The method
+ * {@link #sendAcknowledged(Message)} will be called with the message that was sent asynchronously.
*
- * The rate of notification can be controlled through
- * {@link ServerLocator#setConfirmationWindowSize(int)}.
+ * The rate of notification can be controlled through {@link ServerLocator#setConfirmationWindowSize(int)}.
*
- * Notice that this notification will only take place if {@code ConfirmationWindowSize} is set to a
- * positive value at {@link ServerLocator#setConfirmationWindowSize(int)}.
+ * Notice that this notification will only take place if {@code ConfirmationWindowSize} is set to a positive value at
+ * {@link ServerLocator#setConfirmationWindowSize(int)}.
*/
public interface SendAcknowledgementHandler {
@@ -43,10 +40,9 @@ public interface SendAcknowledgementHandler {
void sendAcknowledged(Message message);
default void sendFailed(Message message, Exception e) {
- /**
- * By default ignore failures to preserve compatibility with existing implementations.
- * If the message makes it to the broker and a failure occurs sendAcknowledge() will
- * still be invoked just like it always was.
+ /*
+ * By default ignore failures to preserve compatibility with existing implementations. If the message makes it to
+ * the broker and a failure occurs sendAcknowledge() will still be invoked just like it always was.
*/
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ServerLocator.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ServerLocator.java
index 8e5f9d1d069..0f6848f8bfd 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ServerLocator.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ServerLocator.java
@@ -30,20 +30,17 @@
/**
* The serverLocator locates a server, but beyond that it locates a server based on a list.
*
- * If you are using straight TCP on the configuration, and if you configure your serverLocator to be
- * HA, the locator will always get an updated list of members to the server, the server will send
- * the updated list to the client.
+ * If you are using straight TCP on the configuration, and if you configure your serverLocator to be HA, the locator
+ * will always get an updated list of members to the server, the server will send the updated list to the client.
*
- * If you use UDP or JGroups (exclusively JGroups or UDP), the initial discovery is done by the
- * grouping finder, after the initial connection is made the server will always send updates to the
- * client. But the listeners will listen for updates on grouping.
+ * If you use UDP or JGroups (exclusively JGroups or UDP), the initial discovery is done by the grouping finder, after
+ * the initial connection is made the server will always send updates to the client. But the listeners will listen for
+ * updates on grouping.
*/
public interface ServerLocator extends AutoCloseable {
/**
- * Returns true if close was already called
- *
- * @return {@code true} if closed, {@code false} otherwise.
+ * {@return {@code true} if closed, {@code false} otherwise}
*/
boolean isClosed();
@@ -58,63 +55,55 @@ default void disableFinalizeCheck() {
* Creates a ClientSessionFactory using whatever load balancing policy is in force
*
* @return The ClientSessionFactory
- * @throws Exception
*/
ClientSessionFactory createSessionFactory() throws Exception;
/**
- * Creates a {@link ClientSessionFactory} to a specific server. The server must already be known
- * about by this ServerLocator. This method allows the user to make a connection to a specific
- * server bypassing any load balancing policy in force
+ * Creates a {@link ClientSessionFactory} to a specific server. The server must already be known about by this
+ * ServerLocator. This method allows the user to make a connection to a specific server bypassing any load balancing
+ * policy in force
*
- * @param nodeID
- * @return a ClientSessionFactory instance or {@code null} if the node is not present on the
- * topology
- * @throws Exception if a failure happened in creating the ClientSessionFactory or the
- * ServerLocator does not know about the passed in transportConfiguration
+ * @return a ClientSessionFactory instance or {@code null} if the node is not present on the topology
+ * @throws Exception if a failure happened in creating the ClientSessionFactory or the ServerLocator does not know
+ * about the passed in transportConfiguration
*/
ClientSessionFactory createSessionFactory(String nodeID) throws Exception;
/**
- * Creates a {@link ClientSessionFactory} to a specific server. The server must already be known
- * about by this ServerLocator. This method allows the user to make a connection to a specific
- * server bypassing any load balancing policy in force
+ * Creates a {@link ClientSessionFactory} to a specific server. The server must already be known about by this
+ * ServerLocator. This method allows the user to make a connection to a specific server bypassing any load balancing
+ * policy in force
*
- * @param transportConfiguration
* @return a {@link ClientSessionFactory} instance
- * @throws Exception if a failure happened in creating the ClientSessionFactory or the
- * ServerLocator does not know about the passed in transportConfiguration
+ * @throws Exception if a failure happened in creating the ClientSessionFactory or the ServerLocator does not know
+ * about the passed in transportConfiguration
*/
ClientSessionFactory createSessionFactory(TransportConfiguration transportConfiguration) throws Exception;
/**
- * Creates a {@link ClientSessionFactory} to a specific server. The server must already be known
- * about by this ServerLocator. This method allows the user to make a connection to a specific
- * server bypassing any load balancing policy in force
+ * Creates a {@link ClientSessionFactory} to a specific server. The server must already be known about by this
+ * ServerLocator. This method allows the user to make a connection to a specific server bypassing any load balancing
+ * policy in force
*
- * @param transportConfiguration
- * @param reconnectAttempts number of attempts of reconnection to perform
+ * @param reconnectAttempts number of attempts of reconnection to perform
* @return a {@link ClientSessionFactory} instance
- * @throws Exception if a failure happened in creating the ClientSessionFactory or the
- * ServerLocator does not know about the passed in transportConfiguration
+ * @throws Exception if a failure happened in creating the ClientSessionFactory or the ServerLocator does not know
+ * about the passed in transportConfiguration
*/
ClientSessionFactory createSessionFactory(TransportConfiguration transportConfiguration,
int reconnectAttempts) throws Exception;
/**
- * Creates a {@link ClientSessionFactory} to a specific server. The server must already be known
- * about by this ServerLocator. This method allows the user to make a connection to a specific
- * server bypassing any load balancing policy in force
- *
- * @deprecated This method is no longer acceptable to create a client session factory.
- * Replaced by {@link ServerLocator#createSessionFactory(TransportConfiguration, int)}.
+ * Creates a {@link ClientSessionFactory} to a specific server. The server must already be known about by this
+ * ServerLocator. This method allows the user to make a connection to a specific server bypassing any load balancing
+ * policy in force
*
- * @param transportConfiguration
- * @param reconnectAttempts number of attempts of reconnection to perform
- * @param failoverOnInitialConnection
+ * @param reconnectAttempts number of attempts of reconnection to perform
* @return a {@link ClientSessionFactory} instance
- * @throws Exception if a failure happened in creating the ClientSessionFactory or the
- * ServerLocator does not know about the passed in transportConfiguration
+ * @throws Exception if a failure happened in creating the ClientSessionFactory or the ServerLocator does not know
+ * about the passed in transportConfiguration
+ * @deprecated This method is no longer acceptable to create a client session factory. Replaced by
+ * {@link ServerLocator#createSessionFactory(TransportConfiguration, int)}.
*/
@Deprecated
ClientSessionFactory createSessionFactory(TransportConfiguration transportConfiguration,
@@ -124,16 +113,14 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Returns the period used to check if a client has failed to receive pings from the server.
*
- * Period is in milliseconds, default value is
- * {@link ActiveMQClient#DEFAULT_CLIENT_FAILURE_CHECK_PERIOD}.
+ * Period is in milliseconds, default value is {@link ActiveMQClient#DEFAULT_CLIENT_FAILURE_CHECK_PERIOD}.
*
* @return the period used to check if a client has failed to receive pings from the server
*/
long getClientFailureCheckPeriod();
/**
- * Sets the period (in milliseconds) used to check if a client has failed to receive pings from
- * the server.
+ * Sets the period (in milliseconds) used to check if a client has failed to receive pings from the server.
*
* Value must be -1 (to disable) or greater than 0.
*
@@ -143,22 +130,22 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
ServerLocator setClientFailureCheckPeriod(long clientFailureCheckPeriod);
/**
- * When
* There is 1 temporary file created for each large message.
*
* Default value is {@link ActiveMQClient#DEFAULT_CACHE_LARGE_MESSAGE_CLIENT}.
*
- * @return
- * This TTL determines how long the server will keep a connection alive in the absence of any
- * data arriving from the client. Value is in milliseconds, default value is
- * {@link ActiveMQClient#DEFAULT_CONNECTION_TTL}.
+ * This TTL determines how long the server will keep a connection alive in the absence of any data arriving from the
+ * client. Value is in milliseconds, default value is {@link ActiveMQClient#DEFAULT_CONNECTION_TTL}.
*
* @return the connection time-to-live in milliseconds
*/
@@ -188,8 +174,9 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
* Returns the blocking calls timeout.
*
* If client's blocking calls to the server take more than this timeout, the call will throw a
- * {@link org.apache.activemq.artemis.api.core.ActiveMQException} with the code {@link org.apache.activemq.artemis.api.core.ActiveMQExceptionType#CONNECTION_TIMEDOUT}. Value
- * is in milliseconds, default value is {@link ActiveMQClient#DEFAULT_CALL_TIMEOUT}.
+ * {@link org.apache.activemq.artemis.api.core.ActiveMQException} with the code
+ * {@link org.apache.activemq.artemis.api.core.ActiveMQExceptionType#CONNECTION_TIMEDOUT}. Value is in milliseconds,
+ * default value is {@link ActiveMQClient#DEFAULT_CALL_TIMEOUT}.
*
* @return the blocking calls timeout
*/
@@ -206,11 +193,11 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
ServerLocator setCallTimeout(long callTimeout);
/**
- * Returns the blocking calls failover timeout when the client is awaiting failover,
- * this is over and above the normal call timeout.
+ * Returns the blocking calls failover timeout when the client is awaiting failover, this is over and above the
+ * normal call timeout.
*
- * If client is in the process of failing over when a blocking call is called then the client will wait this long before
- * actually trying the send.
+ * If client is in the process of failing over when a blocking call is called then the client will wait this long
+ * before actually trying the send.
*
* @return the blocking calls failover timeout
*/
@@ -231,10 +218,10 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Returns the large message size threshold.
*
- * Messages whose size is if greater than this value will be handled as large messages.
- * Value is in bytes, default value is {@link ActiveMQClient#DEFAULT_MIN_LARGE_MESSAGE_SIZE}.
+ * Messages whose size is if greater than this value will be handled as large messages. Value is in bytes,
+ * default value is {@link ActiveMQClient#DEFAULT_MIN_LARGE_MESSAGE_SIZE}.
*
- * @return the message size threshold to treat messages as large messages.
+ * @return the message size threshold to treat messages as large messages
*/
int getMinLargeMessageSize();
@@ -260,8 +247,8 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Sets the window size for flow control of the consumers created through this factory.
*
- * Value must be -1 (to disable flow control), 0 (to not buffer any messages) or greater than 0
- * (to set the maximum size of the buffer)
+ * Value must be -1 (to disable flow control), 0 (to not buffer any messages) or greater than 0 (to set the maximum
+ * size of the buffer)
*
* @param consumerWindowSize window size (in bytes) used for consumer flow control
* @return this ServerLocator
@@ -271,10 +258,11 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Returns the maximum rate of message consumption for consumers created through this factory.
*
- * This value controls the rate at which a consumer can consume messages. A consumer will never consume messages at a rate faster than the rate specified.
+ * This value controls the rate at which a consumer can consume messages. A consumer will never consume messages at a
+ * rate faster than the rate specified.
*
- * Value is -1 (to disable) or a positive integer corresponding to the maximum desired message consumption rate specified in units of messages per second.
- * Default value is {@link ActiveMQClient#DEFAULT_CONSUMER_MAX_RATE}.
+ * Value is -1 (to disable) or a positive integer corresponding to the maximum desired message consumption rate
+ * specified in units of messages per second. Default value is {@link ActiveMQClient#DEFAULT_CONSUMER_MAX_RATE}.
*
* @return the consumer max rate
*/
@@ -283,7 +271,8 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Sets the maximum rate of message consumption for consumers created through this factory.
*
- * Value must -1 (to disable) or a positive integer corresponding to the maximum desired message consumption rate specified in units of messages per second.
+ * Value must -1 (to disable) or a positive integer corresponding to the maximum desired message consumption rate
+ * specified in units of messages per second.
*
* @param consumerMaxRate maximum rate of message consumption (in messages per seconds)
* @return this ServerLocator
@@ -313,10 +302,11 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Returns the window size for flow control of the producers created through this factory.
*
- * Value must be -1 (to disable flow control) or greater than 0 to determine the maximum amount of bytes at any give time (to prevent overloading the connection).
- * Default value is {@link ActiveMQClient#DEFAULT_PRODUCER_WINDOW_SIZE}.
+ * Value must be -1 (to disable flow control) or greater than 0 to determine the maximum amount of bytes at any give
+ * time (to prevent overloading the connection). Default value is
+ * {@link ActiveMQClient#DEFAULT_PRODUCER_WINDOW_SIZE}.
*
- * @return the window size for flow control of the producers created through this factory.
+ * @return the window size for flow control of the producers created through this factory
*/
int getProducerWindowSize();
@@ -333,10 +323,11 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Returns the maximum rate of message production for producers created through this factory.
*
- * This value controls the rate at which a producer can produce messages. A producer will never produce messages at a rate faster than the rate specified.
+ * This value controls the rate at which a producer can produce messages. A producer will never produce messages at a
+ * rate faster than the rate specified.
*
- * Value is -1 (to disable) or a positive integer corresponding to the maximum desired message production rate specified in units of messages per second.
- * Default value is {@link ActiveMQClient#DEFAULT_PRODUCER_MAX_RATE}.
+ * Value is -1 (to disable) or a positive integer corresponding to the maximum desired message production rate
+ * specified in units of messages per second. Default value is {@link ActiveMQClient#DEFAULT_PRODUCER_MAX_RATE}.
*
* @return maximum rate of message production (in messages per seconds)
*/
@@ -345,7 +336,8 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Sets the maximum rate of message production for producers created through this factory.
*
- * Value must -1 (to disable) or a positive integer corresponding to the maximum desired message production rate specified in units of messages per second.
+ * Value must -1 (to disable) or a positive integer corresponding to the maximum desired message production rate
+ * specified in units of messages per second.
*
* @param producerMaxRate maximum rate of message production (in messages per seconds)
* @return this ServerLocator
@@ -353,32 +345,31 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
ServerLocator setProducerMaxRate(int producerMaxRate);
/**
- * Returns whether consumers created through this factory will block while
- * sending message acknowledgments or do it asynchronously.
+ * Returns whether consumers created through this factory will block while sending message acknowledgments or do it
+ * asynchronously.
*
* Default value is {@link ActiveMQClient#DEFAULT_BLOCK_ON_ACKNOWLEDGE}.
*
- * @return whether consumers will block while sending message
- * acknowledgments or do it asynchronously
+ * @return whether consumers will block while sending message acknowledgments or do it asynchronously
*/
boolean isBlockOnAcknowledge();
/**
- * Sets whether consumers created through this factory will block while
- * sending message acknowledgments or do it asynchronously.
+ * Sets whether consumers created through this factory will block while sending message acknowledgments or do it
+ * asynchronously.
*
- * @param blockOnAcknowledge
+ * If the session is configured to send durable message asynchronously, the client can set a
+ * SendAcknowledgementHandler on the ClientSession to be notified once the message has been handled by the server.
*
* Default value is {@link ActiveMQClient#DEFAULT_BLOCK_ON_DURABLE_SEND}.
*
@@ -387,18 +378,21 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
boolean isBlockOnDurableSend();
/**
- * Sets whether producers created through this factory will block while sending durable messages or do it asynchronously.
+ * Sets whether producers created through this factory will block while sending durable messages or do it
+ * asynchronously.
*
- * @param blockOnDurableSend
+ * If the session is configured to send non-durable message asynchronously, the client can set a
+ * SendAcknowledgementHandler on the ClientSession to be notified once the message has been handled by the server.
*
* Default value is {@link ActiveMQClient#DEFAULT_BLOCK_ON_NON_DURABLE_SEND}.
*
@@ -407,36 +401,40 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
boolean isBlockOnNonDurableSend();
/**
- * Sets whether producers created through this factory will block while sending non-durable messages or do it asynchronously.
+ * Sets whether producers created through this factory will block while sending non-durable messages or do
+ * it asynchronously.
*
- * @param blockOnNonDurableSend
- * if
* Default value is is {@code null} and no group ID will be set on the messages.
*
@@ -460,12 +458,10 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
boolean isPreAcknowledge();
/**
- * Sets to
* Default value is {@link ActiveMQClient#DEFAULT_USE_GLOBAL_POOLS}.
*
- * @return
* Default value is {@link ActiveMQClient#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}.
*
- * @return the maximum size of the scheduled thread pool.
+ * @return the maximum size of the scheduled thread pool
*/
int getScheduledThreadPoolMaxSize();
/**
* Sets the maximum size of the scheduled thread pool.
*
- * This setting is relevant only if this factory does not use global pools.
- * Value must be greater than 0.
+ * This setting is relevant only if this factory does not use global pools. Value must be greater than 0.
*
* @param scheduledThreadPoolMaxSize maximum size of the scheduled thread pool.
* @return this ServerLocator
@@ -546,15 +541,15 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
*
* Default value is {@link ActiveMQClient#DEFAULT_THREAD_POOL_MAX_SIZE}.
*
- * @return the maximum size of the thread pool.
+ * @return the maximum size of the thread pool
*/
int getThreadPoolMaxSize();
/**
* Sets the maximum size of the thread pool.
*
- * This setting is relevant only if this factory does not use global pools.
- * Value must be -1 (for unlimited thread pool) or greater than 0.
+ * This setting is relevant only if this factory does not use global pools. Value must be -1 (for unlimited thread
+ * pool) or greater than 0.
*
* @param threadPoolMaxSize maximum size of the thread pool.
* @return this ServerLocator
@@ -566,15 +561,15 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
*
* Default value is {@link ActiveMQClient#DEFAULT_FLOW_CONTROL_THREAD_POOL_MAX_SIZE}.
*
- * @return the maximum size of the flow-control thread pool.
+ * @return the maximum size of the flow-control thread pool
*/
int getFlowControlThreadPoolMaxSize();
/**
* Sets the maximum size of the flow-control thread pool.
*
- * This setting is relevant only if this factory does not use global pools.
- * Value must be -1 (for unlimited thread pool) or greater than 0.
+ * This setting is relevant only if this factory does not use global pools. Value must be -1 (for unlimited thread
+ * pool) or greater than 0.
*
* @param flowControlThreadPoolMaxSize maximum size of the flow-control thread pool.
* @return this ServerLocator
@@ -633,8 +628,8 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
*
* Value must be greater than 0.
*
- * @param maxRetryInterval maximum retry interval to apply in the case a retry interval multiplier
- * has been specified
+ * @param maxRetryInterval maximum retry interval to apply in the case a retry interval multiplier has been
+ * specified
* @return this ServerLocator
*/
ServerLocator setMaxRetryInterval(long maxRetryInterval);
@@ -644,7 +639,7 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
*
* Default value is {@link ActiveMQClient#DEFAULT_RECONNECT_ATTEMPTS}.
*
- * @return the maximum number of attempts to retry connection in case of failure.
+ * @return the maximum number of attempts to retry connection in case of failure
*/
int getReconnectAttempts();
@@ -669,12 +664,13 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
ServerLocator setInitialConnectAttempts(int reconnectAttempts);
/**
- * @return the number of attempts to be made for first initial connection.
+ * {@return the number of attempts to be made for first initial connection}
*/
int getInitialConnectAttempts();
/**
- * Sets the maximum number of failover attempts to establish a connection to other primary servers after a connection failure.
+ * Sets the maximum number of failover attempts to establish a connection to other primary servers after a connection
+ * failure.
*
* Value must be -1 (to retry infinitely), 0 (to never retry connection) or greater than 0.
*
@@ -684,13 +680,13 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
ServerLocator setFailoverAttempts(int attempts);
/**
- * @return the number of failover attempts after a connection failure.
+ * {@return the number of failover attempts after a connection failure}
*/
int getFailoverAttempts();
/**
- * Returns true if the client will automatically attempt to connect to the backup server if the initial
- * connection to the primary server fails
+ * Returns true if the client will automatically attempt to connect to the backup server if the initial connection to
+ * the primary server fails
*
* Default value is {@link ActiveMQClient#DEFAULT_FAILOVER_ON_INITIAL_CONNECTION}.
*/
@@ -700,7 +696,6 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Sets the value for FailoverOnInitialReconnection
*
- * @param failover
* @return this ServerLocator
*/
@Deprecated
@@ -709,7 +704,8 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Returns the class name of the connection load balancing policy.
*
- * Default value is "org.apache.activemq.artemis.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy".
+ * Default value is
+ * "org.apache.activemq.artemis.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy".
*
* @return the class name of the connection load balancing policy
*/
@@ -718,7 +714,8 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Sets the class name of the connection load balancing policy.
*
- * Value must be the name of a class implementing {@link org.apache.activemq.artemis.api.core.client.loadbalance.ConnectionLoadBalancingPolicy}.
+ * Value must be the name of a class implementing
+ * {@link org.apache.activemq.artemis.api.core.client.loadbalance.ConnectionLoadBalancingPolicy}.
*
* @param loadBalancingPolicyClassName class name of the connection load balancing policy
* @return this ServerLocator
@@ -754,11 +751,13 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
int getOnMessageCloseTimeout();
/**
- * Sets the timeout in milliseconds for onMessage completion when closing ClientConsumers created through this factory.
+ * Sets the timeout in milliseconds for onMessage completion when closing ClientConsumers created through this
+ * factory.
*
* A value of -1 means wait until the onMessage completes no matter how long it takes.
*
- * @param onMessageCloseTimeout how long to wait in milliseconds for the ClientConsumer's MessageHandler's onMessage method to finish before closing or stopping the ClientConsumer.
+ * @param onMessageCloseTimeout how long to wait in milliseconds for the ClientConsumer's MessageHandler's onMessage
+ * method to finish before closing or stopping the ClientConsumer.
* @return this ServerLocator
*/
ServerLocator setOnMessageCloseTimeout(int onMessageCloseTimeout);
@@ -783,7 +782,7 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
* Removes an incoming interceptor.
*
* @param interceptor interceptor to remove
- * @return
* This method is called before the session attempts to reconnect/failover.
*
* @param exception exception which has caused the connection to fail
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/TopologyMember.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/TopologyMember.java
index da4f4e1f942..603fcd11fc1 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/TopologyMember.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/TopologyMember.java
@@ -21,18 +21,17 @@
/**
* A member of the topology.
- *
- * Each TopologyMember represents a single server and possibly any backup server that may take over
- * its duties (using the nodeId of the original server).
+ *
+ * Each TopologyMember represents a single server and possibly any backup server that may take over its duties (using
+ * the nodeId of the original server).
*/
public interface TopologyMember {
/**
- * Returns the {@code backup-group-name} of the primary server and backup servers associated with
- * Topology entry.
+ * Returns the {@code backup-group-name} of the primary server and backup servers associated with Topology entry.
*
- * This is a server configuration value. A (remote) backup will only work with primary servers that
- * have a matching {@code backup-group-name}.
+ * This is a server configuration value. A (remote) backup will only work with primary servers that have a matching
+ * {@code backup-group-name}.
*
* This value does not apply to "shared-storage" backup and primary pairs.
*
@@ -43,57 +42,46 @@ public interface TopologyMember {
/**
* Returns the {@code scale-down-group-name} of the server with this Topology entry.
*
- * This is a server configuration value. An active server will only send its messages to another active server
- * with matching {@code scale-down-group-name}.
+ * This is a server configuration value. An active server will only send its messages to another active server with
+ * matching {@code scale-down-group-name}.
*
* @return the {@code scale-down-group-name}
*/
String getScaleDownGroupName();
/**
- * @return configuration relative to the live server
+ * {@return configuration relative to the live server}
*/
@Deprecated(forRemoval = true)
TransportConfiguration getLive();
/**
- * @return configuration relative to the primary server
+ * {@return configuration relative to the primary server}
*/
TransportConfiguration getPrimary();
/**
- * Returns the TransportConfiguration relative to the backup server if any.
- *
- * @return a {@link TransportConfiguration} for the backup, or null if the primary server has no
- * backup server.
+ * {@return a {@link TransportConfiguration} for the backup, or null if the primary server has no backup server.}
*/
TransportConfiguration getBackup();
/**
- * Returns the nodeId of the server.
- *
- * @return the nodeId
+ * {@return the nodeId of the server}
*/
String getNodeId();
/**
- * @return long value representing a unique event ID
+ * {@return long value representing a unique event ID}
*/
long getUniqueEventID();
/**
- * Returns true if this TopologyMember is the target of this remoting connection
- *
- * @param connection
- * @return
+ * {@return {@code true} if this {@code TopologyMember} is the target of this remoting connection}
*/
boolean isMember(RemotingConnection connection);
/**
- * Returns true if this configuration is the target of this remoting connection
- *
- * @param configuration
- * @return
+ * {@return {@code true} if this configuration is the target of this remoting connection}
*/
boolean isMember(TransportConfiguration configuration);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java
index e411c9c2fd9..a7ef7965914 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java
@@ -19,8 +19,8 @@
import org.apache.activemq.artemis.utils.RandomUtil;
/**
- * {@link RandomConnectionLoadBalancingPolicy#select(int)} returns a (pseudo) random integer between
- * {@code 0} (inclusive) and {@code max} (exclusive).
+ * {@link RandomConnectionLoadBalancingPolicy#select(int)} returns a (pseudo) random integer between {@code 0}
+ * (inclusive) and {@code max} (exclusive).
*/
public final class RandomConnectionLoadBalancingPolicy implements ConnectionLoadBalancingPolicy {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomStickyConnectionLoadBalancingPolicy.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomStickyConnectionLoadBalancingPolicy.java
index 12c59fd151c..4d6b82e8a31 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomStickyConnectionLoadBalancingPolicy.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomStickyConnectionLoadBalancingPolicy.java
@@ -19,7 +19,8 @@
import org.apache.activemq.artemis.utils.RandomUtil;
/**
- * {@link RandomConnectionLoadBalancingPolicy#select(int)} chooses a the initial node randomly then subsequent requests return the same node
+ * {@link RandomConnectionLoadBalancingPolicy#select(int)} chooses a the initial node randomly then subsequent requests
+ * return the same node
*/
public final class RandomStickyConnectionLoadBalancingPolicy implements ConnectionLoadBalancingPolicy {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java
index 60ad022cd82..41c9ea74d79 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java
@@ -22,10 +22,9 @@
/**
* RoundRobinConnectionLoadBalancingPolicy corresponds to a round-robin load-balancing policy.
- *
- *
+ * The first call to {@link #select(int)} will return a random integer between {@code 0} (inclusive) and {@code max}
+ * (exclusive). Subsequent calls will then return an integer in a round-robin fashion.
*/
public final class RoundRobinConnectionLoadBalancingPolicy implements ConnectionLoadBalancingPolicy, Serializable {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelManager.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelManager.java
index 88a98c09ad7..8f7e099139b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelManager.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelManager.java
@@ -25,11 +25,10 @@
import java.lang.invoke.MethodHandles;
/**
- * This class maintain a global Map of JChannels wrapped in JChannelWrapper for
- * the purpose of reference counting.
- *
- * Wherever a JChannel is needed it should only get it by calling the getChannel()
- * method of this class. The real disconnect of channels are also done here only.
+ * This class maintain a global Map of JChannels wrapped in JChannelWrapper for the purpose of reference counting.
+ *
+ * Wherever a JChannel is needed it should only get it by calling the getChannel() method of this class. The real
+ * disconnect of channels are also done here only.
*/
public class JChannelManager {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java
index 3b28912aa93..638ba0ecf32 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java
@@ -27,9 +27,8 @@
import java.lang.invoke.MethodHandles;
/**
- * This class wraps a JChannel with a reference counter. The reference counter
- * controls the life of the JChannel. When reference count is zero, the channel
- * will be disconnected.
+ * This class wraps a JChannel with a reference counter. The reference counter controls the life of the JChannel. When
+ * reference count is zero, the channel will be disconnected.
*/
public class JChannelWrapper {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java
index efaf1310c17..f6df42c7952 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java
@@ -26,8 +26,7 @@
import org.jgroups.Receiver;
/**
- * This class is used to receive messages from a JGroups channel.
- * Incoming messages are put into a queue.
+ * This class is used to receive messages from a JGroups channel. Incoming messages are put into a queue.
*/
public class JGroupsReceiver implements Receiver {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AcceptorControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AcceptorControl.java
index a2c0604553d..77da88cc804 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AcceptorControl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AcceptorControl.java
@@ -25,27 +25,26 @@
public interface AcceptorControl extends ActiveMQComponentControl {
/**
- * Returns the name of the acceptor
+ * {@return the name of the acceptor}
*/
@Attribute(desc = "name of the acceptor")
String getName();
/**
- * Returns the class name of the AcceptorFactory implementation
- * used by this acceptor.
+ * {@return the class name of the AcceptorFactory implementation used by this acceptor}
*/
@Attribute(desc = "class name of the AcceptorFactory implementation used by this acceptor")
String getFactoryClassName();
/**
- * Returns the parameters used to configure this acceptor
+ * {@return the parameters used to configure this acceptor}
*/
@Attribute(desc = "parameters used to configure this acceptor")
Map
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exits.
*
* @param address address to bind the queue to
* @param name name of the queue
@@ -573,10 +566,11 @@ void createQueue(@Parameter(name = "address", desc = "Address of the queue") Str
/**
* Create a durable queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exits.
*
* @param address address to bind the queue to
* @param name name of the queue
@@ -590,10 +584,11 @@ void createQueue(@Parameter(name = "address", desc = "Address of the queue") Str
/**
* Create a queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exits.
*
* @param address address to bind the queue to
* @param name name of the queue
@@ -607,10 +602,11 @@ void createQueue(@Parameter(name = "address", desc = "Address of the queue") Str
/**
* Create a queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exits.
*
* @param address address to bind the queue to
* @param name name of the queue
@@ -624,13 +620,13 @@ void createQueue(@Parameter(name = "address", desc = "Address of the queue") Str
@Parameter(name = "durable", desc = "Is the queue durable?") boolean durable,
@Parameter(name = "routingType", desc = "The routing type used for this address, MULTICAST or ANYCAST") String routingType) throws Exception;
-
/**
* Create a queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exits.
*
* @param address address to bind the queue to
* @param name name of the queue
@@ -646,10 +642,11 @@ void createQueue(@Parameter(name = "address", desc = "Address of the queue") Str
/**
* Create a queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exits.
*
* @param address address to bind the queue to
* @param name name of the queue
@@ -667,25 +664,25 @@ void createQueue(@Parameter(name = "address", desc = "Address of the queue") Str
/**
* Create a queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exits.
*
- * @param address address to bind the queue to
- * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
- * @param name name of the queue
- * @param filterStr filter of the queue
- * @param durable is the queue durable?
- * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
- * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
- * @param exclusive if the queue should route exclusively to one consumer
- * @param lastValue use last-value semantics
+ * @param address address to bind the queue to
+ * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
+ * @param name name of the queue
+ * @param filterStr filter of the queue
+ * @param durable is the queue durable?
+ * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
+ * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
+ * @param exclusive if the queue should route exclusively to one consumer
+ * @param lastValue use last-value semantics
* @param consumersBeforeDispatch number of consumers needed before dispatch can start
- * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
- * @param autoCreateAddress create an address with default values should a matching address not be found
+ * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
+ * @param autoCreateAddress create an address with default values should a matching address not be found
* @return a textual summary of the queue
- * @throws Exception
*/
@Deprecated
@Operation(desc = "Create a queue", impact = MBeanOperationInfo.ACTION)
@@ -706,28 +703,27 @@ String createQueue(@Parameter(name = "address", desc = "Address of the queue") S
@Parameter(name = "delayBeforeDispatch", desc = "Delay to wait before dispatching if number of consumers before dispatch is not met") long delayBeforeDispatch,
@Parameter(name = "autoCreateAddress", desc = "Create an address with default values should a matching address not be found") boolean autoCreateAddress) throws Exception;
-
/**
* Create a queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exits.
*
- * @param address address to bind the queue to
- * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
- * @param name name of the queue
- * @param filterStr filter of the queue
- * @param durable is the queue durable?
- * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
- * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
- * @param exclusive if the queue should route exclusively to one consumer
- * @param lastValue use last-value semantics
+ * @param address address to bind the queue to
+ * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
+ * @param name name of the queue
+ * @param filterStr filter of the queue
+ * @param durable is the queue durable?
+ * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
+ * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
+ * @param exclusive if the queue should route exclusively to one consumer
+ * @param lastValue use last-value semantics
* @param consumersBeforeDispatch number of consumers needed before dispatch can start
- * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
- * @param autoCreateAddress create an address with default values should a matching address not be found
+ * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
+ * @param autoCreateAddress create an address with default values should a matching address not be found
* @return a textual summary of the queue
- * @throws Exception
*/
@Deprecated
@Operation(desc = "Create a queue", impact = MBeanOperationInfo.ACTION)
@@ -753,25 +749,25 @@ String createQueue(@Parameter(name = "address", desc = "Address of the queue") S
/**
* Create a queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exits.
*
- * @param address address to bind the queue to
- * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
- * @param name name of the queue
- * @param filterStr filter of the queue
- * @param durable is the queue durable?
- * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
- * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
- * @param exclusive if the queue should route exclusively to one consumer
- * @param lastValue use last-value semantics
+ * @param address address to bind the queue to
+ * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
+ * @param name name of the queue
+ * @param filterStr filter of the queue
+ * @param durable is the queue durable?
+ * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
+ * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
+ * @param exclusive if the queue should route exclusively to one consumer
+ * @param lastValue use last-value semantics
* @param consumersBeforeDispatch number of consumers needed before dispatch can start
- * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
- * @param autoCreateAddress create an address with default values should a matching address not be found
+ * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
+ * @param autoCreateAddress create an address with default values should a matching address not be found
* @return a textual summary of the queue
- * @throws Exception
*/
@Deprecated
@Operation(desc = "Create a queue", impact = MBeanOperationInfo.ACTION)
@@ -798,26 +794,26 @@ String createQueue(@Parameter(name = "address", desc = "Address of the queue") S
/**
* Create a queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exits.
*
- * @param address address to bind the queue to
- * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
- * @param name name of the queue
- * @param filterStr filter of the queue
- * @param durable is the queue durable?
- * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
- * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
- * @param exclusive if the queue should route exclusively to one consumer
- * @param lastValue use last-value semantics
+ * @param address address to bind the queue to
+ * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
+ * @param name name of the queue
+ * @param filterStr filter of the queue
+ * @param durable is the queue durable?
+ * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
+ * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
+ * @param exclusive if the queue should route exclusively to one consumer
+ * @param lastValue use last-value semantics
* @param consumersBeforeDispatch number of consumers needed before dispatch can start
- * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
- * @param autoCreateAddress create an address with default values should a matching address not be found
- * @param ringSize the size this queue should maintain according to ring semantics
+ * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
+ * @param autoCreateAddress create an address with default values should a matching address not be found
+ * @param ringSize the size this queue should maintain according to ring semantics
* @return a textual summary of the queue
- * @throws Exception
*/
@Deprecated
@Operation(desc = "Create a queue", impact = MBeanOperationInfo.ACTION)
@@ -845,10 +841,11 @@ String createQueue(@Parameter(name = "address", desc = "Address of the queue") S
/**
* Create a queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exits.
*
* @param address address to bind the queue to
* @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
@@ -859,7 +856,6 @@ String createQueue(@Parameter(name = "address", desc = "Address of the queue") S
* @param purgeOnNoConsumers delete this queue when the last consumer disconnects
* @param autoCreateAddress create an address with default values should a matching address not be found
* @return a textual summary of the queue
- * @throws Exception
*/
@Deprecated
@Operation(desc = "Create a queue", impact = MBeanOperationInfo.ACTION)
@@ -871,39 +867,38 @@ String createQueue(@Parameter(name = "address", desc = "Address of the queue") S
@Parameter(name = "maxConsumers", desc = "The maximum number of consumers allowed on this queue at any one time") int maxConsumers,
@Parameter(name = "purgeOnNoConsumers", desc = "Delete this queue when the last consumer disconnects") boolean purgeOnNoConsumers,
@Parameter(name = "autoCreateAddress", desc = "Create an address with default values should a matching address not be found") boolean autoCreateAddress) throws Exception;
+
/**
* Create a queue.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exists.
*
* @param queueConfiguration the configuration of the queue in JSON format
* @return the configuration of the created queue in JSON format
- * @throws Exception
*/
@Operation(desc = "Create a queue", impact = MBeanOperationInfo.ACTION)
String createQueue(@Parameter(name = "queueConfiguration", desc = "the configuration of the queue in JSON format") String queueConfiguration) throws Exception;
/**
* Create a queue.
- *
+ * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the
+ * queue already exists and {@code ignoreIfExists} is {@code false}.
*
* @param queueConfiguration the configuration of the queue in JSON format
- * @param ignoreIfExists whether or not to simply return without an exception if the queue exists
+ * @param ignoreIfExists whether to simply return without an exception if the queue exists
* @return the configuration of the created queue in JSON format
- * @throws Exception
*/
@Operation(desc = "Create a queue", impact = MBeanOperationInfo.ACTION)
String createQueue(@Parameter(name = "queueConfiguration", desc = "the configuration of the queue in JSON format") String queueConfiguration,
@Parameter(name = "ignoreIfExists", desc = "whether or not to try to create the queue if it exists already") boolean ignoreIfExists) throws Exception;
-
/**
* Update a queue.
*
* @param queueConfiguration the configuration of the queue in JSON format
* @return the configuration of the created queue in JSON format
- * @throws Exception
*/
@Operation(desc = "Update a queue", impact = MBeanOperationInfo.ACTION)
String updateQueue(@Parameter(name = "queueConfiguration", desc = "the configuration of the queue in JSON format") String queueConfiguration) throws Exception;
@@ -916,7 +911,6 @@ String createQueue(@Parameter(name = "queueConfiguration", desc = "the configura
* @param maxConsumers the maximum number of consumers allowed on this queue at any one time
* @param purgeOnNoConsumers delete this queue when the last consumer disconnects
* @return a textual summary of the queue
- * @throws Exception
*/
@Deprecated
@Operation(desc = "Update a queue", impact = MBeanOperationInfo.ACTION)
@@ -934,7 +928,6 @@ String updateQueue(@Parameter(name = "name", desc = "Name of the queue") String
* @param purgeOnNoConsumers delete this queue when the last consumer disconnects
* @param exclusive if the queue should route exclusively to one consumer
* @return a textual summary of the queue
- * @throws Exception
*/
@Deprecated
@Operation(desc = "Update a queue", impact = MBeanOperationInfo.ACTION)
@@ -953,8 +946,6 @@ String updateQueue(@Parameter(name = "name", desc = "Name of the queue") String
* @param purgeOnNoConsumers delete this queue when the last consumer disconnects
* @param exclusive if the queue should route exclusively to one consumer
* @param user the user associated with this queue
- * @return
- * @throws Exception
*/
@Deprecated
@Operation(desc = "Update a queue", impact = MBeanOperationInfo.ACTION)
@@ -968,20 +959,19 @@ String updateQueue(@Parameter(name = "name", desc = "Name of the queue") String
/**
* Update a queue
*
- * @param name name of the queue
- * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
- * @param filter the filter to use on the queue
- * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
- * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
- * @param exclusive if the queue should route exclusively to one consumer
- * @param groupRebalance if the queue should rebalance groups when a consumer is added
- * @param groupBuckets number of buckets that should be used for message groups, -1 (default) is unlimited, and groups by raw key instead
- * @param nonDestructive If the queue is non-destructive
+ * @param name name of the queue
+ * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
+ * @param filter the filter to use on the queue
+ * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
+ * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
+ * @param exclusive if the queue should route exclusively to one consumer
+ * @param groupRebalance if the queue should rebalance groups when a consumer is added
+ * @param groupBuckets number of buckets that should be used for message groups, -1 (default) is
+ * unlimited, and groups by raw key instead
+ * @param nonDestructive If the queue is non-destructive
* @param consumersBeforeDispatch number of consumers needed before dispatch can start
- * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
- * @param user the user associated with this queue
- * @return
- * @throws Exception
+ * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
+ * @param user the user associated with this queue
*/
@Deprecated
@Operation(desc = "Update a queue", impact = MBeanOperationInfo.ACTION)
@@ -1001,21 +991,20 @@ String updateQueue(@Parameter(name = "name", desc = "Name of the queue") String
/**
* Update a queue
*
- * @param name name of the queue
- * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
- * @param filter the filter to use on the queue
- * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
- * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
- * @param exclusive if the queue should route exclusively to one consumer
- * @param groupRebalance if the queue should rebalance groups when a consumer is added
- * @param groupBuckets number of buckets that should be used for message groups, -1 (default) is unlimited, and groups by raw key instead
- * @param groupFirstKey key used to mark a message is first in a group for a consumer
- * @param nonDestructive If the queue is non-destructive
+ * @param name name of the queue
+ * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
+ * @param filter the filter to use on the queue
+ * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
+ * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
+ * @param exclusive if the queue should route exclusively to one consumer
+ * @param groupRebalance if the queue should rebalance groups when a consumer is added
+ * @param groupBuckets number of buckets that should be used for message groups, -1 (default) is
+ * unlimited, and groups by raw key instead
+ * @param groupFirstKey key used to mark a message is first in a group for a consumer
+ * @param nonDestructive If the queue is non-destructive
* @param consumersBeforeDispatch number of consumers needed before dispatch can start
- * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
- * @param user the user associated with this queue
- * @return
- * @throws Exception
+ * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
+ * @param user the user associated with this queue
*/
@Deprecated
@Operation(desc = "Update a queue", impact = MBeanOperationInfo.ACTION)
@@ -1036,22 +1025,21 @@ String updateQueue(@Parameter(name = "name", desc = "Name of the queue") String
/**
* Update a queue
*
- * @param name name of the queue
- * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
- * @param filter the filter to use on the queue
- * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
- * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
- * @param exclusive if the queue should route exclusively to one consumer
- * @param groupRebalance if the queue should rebalance groups when a consumer is added
- * @param groupBuckets number of buckets that should be used for message groups, -1 (default) is unlimited, and groups by raw key instead
- * @param groupFirstKey key used to mark a message is first in a group for a consumer
- * @param nonDestructive If the queue is non-destructive
+ * @param name name of the queue
+ * @param routingType the routing type used for this address, {@code MULTICAST} or {@code ANYCAST}
+ * @param filter the filter to use on the queue
+ * @param maxConsumers the maximum number of consumers allowed on this queue at any one time
+ * @param purgeOnNoConsumers delete this queue when the last consumer disconnects
+ * @param exclusive if the queue should route exclusively to one consumer
+ * @param groupRebalance if the queue should rebalance groups when a consumer is added
+ * @param groupBuckets number of buckets that should be used for message groups, -1 (default) is
+ * unlimited, and groups by raw key instead
+ * @param groupFirstKey key used to mark a message is first in a group for a consumer
+ * @param nonDestructive If the queue is non-destructive
* @param consumersBeforeDispatch number of consumers needed before dispatch can start
- * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
- * @param user the user associated with this queue
- * @param ringSize the size this queue should maintain according to ring semantics
- * @return
- * @throws Exception
+ * @param delayBeforeDispatch delay to wait before dispatching if number of consumers before dispatch is not met
+ * @param user the user associated with this queue
+ * @param ringSize the size this queue should maintain according to ring semantics
*/
@Deprecated
@Operation(desc = "Update a queue", impact = MBeanOperationInfo.ACTION)
@@ -1072,9 +1060,9 @@ String updateQueue(@Parameter(name = "name", desc = "Name of the queue") String
/**
* Deploy a durable queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
* This method will do nothing if the queue with the given name already exists on the server.
*
* @param address address to bind the queue to
@@ -1089,9 +1077,9 @@ void deployQueue(@Parameter(name = "address", desc = "Address of the queue") Str
/**
* Deploy a queue.
- *
* If {@code address} is {@code null} it will be defaulted to {@code name}.
- *
* This method will do nothing if the queue with the given name already exists on the server.
*
* @param address address to bind the queue to
@@ -1153,9 +1141,9 @@ void destroyQueue(@Parameter(name = "name", desc = "Name of the queue to destroy
/**
* List all the prepared transaction, sorted by date, oldest first.
- *
+ * The Strings are Base-64 representation of the transaction XID and can be used to heuristically commit or rollback
+ * the transactions.
*
* @see #commitPreparedTransaction(String)
* @see #rollbackPreparedTransaction(String)
@@ -1164,15 +1152,13 @@ void destroyQueue(@Parameter(name = "name", desc = "Name of the queue to destroy
String[] listPreparedTransactions() throws Exception;
/**
- * List all the prepared transaction, sorted by date,
- * oldest first, with details, in text format.
+ * List all the prepared transaction, sorted by date, oldest first, with details, in text format.
*/
@Operation(desc = "List all the prepared transaction, sorted by date, oldest first, with details, in JSON format")
String listPreparedTransactionDetailsAsJSON() throws Exception;
/**
- * List all the prepared transaction, sorted by date,
- * oldest first, with details, in HTML format
+ * List all the prepared transaction, sorted by date, oldest first, with details, in HTML format
*/
@Deprecated
@Operation(desc = "List all the prepared transaction, sorted by date, oldest first, with details, in HTML format")
@@ -1278,8 +1264,8 @@ boolean closeConsumerWithID(@Parameter(desc = "The session ID", name = "sessionI
String listProducersInfoAsJSON() throws Exception;
/**
- * Lists all the connections connected to this server.
- * The returned String is a JSON string containing details about each connection, e.g.:
+ * Lists all the connections connected to this server. The returned String is a JSON string containing details about
+ * each connection, e.g.:
*
+ * Java objects can be recreated from JSON serialization using {@link RoleInfo#from(String)}}.
*/
@Attribute(desc = "roles (name and permissions) associated with this address using JSON serialization")
String getRolesAsJSON() throws Exception;
/**
- * Returns the number of estimated bytes being used by all the queue(s) bound to this address; used to control paging and blocking.
+ * {@return the number of estimated bytes being used by all the queue(s) bound to this address; used to control
+ * paging and blocking}
*/
@Attribute(desc = ADDRESS_SIZE_DESCRIPTION)
long getAddressSize();
+ /**
+ * {@return the maximum number of bytes that can be read into memory from paged files}
+ */
@Attribute(desc = "The maximum number of bytes that can be read into memory from paged files")
int getMaxPageReadBytes();
+ /**
+ * {@return the maximum number of messages that can be read into memory from paged files}
+ */
@Attribute(desc = "The maximum number of messages that can be read into memory from paged files")
int getMaxPageReadMessages();
+ /**
+ * {@return the number of bytes to prefetch from storage into memory before reching maxReadBytes}
+ */
@Attribute(desc = "The number of bytes to prefetch from storage into memory before reching maxReadBytes")
int getPrefetchPageBytes();
+ /**
+ * {@return the number of messages prefetch from storage into memory before reching maxReadBytes}
+ */
@Attribute(desc = "The number of messages prefetch from storage into memory before reching maxReadBytes")
int getPrefetchPageMessages();
@@ -85,54 +97,52 @@ public interface AddressControl {
void schedulePageCleanup() throws Exception;
/**
- * Returns the sum of messages on queue(s), including messages in delivery.
+ * {@return the sum of messages on queue(s), including messages in delivery}
*/
@Deprecated
@Attribute(desc = "the sum of messages on queue(s), including messages in delivery; DEPRECATED: use getMessageCount() instead")
long getNumberOfMessages();
/**
- * Returns the names of the remote queue(s) bound to this address.
+ * {@return the names of the remote queue(s) bound to this address}
*/
@Attribute(desc = "names of the remote queue(s) bound to this address")
String[] getRemoteQueueNames();
/**
- * Returns the names of the local queue(s) bound to this address.
+ * {@return the names of the local queue(s) bound to this address}
*/
@Attribute(desc = "names of the local queue(s) bound to this address")
String[] getQueueNames();
/**
- * Returns the names of both the local and remote queue(s) bound to this address.
+ * {@return the names of both the local and remote queue(s) bound to this address}
*/
@Attribute(desc = "names of both the local & remote queue(s) bound to this address")
String[] getAllQueueNames();
/**
- * Returns the number of pages used by this address.
+ * {@return the number of pages used by this address}
*/
@Attribute(desc = NUMBER_OF_PAGES_DESCRIPTION)
long getNumberOfPages();
/**
- * Returns whether this address is paging.
- *
- * @throws Exception
+ * {@return whether this address is paging}
*/
@Attribute(desc = "whether this address is paging")
boolean isPaging() throws Exception;
/**
- * Returns the % of memory limit that is currently in use
+ * {@return the % of memory limit that is currently in use}
*/
@Attribute(desc = LIMIT_PERCENT_DESCRIPTION)
int getAddressLimitPercent();
/**
* Blocks message production to this address by limiting credit
- * @return true if production is blocked
- * @throws Exception
+ *
+ * @return {@code true} if production is blocked
*/
@Operation(desc = "Stops message production to this address, typically with flow control.", impact = MBeanOperationInfo.ACTION)
boolean block() throws Exception;
@@ -141,13 +151,13 @@ public interface AddressControl {
void unblock() throws Exception;
/**
- * Returns the number of bytes used by each page for this address.
+ * {@return the number of bytes used by each page for this address}
*/
@Attribute(desc = "number of bytes used by each page for this address")
long getNumberOfBytesPerPage() throws Exception;
/**
- * Returns the names of all bindings (both queues and diverts) bound to this address
+ * {@return the names of all bindings (both queues and diverts) bound to this address}
*/
@Attribute(desc = "names of all bindings (both queues and diverts) bound to this address")
String[] getBindingNames() throws Exception;
@@ -156,26 +166,22 @@ public interface AddressControl {
long getMessageCount();
/**
- * Returns the number of messages routed to one or more bindings
+ * {@return the number of messages routed to one or more bindings}
*/
@Attribute(desc = ROUTED_MESSAGE_COUNT_DESCRIPTION)
long getRoutedMessageCount();
/**
- * Returns the number of messages not routed to any bindings
+ * {@return the number of messages not routed to any bindings}
*/
@Attribute(desc = UNROUTED_MESSAGE_COUNT_DESCRIPTION)
long getUnRoutedMessageCount();
-
/**
- * @param headers the message headers and properties to set. Can only
- * container Strings maped to primitive types.
- * @param body the text to send
- * @param durable
- * @param user
- * @param password @return
- * @throws Exception
+ * Sends a TextMessage to a password-protected address.
+ *
+ * @param headers the message headers and properties to set. Can only container Strings maped to primitive types.
+ * @param body the text to send
*/
@Operation(desc = "Sends a TextMessage to a password-protected address.", impact = MBeanOperationInfo.ACTION)
String sendMessage(@Parameter(name = "headers", desc = "The headers to add to the message") Map
- * This annotation is used only for attributes which can be seen
- * through a GUI.
+ * This annotation is used only for attributes which can be seen through a GUI.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/BaseBroadcastGroupControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/BaseBroadcastGroupControl.java
index c87d075166b..73b0eaa5d76 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/BaseBroadcastGroupControl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/BaseBroadcastGroupControl.java
@@ -22,25 +22,25 @@
public interface BaseBroadcastGroupControl extends ActiveMQComponentControl {
/**
- * Returns the configuration name of this broadcast group.
+ * {@return the configuration name of this broadcast group}
*/
@Attribute(desc = "name of this broadcast group")
String getName();
/**
- * Returns the period used by this broadcast group.
+ * {@return the period used by this broadcast group}
*/
@Attribute(desc = "period used by this broadcast group")
long getBroadcastPeriod();
/**
- * Returns the pairs of live-backup connectors that are broadcasted by this broadcast group.
+ * {@return the pairs of live-backup connectors that are broadcasted by this broadcast group}
*/
@Attribute(desc = "pairs of live-backup connectors that are broadcasted by this broadcast group")
Object[] getConnectorPairs();
/**
- * Returns the pairs of live-backup connectors that are broadcasted by this broadcast group
+ * {@return the pairs of live-backup connectors that are broadcasted by this broadcast group}
* using JSON serialization.
*/
@Attribute(desc = "pairs of live-backup connectors that are broadcasted by this broadcast group using JSON serialization")
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/BridgeControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/BridgeControl.java
index cbe741c9a3f..e056f040d48 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/BridgeControl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/BridgeControl.java
@@ -24,119 +24,118 @@
public interface BridgeControl extends ActiveMQComponentControl {
/**
- * Returns the name of this bridge
+ * {@return the name of this bridge}
*/
@Attribute(desc = "name of this bridge")
String getName();
/**
- * Returns the name of the queue this bridge is consuming messages from.
+ * {@return the name of the queue this bridge is consuming messages from}
*/
@Attribute(desc = "name of the queue this bridge is consuming messages from")
String getQueueName();
/**
- * Returns the address this bridge will forward messages to.
+ * {@return the address this bridge will forward messages to}
*/
@Attribute(desc = "address this bridge will forward messages to")
String getForwardingAddress();
/**
- * Returns the filter string associated with this bridge.
+ * {@return the filter string associated with this bridge}
*/
@Attribute(desc = "filter string associated with this bridge")
String getFilterString();
/**
- * Return the name of the org.apache.activemq.artemis.core.server.cluster.Transformer implementation associated with this bridge.
+ * {@return the name of the org.apache.activemq.artemis.core.server.cluster.Transformer implementation associated
+ * with this bridge}
*/
@Attribute(desc = "name of the org.apache.activemq.artemis.core.server.cluster.Transformer implementation associated with this bridge")
String getTransformerClassName();
/**
- * Returns a map of the properties configured for the transformer.
+ * {@return a map of the properties configured for the transformer}
*/
@Attribute(desc = "map of key, value pairs used to configure the transformer in JSON form")
String getTransformerPropertiesAsJSON() throws Exception;
/**
- * Returns a map of the properties configured for the transformer.
+ * {@return a map of the properties configured for the transformer}
*/
@Attribute(desc = "map of key, value pairs used to configure the transformer")
Map
+ * The messagesPendingAcknowledgement counter is incremented when the bridge is has forwarded a message but is
+ * waiting acknowledgement from the other broker. The messagesAcknowledged counter is the number of messages actually
+ * received by the remote broker.
*/
@Attribute(desc = "The metrics for this bridge. The messagesPendingAcknowledgement counter is incremented when the bridge is has forwarded a message but is waiting acknowledgement from the remote broker. The messagesAcknowledged counter is the number of messages actually received by the remote broker.")
Map
+ * This is a cumulative total and the number of outstanding pending messages for the cluster connection can be
+ * computed by subtracting messagesAcknowledged from messagesPendingAcknowledgement.
*/
@Attribute(desc = "The messagesPendingAcknowledgement counter is incremented when any bridge in the cluster connection has forwarded a message and is waiting acknowledgement from the other broker. (aggregate over all bridges)")
long getMessagesPendingAcknowledgement();
/**
- * The messagesAcknowledged counter is the number of messages actually received by a remote broker for all
- * bridges in this cluster connection
- *
- * This is a cumulative total and the number of outstanding pending messages for the cluster connection
- * can be computed by subtracting messagesAcknowledged from messagesPendingAcknowledgement.
- *
+ * The messagesAcknowledged counter is the number of messages actually received by a remote broker for all bridges in
+ * this cluster connection
+ *
+ * This is a cumulative total and the number of outstanding pending messages for the cluster connection can be
+ * computed by subtracting messagesAcknowledged from messagesPendingAcknowledgement.
*/
@Attribute(desc = "The messagesAcknowledged counter is the number of messages actually received by a remote broker for all bridges in this cluster connection")
long getMessagesAcknowledged();
/**
* The current metrics for this cluster connection (aggregate over all bridges to other nodes)
- *
- * The messagesPendingAcknowledgement counter is incremented when any bridge in the cluster connection has
- * forwarded a message and is waiting acknowledgement from the other broker.
- *
- * The messagesAcknowledged counter is the number of messages actually received by a remote broker for all
- * bridges in this cluster connection
- *
- * @return
+ *
+ * The messagesPendingAcknowledgement counter is incremented when any bridge in the cluster connection has forwarded
+ * a message and is waiting acknowledgement from the other broker.
+ *
+ * The messagesAcknowledged counter is the number of messages actually received by a remote broker for all bridges in
+ * this cluster connection
*/
@Attribute(desc = "The metrics for this cluster connection. The messagesPendingAcknowledgement counter is incremented when any bridge in the cluster connection has forwarded a message and is waiting acknowledgement from the other broker. The messagesAcknowledged counter is the number of messages actually received by a remote broker for all bridges in this cluster connection")
Map
+ * The messagesPendingAcknowledgement counter is incremented when the bridge is has forwarded a message but is
+ * waiting acknowledgement from the other broker. The messagesAcknowledged counter is the number of messages actually
+ * received by the remote broker for this bridge.
*/
@Operation(desc = "The metrics for the bridge by nodeId. The messagesPendingAcknowledgement counter is incremented when the bridge is has forwarded a message but is waiting acknowledgement from the other broker. The messagesAcknowledged counter is the number of messages actually received by the remote broker for this bridge.")
Map
- * This annotation is used only for methods which can be invoked
- * through a GUI.
+ * This annotation is used only for methods which can be invoked through a GUI.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Parameter.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Parameter.java
index 24a7b1f24f1..25d56441c89 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Parameter.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Parameter.java
@@ -24,8 +24,7 @@
/**
* Info for a MBean Operation Parameter.
*
- * This annotation is used only for methods which can be invoked
- * through a GUI.
+ * This annotation is used only for methods which can be invoked through a GUI.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
index 8fd14b2eead..c3cc843a8fe 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
@@ -46,43 +46,43 @@ public interface QueueControl {
String MESSAGES_KILLED_DESCRIPTION = "number of messages removed from this queue since it was created due to exceeding the max delivery attempts";
/**
- * Returns the name of this queue.
+ * {@return the name of this queue}
*/
@Attribute(desc = "name of this queue")
String getName();
/**
- * Returns the address this queue is bound to.
+ * {@return the address this queue is bound to}
*/
@Attribute(desc = "address this queue is bound to")
String getAddress();
/**
- * Returns this queue ID.
+ * {@return this queue ID}
*/
@Attribute(desc = "ID of this queue")
long getID();
/**
- * Returns whether this queue is temporary.
+ * {@return whether this queue is temporary}
*/
@Attribute(desc = "whether this queue is temporary")
boolean isTemporary();
/**
- * Returns whether this queue is used for a retroactive address.
+ * {@return whether this queue is used for a retroactive address}
*/
@Attribute(desc = "whether this queue is used for a retroactive address")
boolean isRetroactiveResource();
/**
- * Returns whether this queue is durable.
+ * {@return whether this queue is durable}
*/
@Attribute(desc = "whether this queue is durable")
boolean isDurable();
/**
- * Returns the user that is associated with creating the queue.
+ * {@return the user that is associated with creating the queue}
*/
@Attribute(desc = "the user that created the queue")
String getUser();
@@ -94,175 +94,167 @@ public interface QueueControl {
String getRoutingType();
/**
- * Returns the filter associated with this queue.
+ * {@return the filter associated with this queue}
*/
@Attribute(desc = "filter associated with this queue")
String getFilter();
/**
- * Returns the number of messages currently in this queue.
+ * {@return the number of messages currently in this queue}
*/
@Attribute(desc = MESSAGE_COUNT_DESCRIPTION)
long getMessageCount();
/**
- * Returns the persistent size of all messages currently in this queue. The persistent size of a message
- * is the amount of space the message would take up on disk which is used to track how much data there
- * is to consume on this queue
+ * {@return the persistent size of all messages currently in this queue; the persistent size of a message is the
+ * amount of space the message would take up on disk which is used to track how much data there is to consume on this
+ * queue}
*/
@Attribute(desc = PERSISTENT_SIZE_DESCRIPTION)
long getPersistentSize();
/**
- * Returns the number of durable messages currently in this queue.
+ * {@return the number of durable messages currently in this queue}
*/
@Attribute(desc = DURABLE_MESSAGE_COUNT_DESCRIPTION)
long getDurableMessageCount();
/**
- * Returns the persistent size of durable messages currently in this queue. The persistent size of a message
- * is the amount of space the message would take up on disk which is used to track how much data there
- * is to consume on this queue
+ * {@return the persistent size of durable messages currently in this queue; the persistent size of a message is the
+ * amount of space the message would take up on disk which is used to track how much data there is to consume on this
+ * queue}
*/
@Attribute(desc = DURABLE_PERSISTENT_SIZE_DESCRIPTION)
long getDurablePersistentSize();
/**
- * Returns whether this queue was created for the broker's internal use.
+ * {@return whether this queue was created for the broker's internal use}
*/
@Attribute(desc = "whether this queue was created for the broker's internal use")
boolean isInternalQueue();
/**
- * Returns the number of scheduled messages in this queue.
+ * {@return the number of scheduled messages in this queue}
*/
@Attribute(desc = SCHEDULED_MESSAGE_COUNT_DESCRIPTION)
long getScheduledCount();
/**
- * Returns the size of scheduled messages in this queue.
+ * {@return the size of scheduled messages in this queue}
*/
@Attribute(desc = SCHEDULED_SIZE_DESCRIPTION)
long getScheduledSize();
/**
- * Returns the number of durable scheduled messages in this queue.
+ * {@return the number of durable scheduled messages in this queue}
*/
@Attribute(desc = DURABLE_SCHEDULED_MESSAGE_COUNT_DESCRIPTION)
long getDurableScheduledCount();
/**
- * Returns the size of durable scheduled messages in this queue.
+ * {@return the size of durable scheduled messages in this queue}
*/
@Attribute(desc = DURABLE_SCHEDULED_SIZE_DESCRIPTION)
long getDurableScheduledSize();
/**
- * Returns the number of consumers consuming messages from this queue.
+ * {@return the number of consumers consuming messages from this queue}
*/
@Attribute(desc = CONSUMER_COUNT_DESCRIPTION)
int getConsumerCount();
/**
- * Returns the number of messages that this queue is currently delivering to its consumers.
+ * {@return the number of messages that this queue is currently delivering to its consumers}
*/
@Attribute(desc = DELIVERING_MESSAGE_COUNT_DESCRIPTION)
int getDeliveringCount();
/**
- * Returns the persistent size of messages that this queue is currently delivering to its consumers.
+ * {@return the persistent size of messages that this queue is currently delivering to its consumers}
*/
@Attribute(desc = DELIVERING_SIZE_DESCRIPTION)
long getDeliveringSize();
/**
- * Returns the number of durable messages that this queue is currently delivering to its consumers.
+ * {@return the number of durable messages that this queue is currently delivering to its consumers}
*/
@Attribute(desc = DURABLE_DELIVERING_MESSAGE_COUNT_DESCRIPTION)
int getDurableDeliveringCount();
/**
- * Returns the size of durable messages that this queue is currently delivering to its consumers.
+ * {@return the size of durable messages that this queue is currently delivering to its consumers}
*/
@Attribute(desc = DURABLE_DELIVERING_SIZE_DESCRIPTION)
long getDurableDeliveringSize();
/**
- * Returns the number of messages added to this queue since it was created.
+ * {@return the number of messages added to this queue since it was created}
*/
@Attribute(desc = MESSAGES_ADDED_DESCRIPTION)
long getMessagesAdded();
/**
- * Returns the number of messages added to this queue since it was created.
+ * {@return the number of messages added to this queue since it was created}
*/
@Attribute(desc = MESSAGES_ACKNOWLEDGED_DESCRIPTION)
long getMessagesAcknowledged();
/**
- * Returns the number of messages added to this queue since it was created.
+ * {@return the number of messages added to this queue since it was created}
*/
@Attribute(desc = "number of messages acknowledged attempts from this queue since it was created")
long getAcknowledgeAttempts();
/**
- * Returns the number of messages expired from this queue since it was created.
+ * {@return the number of messages expired from this queue since it was created}
*/
@Attribute(desc = MESSAGES_EXPIRED_DESCRIPTION)
long getMessagesExpired();
/**
- * Returns the number of messages removed from this queue since it was created due to exceeding the max delivery attempts.
+ * {@return the number of messages removed from this queue since it was created due to exceeding the max delivery
+ * attempts}
*/
@Attribute(desc = MESSAGES_KILLED_DESCRIPTION)
long getMessagesKilled();
/**
- * Returns the first message on the queue as JSON
+ * {@return the first message on the queue as JSON}
*/
@Attribute(desc = "first message on the queue as JSON")
String getFirstMessageAsJSON() throws Exception;
/**
- * Returns the timestamp of the first message in milliseconds.
+ * {@return the timestamp of the first message in milliseconds}
*/
@Attribute(desc = "timestamp of the first message in milliseconds")
Long getFirstMessageTimestamp() throws Exception;
/**
- * Returns the age of the first message in milliseconds.
+ * {@return the age of the first message in milliseconds}
*/
@Attribute(desc = "age of the first message in milliseconds")
Long getFirstMessageAge() throws Exception;
/**
- * Returns the expiry address associated with this queue.
+ * {@return the expiry address associated with this queue}
*/
@Attribute(desc = "expiry address associated with this queue")
String getExpiryAddress();
/**
- * Returns the dead-letter address associated with this queue.
+ * {@return the dead-letter address associated with this queue}
*/
@Attribute(desc = "dead-letter address associated with this queue")
String getDeadLetterAddress();
- /**
- *
- */
@Attribute(desc = "maximum number of consumers allowed on this queue at any one time")
int getMaxConsumers();
- /**
- *
- */
@Attribute(desc = "purge this queue when the last consumer disconnects")
boolean isPurgeOnNoConsumers();
- /**
- *
- */
@Attribute(desc = "if the queue is enabled, default it is enabled, when disabled messages will not be routed to the queue")
boolean isEnabled();
@@ -278,49 +270,38 @@ public interface QueueControl {
@Operation(desc = "Disables routing of messages to the Queue", impact = MBeanOperationInfo.ACTION)
void disable() throws Exception;
- /**
- *
- */
@Attribute(desc = "is this queue managed by configuration (broker.xml)")
boolean isConfigurationManaged();
- /**
- *
- */
@Attribute(desc = "If the queue should route exclusively to one consumer")
boolean isExclusive();
- /**
- *
- */
@Attribute(desc = "is this queue a last value queue")
boolean isLastValue();
/**
- *The key used for the last value queues
+ * {@return key used for the last value queues}
*/
@Attribute(desc = "last value key")
String getLastValueKey();
/**
- *Return the Consumers Before Dispatch
- * @return
+ * {@return the Consumers Before Dispatch}
*/
@Attribute(desc = "Return the Consumers Before Dispatch")
int getConsumersBeforeDispatch();
/**
- *Return the Consumers Before Dispatch
- * @return
+ * {@return the Delay Before Dispatch}
*/
- @Attribute(desc = "Return the Consumers Before Dispatch")
+ @Attribute(desc = "Return the Delay Before Dispatch")
long getDelayBeforeDispatch();
// Operations ----------------------------------------------------
/**
* Lists all the messages scheduled for delivery for this queue.
- *
* 1 Map represents 1 message, keys are the message's properties and headers, values are the corresponding values.
*/
@Operation(desc = "List the messages scheduled for delivery", impact = MBeanOperationInfo.INFO)
@@ -334,26 +315,24 @@ public interface QueueControl {
/**
* Lists all the messages being deliver per consumer.
- *
+ * The Map's key is a toString representation for the consumer. Each consumer will then return a
+ * {@code Map
* 1 Map represents 1 message, keys are the message's properties and headers, values are the corresponding values.
- *
* Using {@code null} or an empty filter will list all messages from this queue.
*/
@Operation(desc = "List all the messages in the queue matching the given filter", impact = MBeanOperationInfo.INFO)
@@ -361,7 +340,7 @@ public interface QueueControl {
/**
* Lists all the messages in this queue matching the specified filter using JSON serialization.
- *
* Using {@code null} or an empty filter will list all messages from this queue.
*/
@Operation(desc = "List all the messages in the queue matching the given filter and returns them using JSON", impact = MBeanOperationInfo.INFO)
@@ -369,7 +348,7 @@ public interface QueueControl {
/**
* Counts the number of messages in this queue matching the specified filter.
- *
* Using {@code null} or an empty filter will count all messages from this queue.
*/
@Operation(desc = "Returns the number of the messages in the queue matching the given filter", impact = MBeanOperationInfo.INFO)
@@ -381,7 +360,7 @@ public interface QueueControl {
/**
* Counts the number of messages in this queue matching the specified filter, grouped by the given property field.
* In case of null property will be grouped in "null"
- *
* Using {@code null} or an empty filter will count all messages from this queue.
*/
@Operation(desc = "Returns the number of the messages in the queue matching the given filter, grouped by the given property field", impact = MBeanOperationInfo.INFO)
@@ -389,16 +368,16 @@ public interface QueueControl {
/**
* Counts the number of delivering messages in this queue matching the specified filter.
- *
* Using {@code null} or an empty filter will count all messages from this queue.
*/
@Operation(desc = "Returns the number of the messages in the queue matching the given filter")
long countDeliveringMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter) throws Exception;
/**
- * Counts the number of delivering messages in this queue matching the specified filter, grouped by the given property field.
- * In case of null property will be grouped in "null"
- *
* Using {@code null} or an empty filter will count all messages from this queue.
*/
@Operation(desc = "Returns the number of the messages in the queue matching the given filter, grouped by the given property field")
@@ -414,7 +393,7 @@ public interface QueueControl {
/**
* Removes all the message corresponding to the specified filter.
- *
* Using {@code null} or an empty filter will remove all messages from this queue.
*
* @return the number of removed messages
@@ -424,7 +403,7 @@ public interface QueueControl {
/**
* Removes all the message corresponding to the specified filter.
- *
* Using {@code null} or an empty filter will remove all messages from this queue.
*
* @return the number of removed messages
@@ -443,7 +422,7 @@ int removeMessages(@Parameter(name = "flushLimit", desc = "Limit to flush transa
/**
* Expires all the message corresponding to the specified filter.
- *
* Using {@code null} or an empty filter will expire all messages from this queue.
*
* @return the number of expired messages
@@ -460,12 +439,10 @@ int removeMessages(@Parameter(name = "flushLimit", desc = "Limit to flush transa
boolean expireMessage(@Parameter(name = "messageID", desc = "A message ID") long messageID) throws Exception;
/**
- * Retries the message corresponding to the given messageID to the original queue.
- * This is appropriate on dead messages on Dead letter queues only.
+ * Retries the message corresponding to the given messageID to the original queue. This is appropriate on dead
+ * messages on Dead letter queues only.
*
- * @param messageID
- * @return {@code true} if the message was retried, {@code false} else
- * @throws Exception
+ * @return {@code true} if the message was retried, {@code false} else
*/
@Operation(desc = "Retry the message corresponding to the given messageID to the original queue", impact = MBeanOperationInfo.ACTION)
boolean retryMessage(@Parameter(name = "messageID", desc = "A message ID") long messageID) throws Exception;
@@ -474,8 +451,7 @@ int removeMessages(@Parameter(name = "flushLimit", desc = "Limit to flush transa
* Retries all messages on a DLQ to their respective original queues.
* This is appropriate on dead messages on Dead letter queues only.
*
- * @return the number of retried messages.
- * @throws Exception
+ * @return the number of retried messages
*/
@Operation(desc = "Retry all messages on a DLQ to their respective original queues", impact = MBeanOperationInfo.ACTION)
int retryMessages() throws Exception;
@@ -502,7 +478,7 @@ boolean moveMessage(@Parameter(name = "messageID", desc = "A message ID") long m
/**
* Moves all the message corresponding to the specified filter to the specified other queue.
* RejectDuplicates = false on this case
- *
* Using {@code null} or an empty filter will move all messages from this queue.
*
* @return the number of moved messages
@@ -513,7 +489,7 @@ int moveMessages(@Parameter(name = "filter", desc = "A message filter (can be em
/**
* Moves all the message corresponding to the specified filter to the specified other queue.
- *
* Using {@code null} or an empty filter will move all messages from this queue.
*
* @return the number of moved messages
@@ -550,7 +526,7 @@ boolean copyMessage(@Parameter(name = "messageID", desc = "A message ID") long m
/**
* Sends all the message corresponding to the specified filter to this queue's dead letter address.
- *
* Using {@code null} or an empty filter will send all messages from this queue.
*
* @return the number of sent messages
@@ -559,13 +535,10 @@ boolean copyMessage(@Parameter(name = "messageID", desc = "A message ID") long m
int sendMessagesToDeadLetterAddress(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filterStr) throws Exception;
/**
- * @param headers the message headers and properties to set. Can only
- * container Strings maped to primitive types.
- * @param body the text to send
- * @param durable
- * @param user
- * @param password @return
- * @throws Exception
+ * Sends a TextMessage to a password-protected destination.
+ *
+ * @param headers the message headers and properties to set. Can only container Strings maped to primitive types.
+ * @param body the text to send
*/
@Operation(desc = "Sends a TextMessage to a password-protected destination.", impact = MBeanOperationInfo.ACTION)
String sendMessage(@Parameter(name = "headers", desc = "The headers to add to the message") Map
* Using {@code null} or an empty filter will change all messages from this queue.
*
* @return the number of changed messages
@@ -669,7 +640,7 @@ int changeMessagesPriority(@Parameter(name = "filter", desc = "A message filter
String listConsumersAsJSON() throws Exception;
/**
- * Returns whether the queue is paused.
+ * {@return whether the queue is paused}
*/
@Attribute(desc = "whether the queue is paused")
boolean isPaused() throws Exception;
@@ -714,23 +685,21 @@ CompositeData[] browse(@Parameter(name = "page", desc = "Current page") int page
void resetMessagesKilled() throws Exception;
/**
- * it will flush one cycle on internal executors, so you would be sure that any pending tasks are done before you call
- * any other measure.
- * It is useful if you need the exact number of counts on a message
+ * it will flush one cycle on internal executors, so you would be sure that any pending tasks are done before you
+ * call any other measure. It is useful if you need the exact number of counts on a message
*/
@Operation(desc = "Flush internal executors", impact = MBeanOperationInfo.ACTION)
void flushExecutor();
/**
- * Will reset the all the groups.
- * This is useful if you want a complete rebalance of the groups to consumers
+ * Will reset the all the groups. This is useful if you want a complete rebalance of the groups to consumers
*/
@Operation(desc = "Resets all groups", impact = MBeanOperationInfo.ACTION)
void resetAllGroups();
/**
- * Will reset the group matching the given groupID.
- * This is useful if you want the given group to be rebalanced to the consumers
+ * Will reset the group matching the given groupID. This is useful if you want the given group to be rebalanced to
+ * the consumers
*/
@Operation(desc = "Reset the specified group", impact = MBeanOperationInfo.ACTION)
void resetGroup(@Parameter(name = "groupID", desc = "ID of group to reset") String groupID);
@@ -752,13 +721,13 @@ CompositeData[] browse(@Parameter(name = "page", desc = "Current page") int page
long getRingSize();
/**
- * Returns whether the groups of this queue are automatically rebalanced.
+ * {@return whether the groups of this queue are automatically rebalanced}
*/
@Attribute(desc = "whether the groups of this queue are automatically rebalanced")
boolean isGroupRebalance();
/**
- * Returns whether the dispatch is paused when groups of this queue are automatically rebalanced.
+ * {@return whether the dispatch is paused when groups of this queue are automatically rebalanced}
*/
@Attribute(desc = "whether the dispatch is paused when groups of this queue are automatically rebalanced")
boolean isGroupRebalancePauseDispatch();
@@ -794,19 +763,19 @@ CompositeData[] browse(@Parameter(name = "page", desc = "Current page") int page
void deliverScheduledMessage(@Parameter(name = "messageID", desc = "ID of the message to deliver") long messageId) throws Exception;
/**
- * Returns whether this queue is available for auto deletion.
+ * {@return whether this queue is available for auto deletion}
*/
@Attribute(desc = "whether this queue is available for auto deletion")
boolean isAutoDelete();
/**
- * Returns the first message on the queue as JSON
+ * {@return the first message on the queue as JSON}
*/
@Operation(desc = "Returns first message on the queue as JSON", impact = MBeanOperationInfo.INFO)
String peekFirstMessageAsJSON() throws Exception;
/**
- * Returns the first scheduled message on the queue as JSON
+ * {@return the first scheduled message on the queue as JSON}
*/
@Operation(desc = "Returns first scheduled message on the queue as JSON", impact = MBeanOperationInfo.INFO)
String peekFirstScheduledMessageAsJSON() throws Exception;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RemoteBrokerConnectionControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RemoteBrokerConnectionControl.java
index 3b47d43aab7..7d40249e5a1 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RemoteBrokerConnectionControl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RemoteBrokerConnectionControl.java
@@ -17,25 +17,25 @@
package org.apache.activemq.artemis.api.core.management;
/**
- * An API for a RemoteBrokerConnectionControl object that is used to view information about
- * active remote broker connections.
+ * An API for a RemoteBrokerConnectionControl object that is used to view information about active remote broker
+ * connections.
*/
public interface RemoteBrokerConnectionControl {
/**
- * Returns the name of the remote broker connection
+ * {@return the name of the remote broker connection}
*/
@Attribute(desc = "name of the remote broker connection")
String getName();
/**
- * Returns the Node ID of the remote broker connection
+ * {@return the Node ID of the remote broker connection}
*/
@Attribute(desc = "Node ID of the remote broker connection")
String getNodeId();
/**
- * Returns the wire protocol this broker connection is using.
+ * {@return the wire protocol this broker connection is using}
*/
@Attribute(desc = "the wire protocol this broker connection is using")
String getProtocol();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
index 169e5bb15fb..6d251e897c4 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
@@ -21,9 +21,9 @@
/**
* Helper class used to build resource names used by management messages.
- *
+ * Resource's name is build by appending its name to its corresponding type. For example, the resource name of
+ * the "foo" queue is {@code QUEUE + "foo"}.
*/
public final class ResourceNames {
public static final String BROKER = "broker";
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java
index 211f716d6a5..ec89d552ee8 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java
@@ -22,8 +22,7 @@
import org.apache.activemq.artemis.api.core.JsonUtil;
/**
- * Helper class to create Java Objects from the
- * JSON serialization returned by {@link AddressControl#getRolesAsJSON()}.
+ * Helper class to create Java Objects from the JSON serialization returned by {@link AddressControl#getRolesAsJSON()}.
*/
public final class RoleInfo {
@@ -50,8 +49,8 @@ public final class RoleInfo {
private final boolean deleteAddress;
/**
- * Returns an array of RoleInfo corresponding to the JSON serialization returned
- * by {@link AddressControl#getRolesAsJSON()}.
+ * {@return an array of RoleInfo corresponding to the JSON serialization returned by {@link
+ * AddressControl#getRolesAsJSON()}}
*/
public static RoleInfo[] from(final String jsonString) throws Exception {
JsonArray array = JsonUtil.readJsonArray(jsonString);
@@ -99,78 +98,75 @@ private RoleInfo(final String name,
this.deleteAddress = deleteAddress;
}
- /**
- * Returns the name of the role.
- */
public String getName() {
return name;
}
/**
- * Returns whether this role can send messages to the address.
+ * {@return whether this role can send messages to the address}
*/
public boolean isSend() {
return send;
}
/**
- * Returns whether this role can consume messages from queues bound to the address.
+ * {@return whether this role can consume messages from queues bound to the address}
*/
public boolean isConsume() {
return consume;
}
/**
- * Returns whether this role can create durable queues bound to the address.
+ * {@return whether this role can create durable queues bound to the address}
*/
public boolean isCreateDurableQueue() {
return createDurableQueue;
}
/**
- * Returns whether this role can delete durable queues bound to the address.
+ * {@return whether this role can delete durable queues bound to the address}
*/
public boolean isDeleteDurableQueue() {
return deleteDurableQueue;
}
/**
- * Returns whether this role can create non-durable queues bound to the address.
+ * {@return whether this role can create non-durable queues bound to the address}
*/
public boolean isCreateNonDurableQueue() {
return createNonDurableQueue;
}
/**
- * Returns whether this role can delete non-durable queues bound to the address.
+ * {@return whether this role can delete non-durable queues bound to the address}
*/
public boolean isDeleteNonDurableQueue() {
return deleteNonDurableQueue;
}
/**
- * Returns whether this role can send management messages to the address.
+ * {@return whether this role can send management messages to the address}
*/
public boolean isManage() {
return manage;
}
/**
- * Returns whether this role can browse queues bound to the address.
+ * {@return whether this role can browse queues bound to the address}
*/
public boolean isBrowse() {
return browse;
}
/**
- * Returns whether this role can create addresses.
+ * {@return whether this role can create addresses}
*/
public boolean isCreateAddress() {
return createAddress;
}
/**
- * Returns whether this role can delete addresses.
+ * {@return whether this role can delete addresses}
*/
public boolean isDeleteAddress() {
return deleteAddress;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/SimpleManagement.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/SimpleManagement.java
index 5152b36e4e4..570eb32f3b6 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/SimpleManagement.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/SimpleManagement.java
@@ -37,7 +37,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/** This class provides a simple proxy for management operations */
+/**
+ * This class provides a simple proxy for management operations
+ */
public class SimpleManagement implements AutoCloseable {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -94,28 +96,36 @@ public void rebuildPageCounters() throws Exception {
simpleManagementVoid("broker", "rebuildPageCounters");
}
- /** Simple helper for management returning a string.*/
+ /**
+ * Simple helper for management returning a string.
+ */
public String simpleManagement(String resource, String method, Object... parameters) throws Exception {
AtomicReference
+ * However when decompressing the message, we are not sure how large the message could be.. for that reason we fake a
+ * large message controller that will deal with the message as it was a large message
+ *
* Say that you sent a 1G message full of spaces. That could be just bellow 100K compressed but you wouldn't have
* enough memory to decompress it
*/
@@ -809,10 +807,11 @@ public void flushAcks() throws ActiveMQException {
}
/**
- * LargeMessageBuffer will call flowcontrol here, while other handleMessage will also be calling flowControl.
- * So, this operation needs to be atomic.
+ * LargeMessageBuffer will call flowcontrol here, while other handleMessage will also be calling flowControl. So,
+ * this operation needs to be atomic.
*
- * @param discountSlowConsumer When dealing with slowConsumers, we need to discount one credit that was pre-sent when the first receive was called. For largeMessage that is only done at the latest packet
+ * @param discountSlowConsumer When dealing with slowConsumers, we need to discount one credit that was pre-sent when
+ * the first receive was called. For largeMessage that is only done at the latest packet
*/
@Override
public void flowControl(final int messageBytes, final boolean discountSlowConsumer) throws ActiveMQException {
@@ -896,9 +895,6 @@ private void queueExecutor() {
sessionExecutor.execute(runner);
}
- /**
- * @param credits
- */
private void sendCredits(final int credits) {
pendingFlowControl.countUp();
flowControlExecutor.execute(() -> {
@@ -1055,10 +1051,6 @@ private void safeRestoreContextClassLoader(final ClassLoader originalClassLoader
});
}
- /**
- * @param message
- * @throws ActiveMQException
- */
private void flowControlBeforeConsumption(final ClientMessageInternal message) throws ActiveMQException {
if (manualFlowManagement) {
return;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerInternal.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerInternal.java
index 24f55a2210d..5efe120b558 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerInternal.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerInternal.java
@@ -48,9 +48,6 @@ public interface ClientConsumerInternal extends ClientConsumer {
/**
* To be called by things like MDBs during shutdown of the server
- *
- * @param future
- * @throws ActiveMQException
*/
Thread prepareForClose(FutureLatch future) throws ActiveMQException;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java
index ca57a70201f..f024f5ccd39 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java
@@ -28,8 +28,8 @@
/**
* ClientLargeMessageImpl is only created when receiving large messages.
*
- * At the time of sending a regular Message is sent as we won't know the message is considered large
- * until the buffer is filled up or the user set a streaming.
+ * At the time of sending a regular Message is sent as we won't know the message is considered large until the buffer is
+ * filled up or the user set a streaming.
*/
public final class ClientLargeMessageImpl extends ClientMessageImpl implements ClientLargeMessageInternal {
@@ -38,9 +38,6 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
private long largeMessageSize;
- /**
- * @param largeMessageSize the largeMessageSize to set
- */
@Override
public void setLargeMessageSize(long largeMessageSize) {
this.largeMessageSize = largeMessageSize;
@@ -64,9 +61,6 @@ public int getEncodeSize() {
}
}
- /**
- * @return the largeMessage
- */
@Override
public boolean isLargeMessage() {
return true;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
index 5fac7e56b8a..5faacbf1cf5 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
@@ -32,9 +32,6 @@
import org.apache.activemq.artemis.reader.MessageUtil;
import org.apache.activemq.artemis.utils.UUID;
-/**
- * A ClientMessageImpl
- */
public class ClientMessageImpl extends CoreMessage implements ClientMessageInternal {
// added this constant here so that the client package have no dependency on JMS
@@ -53,9 +50,6 @@ public class ClientMessageImpl extends CoreMessage implements ClientMessageInter
*/
private InputStream bodyInputStream;
- /*
- * Constructor for when reading from remoting
- */
public ClientMessageImpl() {
}
@@ -92,9 +86,7 @@ public ClientMessageImpl setUserID(UUID userID) {
}
- /*
- * Construct messages before sending
- */
+ // Construct messages before sending
public ClientMessageImpl(final byte type,
final boolean durable,
final long expiration,
@@ -168,9 +160,6 @@ public void setFlowControlSize(final int flowControlSize) {
this.flowControlSize = flowControlSize;
}
- /**
- * @return the largeMessage
- */
@Override
public boolean isLargeMessage() {
return false;
@@ -219,17 +208,11 @@ public boolean waitOutputStreamCompletion(final long timeMilliseconds) throws Ac
public void discardBody() {
}
- /**
- * @return the bodyInputStream
- */
@Override
public InputStream getBodyInputStream() {
return bodyInputStream;
}
- /**
- * @param bodyInputStream the bodyInputStream to set
- */
@Override
public ClientMessageImpl setBodyInputStream(final InputStream bodyInputStream) {
this.bodyInputStream = bodyInputStream;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageInternal.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageInternal.java
index 1a7fe07e0f8..3edeae5b138 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageInternal.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageInternal.java
@@ -23,21 +23,12 @@ public interface ClientMessageInternal extends ClientMessage {
TypedProperties getProperties();
- /**
- * Size used for FlowControl
- */
int getFlowControlSize();
- /**
- * Size used for FlowControl
- */
void setFlowControlSize(int flowControlSize);
void onReceipt(ClientConsumerInternal consumer);
- /**
- * Discard unused packets (used on large-message)
- */
void discardBody();
boolean isCompressed();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManager.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManager.java
index 3cdf6ed44fc..ca32948287f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManager.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManager.java
@@ -37,7 +37,9 @@ public interface ClientProducerCreditManager {
int getMaxAnonymousCacheSize();
- /** This will determine the flow control as asynchronous,
- * no actual block should happen instead a callback will be sent whenever blockages change */
+ /**
+ * This will determine the flow control as asynchronous, no actual block should happen instead a callback will be
+ * sent whenever blockages change
+ */
void setCallback(ClientProducerFlowCallback callback);
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java
index 59762aa7865..a4a1311e288 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java
@@ -48,9 +48,6 @@ public ClientProducerCreditManagerImpl(final ClientSessionInternal session, fina
this.windowSize = windowSize;
}
-
- /** This will determine the flow control as asynchronous,
- * no actual block should happen instead a callback will be sent whenever blockages change */
@Override
public void setCallback(ClientProducerFlowCallback callback) {
this.callback = callback;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java
index e538379b904..983debcf22c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java
@@ -37,9 +37,6 @@
import org.slf4j.LoggerFactory;
import java.lang.invoke.MethodHandles;
-/**
- * The client-side Producer.
- */
public class ClientProducerImpl implements ClientProducerInternal {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -54,8 +51,6 @@ public class ClientProducerImpl implements ClientProducerInternal {
private volatile boolean closed;
- // For rate throttling
-
private final TokenBucketLimiter rateLimiter;
private final boolean blockOnNonDurableSend;
@@ -313,11 +308,6 @@ private void checkClosed() throws ActiveMQException {
// Methods to send Large Messages----------------------------------------------------------------
- /**
- * @param msgI
- * @param handler
- * @throws ActiveMQException
- */
private void largeMessageSend(final boolean sendBlocking,
final ICoreMessage msgI,
final ClientProducerCredits credits,
@@ -357,13 +347,8 @@ private void sendInitialLargeMessageHeader(Message msgI,
}
/**
- * Used to send serverMessages through the bridges. No need to validate compression here since
- * the message is only compressed at the client
- *
- * @param sendBlocking
- * @param msgI
- * @param handler
- * @throws ActiveMQException
+ * Used to send serverMessages through the bridges. No need to validate compression here since the message is only
+ * compressed at the client
*/
private void largeMessageSendServer(final boolean sendBlocking,
final ICoreMessage msgI,
@@ -402,12 +387,6 @@ private void largeMessageSendServer(final boolean sendBlocking,
}
}
- /**
- * @param sendBlocking
- * @param msgI
- * @param handler
- * @throws ActiveMQException
- */
private void largeMessageSendBuffered(final boolean sendBlocking,
final ICoreMessage msgI,
final ClientProducerCredits credits,
@@ -416,13 +395,6 @@ private void largeMessageSendBuffered(final boolean sendBlocking,
largeMessageSendStreamed(sendBlocking, msgI, new ActiveMQBufferInputStream(msgI.getBodyBuffer()), credits, handler);
}
- /**
- * @param sendBlocking
- * @param msgI
- * @param inputStreamParameter
- * @param credits
- * @throws ActiveMQException
- */
private void largeMessageSendStreamed(final boolean sendBlocking,
final ICoreMessage msgI,
final InputStream inputStreamParameter,
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerInternal.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerInternal.java
index 963f86fdbeb..35e06c32b75 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerInternal.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerInternal.java
@@ -18,9 +18,6 @@
import org.apache.activemq.artemis.api.core.client.ClientProducer;
-/**
- * A ClientProducerInternal
- */
public interface ClientProducerInternal extends ClientProducer {
void cleanUp();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
index fbef6f2ab1c..d5d5d60689e 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
@@ -227,7 +227,7 @@ public ClientSessionFactoryImpl(final ServerLocatorInternal serverLocator,
this.callFailoverTimeout = locatorConfig.callFailoverTimeout;
- // HORNETQ-1314 - if this in an in-vm connection then disable connection monitoring
+ // If this in an in-vm connection then disable connection monitoring
if (connectorFactory.isReliable() &&
locatorConfig.clientFailureCheckPeriod == ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD &&
locatorConfig.connectionTTL == ActiveMQClient.DEFAULT_CONNECTION_TTL) {
@@ -488,9 +488,6 @@ private void interruptConnectAndCloseAllSessions(boolean close) {
}
}
- /**
- * @param close
- */
private void closeCleanSessions(boolean close) {
Set
- * Notice: you will get an exception if the address or the filter doesn't match to an already existent queue
- *
- * @param address the queue will be bound to this address
- * @param routingType the delivery mode for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param durable if the queue is durable
- * @throws ActiveMQException in an exception occurs while creating the queue
- */
@Override
public void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString queueName, boolean durable) throws ActiveMQException {
createSharedQueue(address, routingType, queueName, null, durable);
}
- /**
- * Creates a transient queue. A queue that will exist as long as there are consumers. When the last consumer is closed the queue will be deleted
- *
- * Notice: you will get an exception if the address or the filter doesn't match to an already existent queue
- *
- * @param address the queue will be bound to this address
- * @param routingType the delivery mode for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter whether the queue is durable or not
- * @param durable if the queue is durable
- * @throws ActiveMQException in an exception occurs while creating the queue
- */
@Override
public void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter,
boolean durable) throws ActiveMQException {
createSharedQueue(address, routingType, queueName, filter, durable, null, null, null, null);
}
- /**
- * Creates Shared queue. A queue that will exist as long as there are consumers or is durable.
- *
- * @param address the queue will be bound to this address
- * @param routingType the delivery mode for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter whether the queue is durable or not
- * @param durable if the queue is durable
- * @param maxConsumers how many concurrent consumers will be allowed on this queue
- * @param purgeOnNoConsumers whether to delete the contents of the queue when the last consumer disconnects
- * @param exclusive if the queue is exclusive queue
- * @param lastValue if the queue is last value queue
- * @throws ActiveMQException in an exception occurs while creating the queue
- */
@Deprecated
@Override
public void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter,
@@ -659,42 +609,17 @@ public void createSharedQueue(SimpleString address, RoutingType routingType, Sim
createSharedQueue(address, queueName, queueAttributes);
}
- /**
- * Creates Shared queue. A queue that will exist as long as there are consumers or is durable.
- *
- * @param address the queue will be bound to this address
- * @param queueName the name of the queue
- * @param queueAttributes attributes for the queue
- * @throws ActiveMQException in an exception occurs while creating the queue
- */
@Deprecated
@Override
public void createSharedQueue(SimpleString address, SimpleString queueName, QueueAttributes queueAttributes) throws ActiveMQException {
createSharedQueue(queueAttributes.toQueueConfiguration().setName(queueName).setAddress(address));
}
- /**
- * Creates a non-temporary queue.
- *
- * @param address the queue will be bound to this address
- * @param routingType the delivery mode for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param durable whether the queue is durable or not
- * @throws ActiveMQException in an exception occurs while creating the queue
- */
@Override
public void createQueue(String address, RoutingType routingType, String queueName, boolean durable) throws ActiveMQException {
createQueue(SimpleString.of(address), routingType, SimpleString.of(queueName), durable);
}
- /**
- * Creates a non-temporary queue non-durable queue.
- *
- * @param address the queue will be bound to this address
- * @param routingType the delivery mode for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @throws ActiveMQException in an exception occurs while creating the queue
- */
@Deprecated
@Override
public void createQueue(String address, RoutingType routingType, String queueName) throws ActiveMQException {
@@ -710,14 +635,6 @@ public void createQueue(String address, RoutingType routingType, String queueNam
.setMaxConsumers(ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers()));
}
- /**
- * Creates a non-temporary queue non-durable queue.
- *
- * @param address the queue will be bound to this address
- * @param routingType the delivery mode for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @throws ActiveMQException in an exception occurs while creating the queue
- */
@Deprecated
@Override
public void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName) throws ActiveMQException {
@@ -733,16 +650,6 @@ public void createQueue(SimpleString address, RoutingType routingType, SimpleStr
.setMaxConsumers(ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers()));
}
- /**
- * Creates a non-temporary queue.
- *
- * @param address the queue will be bound to this address
- * @param routingType the delivery mode for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter only messages which match this filter will be put in the queue
- * @param durable whether the queue is durable or not
- * @throws ActiveMQException in an exception occurs while creating the queue
- */
@Deprecated
@Override
public void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter,
@@ -759,23 +666,12 @@ public void createQueue(SimpleString address, RoutingType routingType, SimpleStr
.setMaxConsumers(ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers()));
}
- /**
- * Creates a non-temporaryqueue.
- *
- * @param address the queue will be bound to this address
- * @param routingType the delivery mode for this queue, MULTICAST or ANYCAST
- * @param queueName the name of the queue
- * @param filter only messages which match this filter will be put in the queue
- * @param durable whether the queue is durable or not
- * @throws ActiveMQException in an exception occurs while creating the queue
- */
@Override
public void createQueue(String address, RoutingType routingType, String queueName, String filter, boolean durable) throws ActiveMQException {
createQueue(SimpleString.of(address), routingType, SimpleString.of(queueName), SimpleString.of(filter),
durable);
}
-
@Override
public void deleteQueue(final SimpleString queueName) throws ActiveMQException {
checkClosed();
@@ -887,14 +783,12 @@ public ClientConsumer createConsumer(final SimpleString queueName,
}
/**
- * Note, we DO NOT currently support direct consumers (i.e. consumers where delivery occurs on
- * the remoting thread).
+ * Note, we DO NOT currently support direct consumers (i.e. consumers where delivery occurs on the remoting thread).
*
- * Direct consumers have issues with blocking and failover. E.g. if direct then inside
- * MessageHandler call a blocking method like rollback or acknowledge (blocking) This can block
- * until failover completes, which disallows the thread to be used to deliver any responses to
- * the client during that period, so failover won't occur. If we want direct consumers we need to
- * rethink how they work.
+ * Direct consumers have issues with blocking and failover. E.g. if direct then inside MessageHandler call a blocking
+ * method like rollback or acknowledge (blocking) This can block until failover completes, which disallows the thread
+ * to be used to deliver any responses to the client during that period, so failover won't occur. If we want direct
+ * consumers we need to rethink how they work.
*/
@Override
public ClientConsumer createConsumer(final SimpleString queueName,
@@ -965,18 +859,16 @@ public void commit(boolean block) throws ActiveMQException {
logger.trace("Sending commit");
- /*
- * we have failed over since any work was done so we should rollback
- * */
+ // we have failed over since any work was done so we should rollback
if (rollbackOnly) {
rollbackOnFailover(true);
}
flushAcks();
/*
- * if we have failed over whilst flushing the acks then we should rollback and throw exception before attempting to
- * commit as committing might actually commit something but we we wouldn't know and rollback after the commit
- * */
+ * if we have failed over whilst flushing the acks then we should rollback and throw exception before attempting to
+ * commit as committing might actually commit something but we we wouldn't know and rollback after the commit
+ */
if (rollbackOnly) {
rollbackOnFailover(true);
}
@@ -1201,9 +1093,6 @@ public int getCompressionLevel() {
return compressionLevel;
}
- /**
- * @return the cacheLargeMessageClient
- */
@Override
public boolean isCacheLargeMessageClient() {
return cacheLargeMessageClient;
@@ -1214,9 +1103,6 @@ public String getName() {
return name;
}
- /**
- * Acknowledges all messages received by the consumer so far.
- */
@Override
public void acknowledge(final ClientConsumer consumer, final Message message) throws ActiveMQException {
// if we're pre-acknowledging then we don't need to do anything
@@ -2001,14 +1887,6 @@ public String toString() {
Integer.toHexString(hashCode());
}
- /**
- * @param queueName
- * @param filterString
- * @param windowSize
- * @param browseOnly
- * @return
- * @throws ActiveMQException
- */
private ClientConsumer internalCreateConsumer(final SimpleString queueName,
final SimpleString filterString,
final int priority,
@@ -2125,8 +2003,6 @@ private void cleanUpChildren() throws ActiveMQException {
/**
* Not part of the interface, used on tests only
- *
- * @return
*/
public Set
* This will convert to the same XID deserialized on the Server, hence we will be able to debug eventual stuff
- *
- * @param xid
- * @return
*/
public static Object convert(Xid xid) {
ActiveMQBuffer buffer = ActiveMQBuffers.dynamicBuffer(200);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionInternal.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionInternal.java
index 0c13fbdba6e..9f79fe0e939 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionInternal.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionInternal.java
@@ -104,23 +104,19 @@ void handleReceiveContinuation(ConsumerContext consumerID,
void markRollbackOnly();
/**
- * This is used internally to control and educate the user
- * about using the thread boundaries properly.
- * if more than one thread is using the session simultaneously
- * this will generate a big warning on the docs.
- * There are a limited number of places where we can call this such as acks and sends. otherwise we
- * could get false warns
+ * This is used internally to control and educate the user about using the thread boundaries properly. if more than
+ * one thread is using the session simultaneously this will generate a big warning on the docs. There are a limited
+ * number of places where we can call this such as acks and sends. otherwise we could get false warns
*/
void startCall();
/**
+ * Opposite of {@link #startCall()}
+ *
* @see #startCall()
*/
void endCall();
- /**
- * Sets a stop signal to true. This will cancel
- */
void setStopSignal();
boolean isConfirmationWindowEnabled();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java
index 76dd273bff3..92be797a1ee 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java
@@ -43,9 +43,6 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll
this.bufferDelegate = bufferDelegate;
}
- /**
- *
- */
@Override
public void discardUnusedPackets() {
bufferDelegate.discardUnusedPackets();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageController.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageController.java
index 0565c83647b..f943ea40bc7 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageController.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageController.java
@@ -24,7 +24,7 @@
public interface LargeMessageController extends ActiveMQBuffer {
/**
- * Returns the size of this buffer.
+ * {@return the size of this buffer.}
*/
long getSize();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageControllerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageControllerImpl.java
index 56736afbfd0..28b679cb056 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageControllerImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageControllerImpl.java
@@ -17,7 +17,6 @@
package org.apache.activemq.artemis.core.client.impl;
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -43,11 +42,10 @@
import org.apache.activemq.artemis.utils.UTF8Util;
/**
- * This class aggregates several {@link org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionReceiveContinuationMessage}
- * as it was being handled
- * by a single buffer. This buffer can be consumed as messages are arriving, and it will hold the
- * packets until they are read using the ChannelBuffer interface, or the setOutputStream or
- * saveStream are called.
+ * This class aggregates several
+ * {@link org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionReceiveContinuationMessage} as it was
+ * being handled by a single buffer. This buffer can be consumed as messages are arriving, and it will hold the packets
+ * until they are read using the ChannelBuffer interface, or the setOutputStream or saveStream are called.
*/
public class LargeMessageControllerImpl implements LargeMessageController {
@@ -272,7 +270,6 @@ public synchronized void saveBuffer(final OutputStream output) throws ActiveMQEx
/**
* @param timeWait Milliseconds to Wait. 0 means forever
- * @throws ActiveMQException
*/
@Override
public synchronized boolean waitCompletion(final long timeWait) throws ActiveMQException {
@@ -325,9 +322,6 @@ public LargeData take() throws InterruptedException {
return largeData;
}
- /**
- * @throws ActiveMQException
- */
private void checkException() throws ActiveMQException {
// it's not needed to copy it as we never set it back to null
// once the exception is set, the controller is pretty much useless
@@ -899,14 +893,12 @@ public void writeBytes(final ByteBuffer src) {
}
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the current {@code writerIndex} until the source buffer's position
- * reaches its limit, and increases the {@code writerIndex} by the
- * number of the transferred bytes.
+ * Transfers the specified source buffer's data to this buffer starting at the current {@code writerIndex} until the
+ * source buffer's position reaches its limit, and increases the {@code writerIndex} by the number of the transferred
+ * bytes.
*
* @param src The source buffer
- * @throws IndexOutOfBoundsException if {@code src.remaining()} is greater than
- * {@code this.writableBytes}
+ * @throws IndexOutOfBoundsException if {@code src.remaining()} is greater than {@code this.writableBytes}
*/
@Override
public void writeBytes(ByteBuf src, int srcIndex, int length) {
@@ -1103,11 +1095,6 @@ public ActiveMQBuffer slice(final int index, final int length) {
throw new UnsupportedOperationException();
}
- /**
- * @param output
- * @param packet
- * @throws ActiveMQException
- */
private void sendPacketToOutput(final OutputStream output, final LargeData packet) throws ActiveMQException {
try {
output.write(packet.getChunk());
@@ -1244,9 +1231,6 @@ public void cachePackage(final byte[] body) throws Exception {
close();
}
- /**
- * @throws FileNotFoundException
- */
private FileChannel checkOpen() throws IOException {
FileChannel channel = cachedChannel;
if (cachedFile != null || !channel.isOpen()) {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java
index a2288344929..f1fe47a867d 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java
@@ -78,8 +78,8 @@
import org.slf4j.LoggerFactory;
/**
- * This is the implementation of {@link org.apache.activemq.artemis.api.core.client.ServerLocator} and all
- * the proper javadoc is located on that interface.
+ * This is the implementation of {@link org.apache.activemq.artemis.api.core.client.ServerLocator} and all the proper
+ * javadoc is located on that interface.
*/
public final class ServerLocatorImpl implements ServerLocatorInternal, DiscoveryListener {
@@ -125,10 +125,9 @@ private enum STATE {
private volatile boolean receivedTopology;
-
- /** This specifies serverLocator.connect was used,
- * which means it's a cluster connection.
- * We should not use retries */
+ /**
+ * This specifies serverLocator.connect was used, which means it's a cluster connection. We should not use retries
+ */
private volatile boolean disableDiscoveryRetries = false;
// if the system should shutdown the pool when shutting down
@@ -168,12 +167,16 @@ private enum STATE {
private TransportConfiguration clusterTransportConfiguration;
- /** For tests only */
+ /**
+ * For tests only
+ */
public DiscoveryGroup getDiscoveryGroup() {
return discoveryGroup;
}
- /** For tests only */
+ /**
+ * For tests only
+ */
public Set
* This method used to be on tests interface, but I'm now making it part of the public interface since
*/
ServerLocatorInternal setIdentity(String identity);
@@ -55,8 +55,6 @@ public interface ServerLocatorInternal extends ServerLocator {
/**
* Like {@link #connect()} but it does not log warnings if it fails to connect.
- *
- * @throws ActiveMQException
*/
ClientSessionFactoryInternal connectNoWarnings() throws ActiveMQException;
@@ -68,12 +66,14 @@ void notifyNodeUp(long uniqueEventID,
boolean last);
/**
+ * Notify this about a node down event.
+ *
* @param uniqueEventID 0 means get the previous ID +1
- * @param nodeID
*/
default void notifyNodeDown(long uniqueEventID, String nodeID) {
notifyNodeDown(uniqueEventID, nodeID, false);
}
+
void notifyNodeDown(long uniqueEventID, String nodeID, boolean disconnect);
ServerLocatorInternal setClusterConnection(boolean clusterConnection);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java
index d28e2c628a7..99ff680447d 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java
@@ -36,6 +36,9 @@
import org.slf4j.LoggerFactory;
import java.lang.invoke.MethodHandles;
+/**
+ * A {@code Topology} describes the other cluster nodes that this server knows about.
+ */
public final class Topology {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -47,19 +50,15 @@ public final class Topology {
/**
* Used to debug operations.
*
- * Someone may argue this is not needed. But it's impossible to debug anything related to
- * topology without knowing what node or what object missed a Topology update. Hence I added some
- * information to locate debugging here.
+ * Someone may argue this is not needed. But it's impossible to debug anything related to topology without knowing
+ * what node or what object missed a Topology update. Hence I added some information to locate debugging here.
*/
private volatile Object owner;
private final TopologyManager manager;
/**
- * topology describes the other cluster nodes that this server knows about:
- *
- * keys are node IDs
- * values are a pair of live/backup transport configurations
+ * Keys are node IDs. Values are a pair of primary/backup transport configurations.
*/
private final Map
* There are two current implementations, and that's probably all we will ever need.
- *
+ *
* We will probably keep both interfaces for a while as UDP is a simple solution requiring no extra dependencies which
* is suitable for users looking for embedded solutions.
*/
@@ -82,13 +82,6 @@ public final class DiscoveryGroup implements ActiveMQComponent {
/**
* This is the main constructor, intended to be used
- *
- * @param nodeID
- * @param name
- * @param timeout
- * @param endpointFactory
- * @param service
- * @throws Exception
*/
public DiscoveryGroup(final String nodeID,
final String name,
@@ -139,8 +132,8 @@ public ThreadFactory run() {
}
/**
- * This will start the DiscoveryRunnable and run it directly.
- * This is useful for a test process where we need this execution blocking a thread.
+ * This will start the DiscoveryRunnable and run it directly. This is useful for a test process where we need this
+ * execution blocking a thread.
*/
public void internalRunning() throws Exception {
endpoint.openClient();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/config/TransformerConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/config/TransformerConfiguration.java
index 8dcaa3356d3..98fa2f3ed65 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/config/TransformerConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/config/TransformerConfiguration.java
@@ -57,8 +57,8 @@ public Map
* Used to send large streams over the wire
- *
+ *
* None of these methods should be caleld from Clients
*/
public interface LargeBodyReader extends AutoCloseable {
@@ -36,14 +36,14 @@ public interface LargeBodyReader extends AutoCloseable {
/**
* This method must not be called directly by ActiveMQ Artemis clients.
- *
+ *
* This is the reading position.
*/
void position(long position) throws ActiveMQException;
/**
* This method must not be called directly by ActiveMQ Artemis clients.
- *
+ *
* This is the reading position.
*/
long position();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
index d4f4c89c78d..c5d822175fe 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
@@ -63,8 +63,6 @@
import static org.apache.activemq.artemis.utils.ByteUtil.ensureExactWritable;
-/** Note: you shouldn't change properties using multi-threads. Change your properties before you can send it to multiple
- * consumers */
public class CoreMessage extends RefCountMessage implements ICoreMessage {
public static final int BUFFER_HEADER_SPACE = PacketImpl.PACKET_HEADERS_SIZE;
@@ -76,8 +74,10 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage {
// There's an integer with the number of bytes for the body
public static final int BODY_OFFSET = DataConstants.SIZE_INT;
- /** That is the readInto for the whole message, including properties..
- it does not include the buffer for the Packet send and receive header on core protocol */
+ /**
+ * That is the readInto for the whole message, including properties. It does not include the buffer for the Packet
+ * send and receive header on core protocol
+ */
protected ByteBuf buffer;
private volatile boolean validBuffer = false;
@@ -99,7 +99,7 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage {
protected boolean paged;
/**
- * GMT milliseconds at which this message expires. 0 means never expires *
+ * GMT milliseconds at which this message expires. 0 means never expires
*/
private long expiration;
@@ -140,13 +140,17 @@ public String getProtocolName() {
return ActiveMQClient.DEFAULT_CORE_PROTOCOL;
}
- /** On core there's no delivery annotation */
+ /**
+ * On core there's no delivery annotation
+ */
@Override
public Object getAnnotation(SimpleString key) {
return getObjectProperty(key);
}
- /** On core there's no delivery annotation */
+ /**
+ * On core there's no delivery annotation
+ */
@Override
public Object removeAnnotation(SimpleString key) {
return removeProperty(key);
@@ -226,7 +230,9 @@ public void receiveBuffer(ByteBuf buffer) {
decode(false);
}
- /** This will fix the incoming body of 1.x messages */
+ /**
+ * This will fix the incoming body of 1.x messages
+ */
@Override
public void receiveBuffer_1X(ByteBuf buffer) {
this.buffer = buffer;
@@ -248,9 +254,8 @@ public int getBodyBufferSize() {
}
/**
- * This will return the proper buffer to represent the data of the Message. If compressed it will decompress.
- * If large, it will read from the file or streaming.
- * @return
+ * This will return the proper buffer to represent the data of the Message. If compressed it will decompress. If
+ * large, it will read from the file or streaming.
*/
@Override
public ActiveMQBuffer getDataBuffer() {
@@ -346,7 +351,6 @@ public Message setCorrelationID(final Object correlationID) {
}
/**
- * @param sendBuffer
* @param deliveryCount Some protocols (AMQP) will have this as part of the message. ignored on core
*/
@Override
@@ -485,8 +489,10 @@ protected CoreMessage(CoreMessage other, TypedProperties copyProperties) {
}
}
- /** This method serves as a purpose of extension.
- * Large Message on a Core Message will have to set the messageID on the attached NewLargeMessage */
+ /**
+ * This method serves as a purpose of extension. Large Message on a Core Message will have to set the messageID on
+ * the attached NewLargeMessage
+ */
protected void internalSetMessageID(final long messageID) {
this.messageID = messageID;
}
@@ -1173,9 +1179,9 @@ public boolean hasScheduledDeliveryTime() {
}
/**
- * Differently from {@link #containsProperty(SimpleString)}, this method can save decoding the message,
- * performing a search of the {@code key} property and falling back to {@link #containsProperty(SimpleString)}
- * if not possible or if already decoded.
+ * Differently from {@link #containsProperty(SimpleString)}, this method can save decoding the message, performing a
+ * search of the {@code key} property and falling back to {@link #containsProperty(SimpleString)} if not possible or
+ * if already decoded.
*/
public boolean searchProperty(SimpleString key) {
Objects.requireNonNull(key, "key cannot be null");
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessagePersister.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessagePersister.java
index 0dca6d34907..78211bf6f65 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessagePersister.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessagePersister.java
@@ -29,7 +29,9 @@ public class CoreMessagePersister implements Persister
- * Values range from 0 (less priority) to 9 (more priority) inclusive.
- */
@Override
public byte getPriority() {
return message.getPriority();
}
- /**
- * Sets the message priority.
- *
- * Value must be between 0 and 9 inclusive.
- *
- * @param priority the new message priority
- */
@Override
public Message setPriority(byte priority) {
message.setPriority(priority);
return this;
}
- /**
- * Used to receive this message from an encoded medium buffer
- *
- * @param buffer
- */
@Override
public void receiveBuffer(ByteBuf buffer) {
throw new UnsupportedOperationException();
}
- /**
- * Used to send this message to an encoded medium buffer.
- *
- * @param buffer the buffer used.
- * @param deliveryCount Some protocols (AMQP) will have this as part of the message.
- */
@Override
public void sendBuffer(ByteBuf buffer, int deliveryCount) {
throw new UnsupportedOperationException();
@@ -624,17 +558,11 @@ public Message putStringProperty(SimpleString key, String value) {
return message.putStringProperty(key, value);
}
- /**
- * Returns the size of the encoded message.
- */
@Override
public int getEncodeSize() {
return message.getEncodeSize();
}
- /**
- * Returns all the names of the properties for this message.
- */
@Override
public Set
- * Any packet sent will have its channel id set to the specific channel sending so it can be routed to its correct channel
- * when received by the {@link org.apache.activemq.artemis.core.protocol.core.CoreRemotingConnection}. see {@link org.apache.activemq.artemis.core.protocol.core.Packet#setChannelID(long)}.
+ * Any packet sent will have its channel id set to the specific channel sending so it can be routed to its correct
+ * channel when received by the {@link org.apache.activemq.artemis.core.protocol.core.CoreRemotingConnection}. see
+ * {@link org.apache.activemq.artemis.core.protocol.core.Packet#setChannelID(long)}.
*
- * Each Channel should will forward any packets received to its {@link org.apache.activemq.artemis.core.protocol.core.ChannelHandler}.
+ * Each Channel should will forward any packets received to its
+ * {@link org.apache.activemq.artemis.core.protocol.core.ChannelHandler}.
*
* A Channel *does not* support concurrent access by more than one thread!
*/
public interface Channel {
/**
- * Returns the id of this channel.
- *
- * @return the id
+ * {@return the id of this channel}
*/
long getID();
/**
- * This number increases every time the channel reconnects successfully.
- * This is used to guarantee the integrity of the channel on sequential commands such as large messages.
- *
- * @return
+ * This number increases every time the channel reconnects successfully. This is used to guarantee the integrity of
+ * the channel on sequential commands such as large messages.
*/
int getReconnectID();
@@ -69,8 +68,7 @@ default boolean requireSpecialVotingHandling() {
* Sends a packet on this channel.
*
* @param packet the packet to send
- * @return false if the packet was rejected by an outgoing interceptor; true if the send was
- * successful
+ * @return false if the packet was rejected by an outgoing interceptor; {@code true} if the send was successful
*/
boolean send(Packet packet);
@@ -78,8 +76,7 @@ default boolean requireSpecialVotingHandling() {
* Sends a packet on this channel.
*
* @param packet the packet to send
- * @return false if the packet was rejected by an outgoing interceptor; true if the send was
- * successful
+ * @return false if the packet was rejected by an outgoing interceptor; {@code true} if the send was successful
*/
boolean send(Packet packet, int reconnectID);
@@ -87,14 +84,14 @@ default boolean requireSpecialVotingHandling() {
* Sends a packet on this channel using batching algorithm if appropriate
*
* @param packet the packet to send
- * @return false if the packet was rejected by an outgoing interceptor; true if the send was
- * successful
+ * @return false if the packet was rejected by an outgoing interceptor; {@code true} if the send was successful
*/
boolean sendBatched(Packet packet);
/**
- * Similarly to {@code flushConnection} on {@link #send(Packet, boolean)}, it requests
- * any un-flushed previous sent packets to be flushed to the underlying connection.
* It can be a no-op in case of InVM transports, because they would likely to flush already on each send.
*/
void flushConnection();
@@ -103,11 +100,10 @@ default boolean requireSpecialVotingHandling() {
* Sends a packet on this channel, but request it to be flushed (along with the un-flushed previous ones) only iff
* {@code flushConnection} is {@code true}.
*
- * @param packet the packet to send
- * @param flushConnection if {@code true} requests this {@code packet} and any un-flushed previous sent one to be flushed
- * to the underlying connection
- * @return false if the packet was rejected by an outgoing interceptor; true if the send was
- * successful
+ * @param packet the packet to send
+ * @param flushConnection if {@code true} requests this {@code packet} and any un-flushed previous sent one to be
+ * flushed to the underlying connection
+ * @return false if the packet was rejected by an outgoing interceptor; {@code true} if the send was successful
*/
boolean send(Packet packet, boolean flushConnection);
@@ -115,14 +111,12 @@ default boolean requireSpecialVotingHandling() {
* Sends a packet on this channel and then blocks until it has been written to the connection.
*
* @param packet the packet to send
- * @return false if the packet was rejected by an outgoing interceptor; true if the send was
- * successful
+ * @return false if the packet was rejected by an outgoing interceptor; {@code true} if the send was successful
*/
boolean sendAndFlush(Packet packet);
/**
- * Sends a packet on this channel and then blocks until a response is received or a timeout
- * occurs.
+ * Sends a packet on this channel and then blocks until a response is received or a timeout occurs.
*
* @param packet the packet to send
* @param expectedPacket the packet being expected.
@@ -132,8 +126,7 @@ default boolean requireSpecialVotingHandling() {
Packet sendBlocking(Packet packet, byte expectedPacket) throws ActiveMQException;
/**
- * Sends a packet on this channel and then blocks until a response is received or a timeout
- * occurs.
+ * Sends a packet on this channel and then blocks until a response is received or a timeout occurs.
*
* @param packet the packet to send
* @param expectedPacket the packet being expected.
@@ -145,16 +138,16 @@ default boolean requireSpecialVotingHandling() {
Packet sendBlocking(Packet packet, int reconnectID, byte expectedPacket, long timeout, boolean failOnTimeout) throws ActiveMQException;
/**
- * Sets the {@link org.apache.activemq.artemis.core.protocol.core.ChannelHandler} that this channel should
- * forward received packets to.
+ * Sets the {@link org.apache.activemq.artemis.core.protocol.core.ChannelHandler} that this channel should forward
+ * received packets to.
*
* @param handler the handler
*/
void setHandler(ChannelHandler handler);
/**
- * Gets the {@link org.apache.activemq.artemis.core.protocol.core.ChannelHandler} that this channel should
- * forward received packets to.
+ * Gets the {@link org.apache.activemq.artemis.core.protocol.core.ChannelHandler} that this channel should forward
+ * received packets to.
*
* @return the current channel handler
*/
@@ -188,16 +181,15 @@ default boolean requireSpecialVotingHandling() {
void replayCommands(int lastConfirmedCommandID);
/**
- * returns the last confirmed packet command id
- *
- * @return the id
+ * {@return the last confirmed packet command id}
*/
int getLastConfirmedCommandID();
/**
- * queries if this channel is locked. This method is designed for use in monitoring of the system state, not for synchronization control.
+ * queries if this channel is locked. This method is designed for use in monitoring of the system state, not for
+ * synchronization control.
*
- * @return true it the channel is locked and false otherwise
+ * @return {@code true} it the channel is locked and false otherwise
*/
boolean isLocked();
@@ -214,24 +206,24 @@ default boolean requireSpecialVotingHandling() {
void unlock();
/**
- * forces any {@link org.apache.activemq.artemis.core.protocol.core.Channel#sendBlocking(Packet, byte)} request to return with an exception.
+ * forces any {@link org.apache.activemq.artemis.core.protocol.core.Channel#sendBlocking(Packet, byte)} request to
+ * return with an exception.
*/
void returnBlocking();
/**
- * forces any {@link org.apache.activemq.artemis.core.protocol.core.Channel#sendBlocking(Packet, byte)} request to return with an exception.
+ * forces any {@link org.apache.activemq.artemis.core.protocol.core.Channel#sendBlocking(Packet, byte)} request to
+ * return with an exception.
*/
void returnBlocking(Throwable cause);
/**
- * returns the channel lock
- *
- * @return the lock
+ * {@return the channel lock}
*/
Lock getLock();
/**
- * returns the {@link CoreRemotingConnection} being used by the channel
+ * {@return the {@link CoreRemotingConnection} being used by the channel}
*/
CoreRemotingConnection getConnection();
@@ -258,10 +250,11 @@ default boolean requireSpecialVotingHandling() {
void flushConfirmations();
/**
- * Called by {@link org.apache.activemq.artemis.core.protocol.core.CoreRemotingConnection} when a packet is received.
+ * Called by {@link org.apache.activemq.artemis.core.protocol.core.CoreRemotingConnection} when a packet is
+ * received.
*
- * This method should then call its {@link org.apache.activemq.artemis.core.protocol.core.ChannelHandler} after appropriate processing of
- * the packet
+ * This method should then call its {@link org.apache.activemq.artemis.core.protocol.core.ChannelHandler} after
+ * appropriate processing of the packet
*
* @param packet the packet to process.
*/
@@ -273,14 +266,12 @@ default boolean requireSpecialVotingHandling() {
void clearCommands();
/**
- * returns the confirmation window size this channel is using.
- *
- * @return the window size
+ * {@return the confirmation window size this channel is using}
*/
int getConfirmationWindowSize();
/**
- * notifies the channel if it is transferring its connection. When true it is illegal to send messages.
+ * notifies the channel if it is transferring its connection. When {@code true} it is illegal to send messages.
*
* @param transferring whether the channel is transferring
*/
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/ChannelHandler.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/ChannelHandler.java
index 4eef1813f42..2c50530c5eb 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/ChannelHandler.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/ChannelHandler.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.core.protocol.core;
/**
- * A ChannelHandler is used by {@link Channel}. When a channel receives a packet it will call its handler to deal with the
- * packet.
+ * A ChannelHandler is used by {@link Channel}. When a channel receives a packet it will call its handler to deal with
+ * the packet.
*/
public interface ChannelHandler {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/CoreRemotingConnection.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/CoreRemotingConnection.java
index 3f8699b5b8f..30ab0532f61 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/CoreRemotingConnection.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/CoreRemotingConnection.java
@@ -26,8 +26,8 @@
public interface CoreRemotingConnection extends RemotingConnection {
/**
- * The client protocol used on the communication.
- * This will determine if the client has support for certain packet types
+ * The client protocol used on the communication. This will determine if the client has support for certain packet
+ * types
*/
int getChannelVersion();
@@ -82,8 +82,8 @@ default boolean isBeforeProducerMetricsChanged() {
}
/**
- * Sets the client protocol used on the communication. This will determine if the client has
- * support for certain packet types
+ * Sets the client protocol used on the communication. This will determine if the client has support for certain
+ * packet types
*/
void setChannelVersion(int clientVersion);
@@ -129,45 +129,33 @@ default boolean isBeforeProducerMetricsChanged() {
void syncIDGeneratorSequence(long id);
/**
- * Returns the next id to be chosen.
- *
- * @return the id
+ * {@return the next id to be chosen}
*/
long getIDGeneratorSequence();
/**
- * Returns the current timeout for blocking calls
- *
- * @return the timeout in milliseconds
+ * {@return the current timeout for blocking calls)}
*/
long getBlockingCallTimeout();
/**
- * Returns the current timeout for blocking calls
- *
- * @return the timeout in milliseconds
+ * {@return the current timeout for blocking calls}
*/
long getBlockingCallFailoverTimeout();
/**
- * Returns the transfer lock used when transferring connections.
- *
- * @return the lock
+ * {@return the transfer lock used when transferring connections}
*/
Object getTransferLock();
/**
- * Returns the default security principal
- *
- * @return the principal
+ * {@return the default security principal}
*/
ActiveMQPrincipal getDefaultActiveMQPrincipal();
/**
- *
- * @param timeout
- * @return
- * @throws IllegalStateException if the connection is closed
+ * {@see org.apache.activemq.artemis.spi.core.remoting.Connection#blockUntilWritable(long,
+ * java.util.concurrent.TimeUnit)}
*/
boolean blockUntilWritable(long timeout);
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/Packet.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/Packet.java
index b658090be34..b43a109c435 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/Packet.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/Packet.java
@@ -26,8 +26,8 @@ public interface Packet {
int INITIAL_PACKET_SIZE = 1500;
/**
- * Sets the channel id that should be used once the packet has been successfully decoded it is
- * sent to the correct channel.
+ * Sets the channel id that should be used once the packet has been successfully decoded it is sent to the correct
+ * channel.
*
* @param channelID the id of the channel to handle the packet
*/
@@ -35,7 +35,6 @@ public interface Packet {
/**
* This will return the expected packet size for the encoding
- * @return
*/
default int expectedEncodeSize() {
return INITIAL_PACKET_SIZE;
@@ -50,25 +49,17 @@ default int expectedEncodeSize() {
void setCorrelationID(long correlationID);
/**
- * Returns the channel id of the channel that should handle this packet.
- *
- * @return the id of the channel
+ * {@return the channel id of the channel that should handle this packet}
*/
long getChannelID();
/**
- * returns true if this packet is being sent in response to a previously received packet
- *
- * @return true if a response
+ * {@return true if this packet is being sent in response to a previously received packet}
*/
boolean isResponse();
/**
- * returns the type of the packet.
- *
- * This is needed when decoding the packet
- *
- * @return the packet type
+ * {@return the type of the packet; needed when decoding the packet}
*/
byte getType();
@@ -88,23 +79,20 @@ default int expectedEncodeSize() {
void decode(ActiveMQBuffer buffer);
/**
- * returns the size needed to encode this packet.
- *
- * @return The size of the entire packet including headers, and extra data
+ * {@return The size of the entire packet including headers, and extra data; i.e. the size
+ * needed to encode this packet}
*/
int getPacketSize();
/**
- * returns true if a confirmation should be sent on receipt of this packet.
- *
- * @return true if confirmation is required
+ * {@return true if a confirmation should be sent on receipt of this packet}
*/
boolean isRequiresConfirmations();
-
-
- /** The packe wasn't used because the stream is closed,
- * this gives a chance to sub classes to cleanup anything that won't be used. */
+ /**
+ * The packet wasn't used because the stream is closed. This gives a chance to sub classes to cleanup anything that
+ * won't be used.
+ */
default void release() {
}
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java
index 1f14d2f6ee1..18c3fb46205 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java
@@ -69,16 +69,15 @@
/**
* This class will return specific packets for different types of actions happening on a messaging protocol.
- *
+ *
* This is trying to unify the Core client into multiple protocols.
- *
+ *
* Returning null in certain packets means no action is taken on this specific protocol.
- *
+ *
* Semantic properties could also be added to this implementation.
- *
+ *
* Implementations of this class need to be stateless.
*/
-
public class ActiveMQClientProtocolManager implements ClientProtocolManager {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -505,9 +504,6 @@ private void handleDisconnect(SimpleString nodeID, DisconnectReason reason, Simp
}
}
- /**
- * @param topMessage
- */
protected void notifyTopologyChange(final ClusterTopologyChangeMessage topMessage) {
final long eventUID;
final String backupGroupName;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
index 890f6e2aaa7..8760f985f15 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
@@ -552,8 +552,6 @@ public void sendProducerCreditsMessage(final int credits, final SimpleString add
/**
* ActiveMQ Artemis does support large messages
- *
- * @return
*/
@Override
public boolean supportsLargeMessage() {
@@ -962,7 +960,6 @@ public void recreateConsumerOnServer(ClientConsumerInternal consumerInternal,
sendPacketWithoutLock(sessionChannel, packet);
} else {
- // https://jira.jboss.org/browse/HORNETQ-522
SessionConsumerFlowCreditMessage packet = new SessionConsumerFlowCreditMessage(getConsumerID(consumerInternal), 1);
sendPacketWithoutLock(sessionChannel, packet);
}
@@ -1019,8 +1016,6 @@ private CoreRemotingConnection getCoreConnection() {
/**
* This doesn't apply to other protocols probably, so it will be an ActiveMQ Artemis exclusive feature
- *
- * @throws ActiveMQException
*/
private void handleConsumerDisconnected(DisconnectConsumerMessage packet) throws ActiveMQException {
DisconnectConsumerMessage message = packet;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/BackwardsCompatibilityUtils.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/BackwardsCompatibilityUtils.java
index 0037963af9d..2bcdf13e77f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/BackwardsCompatibilityUtils.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/BackwardsCompatibilityUtils.java
@@ -26,8 +26,8 @@
import java.util.Map;
/**
- * There are a few properties that were changed between HornetQ and Artemis.
- * When sending topology updates to clients, if these properties are used we need to convert them properly
+ * There are a few properties that were changed between HornetQ and Artemis. When sending topology updates to clients,
+ * if these properties are used we need to convert them properly
*/
public class BackwardsCompatibilityUtils {
@@ -146,8 +146,8 @@ public class BackwardsCompatibilityUtils {
/**
* Translates V3 strings to V2 strings.
- *
- * Returns the string as if it's not found in the conversion map.
+ *
+ * @return the string as if it's not found in the conversion map.
*/
public static String convertParameter(String name) {
String oldParameter = OLD_PARAMETERS_MAP.get(name);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
index aed5afa577a..feb47505f5a 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
@@ -113,9 +113,6 @@ protected static String idToString(long code) {
private volatile long id;
- /**
- * This is used in
- */
private final AtomicInteger reconnectID = new AtomicInteger(0);
private ChannelHandler handler;
@@ -469,9 +466,10 @@ public Packet sendBlocking(final Packet packet,
}
/**
- * Due to networking issues or server issues the server may take longer to answer than expected.. the client may timeout the call throwing an exception
- * and the client could eventually retry another call, but the server could then answer a previous command issuing a class-cast-exception.
- * The expectedPacket will be used to filter out undesirable packets that would belong to previous calls.
+ * Due to networking issues or server issues the server may take longer to answer than expected.. the client may
+ * timeout the call throwing an exception and the client could eventually retry another call, but the server could
+ * then answer a previous command issuing a class-cast-exception. The expectedPacket will be used to filter out
+ * undesirable packets that would belong to previous calls.
*/
@Override
public Packet sendBlocking(final Packet packet,
@@ -592,9 +590,10 @@ public Packet sendBlocking(final Packet packet,
}
/**
+ * {@return the name of the interceptor that returned {@code false} or {@code null} if no interceptors returned
+ * {@code false}}
+ *
* @param packet the packet to intercept
- * @return the name of the interceptor that returned
* Packet deprecated: It exists only to support old formats
*/
public class SessionAddMetaDataMessage extends PacketImpl {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionAddMetaDataMessageV2.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionAddMetaDataMessageV2.java
index 414f506df28..3dda89504b9 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionAddMetaDataMessageV2.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionAddMetaDataMessageV2.java
@@ -21,7 +21,7 @@
/**
* A SessionAddMetaDataMessage
- *
+ *
* This packet replaces {@link SessionAddMetaDataMessage}
*/
public class SessionAddMetaDataMessageV2 extends PacketImpl {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionBindingQueryResponseMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionBindingQueryResponseMessage.java
index afdd4db1e7f..9f15ffeed92 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionBindingQueryResponseMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionBindingQueryResponseMessage.java
@@ -23,9 +23,6 @@
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
-/**
- * A SessionBindingQueryResponseMessage
- */
public class SessionBindingQueryResponseMessage extends PacketImpl {
protected boolean exists;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionContinuationMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionContinuationMessage.java
index 82d90b75c49..bf7c9874934 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionContinuationMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionContinuationMessage.java
@@ -41,9 +41,6 @@ public SessionContinuationMessage(final byte type) {
super(type);
}
- /**
- * @return the body
- */
public byte[] getBody() {
if (size <= 0) {
return new byte[0];
@@ -52,20 +49,15 @@ public byte[] getBody() {
}
}
- /**
- * @return the continues
- */
public boolean isContinues() {
return continues;
}
/**
- * Returns the exact expected encoded size of {@code this} packet.
- * It will be used to allocate the proper encoding buffer in {@link #createPacket}, hence any
- * wrong value will result in a thrown exception or a resize of the encoding
- * buffer during the encoding process, depending to the implementation of {@link #createPacket}.
- * Any child of {@code this} class are required to override this method if their encoded size is changed
- * from the base class.
+ * Returns the exact expected encoded size of {@code this} packet. It will be used to allocate the proper encoding
+ * buffer in {@link #createPacket}, hence any wrong value will result in a thrown exception or a resize of the
+ * encoding buffer during the encoding process, depending to the implementation of {@link #createPacket}. Any child
+ * of {@code this} class are required to override this method if their encoded size is changed from the base class.
*
* @return the size in bytes of the expected encoded packet
*/
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionForceConsumerDelivery.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionForceConsumerDelivery.java
index 127b0e4b870..8caff691ca9 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionForceConsumerDelivery.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionForceConsumerDelivery.java
@@ -19,9 +19,6 @@
import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
-/**
- * A SessionConsumerForceDelivery
- */
public class SessionForceConsumerDelivery extends PacketImpl {
private long consumerID;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionReceiveContinuationMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionReceiveContinuationMessage.java
index 4a848169bb6..6581264bf87 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionReceiveContinuationMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionReceiveContinuationMessage.java
@@ -32,12 +32,6 @@ public SessionReceiveContinuationMessage() {
super(SESS_RECEIVE_CONTINUATION);
}
- /**
- * @param consumerID
- * @param body
- * @param continues
- * @param requiresResponse
- */
public SessionReceiveContinuationMessage(final long consumerID,
final byte[] body,
final boolean continues,
@@ -55,9 +49,6 @@ public SessionReceiveContinuationMessage(final long consumerID,
this.size = packetSize;
}
- /**
- * @return the consumerID
- */
public long getConsumerID() {
return consumerID;
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionReceiveLargeMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionReceiveLargeMessage.java
index a646ff188f3..074fec9e85d 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionReceiveLargeMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionReceiveLargeMessage.java
@@ -26,7 +26,7 @@ public class SessionReceiveLargeMessage extends PacketImpl implements MessagePac
private Message message;
/**
- * Since we receive the message before the entire message was received,
+ * Since we receive the message before the entire message was received
*/
private long largeMessageSize;
@@ -78,9 +78,6 @@ public int getDeliveryCount() {
return deliveryCount;
}
- /**
- * @return the largeMessageSize
- */
public long getLargeMessageSize() {
return largeMessageSize;
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage.java
index f95dfb915af..7e43a612db0 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage.java
@@ -21,9 +21,6 @@
import org.apache.activemq.artemis.api.core.client.SendAcknowledgementHandler;
import org.apache.activemq.artemis.utils.DataConstants;
-/**
- * A SessionSendContinuationMessage
* This field is only used at the client side.
*
* @see org.apache.activemq.artemis.api.core.client.ClientSession#setSendAcknowledgementHandler(SendAcknowledgementHandler)
- * @see org.apache.activemq.artemis.api.core.client.ClientProducer#send(org.apache.activemq.artemis.api.core.SimpleString, org.apache.activemq.artemis.api.core.Message, SendAcknowledgementHandler)
+ * @see org.apache.activemq.artemis.api.core.client.ClientProducer#send(org.apache.activemq.artemis.api.core.SimpleString,
+ * org.apache.activemq.artemis.api.core.Message, SendAcknowledgementHandler)
*/
private final transient SendAcknowledgementHandler handler;
@@ -57,11 +56,6 @@ protected SessionSendContinuationMessage(byte type) {
handler = null;
}
- /**
- * @param body
- * @param continues
- * @param requiresResponse
- */
public SessionSendContinuationMessage(final Message message,
final byte[] body,
final boolean continues,
@@ -75,11 +69,6 @@ public SessionSendContinuationMessage(final Message message,
this.messageBodySize = messageBodySize;
}
- /**
- * @param body
- * @param continues
- * @param requiresResponse
- */
protected SessionSendContinuationMessage(final byte type,
final Message message,
final byte[] body,
@@ -94,9 +83,6 @@ protected SessionSendContinuationMessage(final byte type,
this.messageBodySize = messageBodySize;
}
- /**
- * @return the requiresResponse
- */
@Override
public boolean isRequiresResponse() {
return requiresResponse;
@@ -106,9 +92,6 @@ public long getMessageBodySize() {
return messageBodySize;
}
- /**
- * @return the message
- */
public Message getMessage() {
return message;
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage_V2.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage_V2.java
index e98d2e414ae..7ae7760bc1f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage_V2.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage_V2.java
@@ -21,9 +21,6 @@
import org.apache.activemq.artemis.api.core.client.SendAcknowledgementHandler;
import org.apache.activemq.artemis.utils.DataConstants;
-/**
- * A SessionSendContinuationMessage
* This field is only used at the client side.
*
* @see org.apache.activemq.artemis.api.core.client.ClientSession#setSendAcknowledgementHandler(SendAcknowledgementHandler)
- * @see org.apache.activemq.artemis.api.core.client.ClientProducer#send(org.apache.activemq.artemis.api.core.SimpleString, org.apache.activemq.artemis.api.core.Message, SendAcknowledgementHandler)
+ * @see org.apache.activemq.artemis.api.core.client.ClientProducer#send(org.apache.activemq.artemis.api.core.SimpleString,
+ * org.apache.activemq.artemis.api.core.Message, SendAcknowledgementHandler)
*/
private final transient SendAcknowledgementHandler handler;
- /** This will be using the CoreMessage because it is meant for the core-protocol */
+ /**
+ * This will be using the CoreMessage because it is meant for the core-protocol
+ */
protected SessionSendMessage(final byte id,
final ICoreMessage message,
final boolean requiresResponse,
@@ -53,7 +57,9 @@ protected SessionSendMessage(final byte id,
this.handler = null;
}
- /** This will be using the CoreMessage because it is meant for the core-protocol */
+ /**
+ * This will be using the CoreMessage because it is meant for the core-protocol
+ */
public SessionSendMessage(final ICoreMessage message,
final boolean requiresResponse,
final SendAcknowledgementHandler handler) {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage_V2.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage_V2.java
index 1fff56dfb53..9209f0d3461 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage_V2.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage_V2.java
@@ -26,7 +26,9 @@ public class SessionSendMessage_V2 extends SessionSendMessage {
private long correlationID;
- /** This will be using the CoreMessage because it is meant for the core-protocol */
+ /**
+ * This will be using the CoreMessage because it is meant for the core-protocol
+ */
public SessionSendMessage_V2(final ICoreMessage message,
final boolean requiresResponse,
final SendAcknowledgementHandler handler) {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage_V3.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage_V3.java
index 690b931f62d..5ee42490c40 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage_V3.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage_V3.java
@@ -26,7 +26,9 @@ public class SessionSendMessage_V3 extends SessionSendMessage_V2 {
private int senderID;
- /** This will be using the CoreMessage because it is meant for the core-protocol */
+ /**
+ * This will be using the CoreMessage because it is meant for the core-protocol
+ */
public SessionSendMessage_V3(final ICoreMessage message,
final boolean requiresResponse,
final SendAcknowledgementHandler handler,
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessageV2.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessageV2.java
index 4df3d28967a..cd737051e04 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessageV2.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessageV2.java
@@ -38,9 +38,6 @@ public void encodeRest(final ActiveMQBuffer buffer) {
buffer.writeInt(clientVersion);
}
- /**
- * @return the clientVersion
- */
public int getClientVersion() {
return clientVersion;
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/CloseListener.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/CloseListener.java
index 12c8f7ad463..d6c702cc2ee 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/CloseListener.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/CloseListener.java
@@ -17,7 +17,8 @@
package org.apache.activemq.artemis.core.remoting;
/**
- * CloseListeners can be registered with a {@link org.apache.activemq.artemis.spi.core.protocol.RemotingConnection} to get notified when the connection is closed.
+ * CloseListeners can be registered with a {@link org.apache.activemq.artemis.spi.core.protocol.RemotingConnection} to
+ * get notified when the connection is closed.
*
* {@link org.apache.activemq.artemis.spi.core.protocol.RemotingConnection#addCloseListener(CloseListener)}
*/
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/FailureListener.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/FailureListener.java
index 05e185b4146..14878a1c3a4 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/FailureListener.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/FailureListener.java
@@ -26,8 +26,7 @@ public interface FailureListener {
/**
* Notifies that a connection has failed due to the specified exception.
*
- * @param exception exception which has caused the connection to fail
- * @param failedOver
+ * @param exception exception which has caused the connection to fail
*/
void connectionFailed(ActiveMQException exception, boolean failedOver);
@@ -35,7 +34,6 @@ public interface FailureListener {
* Notifies that a connection has failed due to the specified exception.
*
* @param exception exception which has caused the connection to fail
- * @param failedOver
* @param scaleDownTargetNodeID the ID of the node to which messages are scaling down
*/
void connectionFailed(ActiveMQException exception, boolean failedOver, String scaleDownTargetNodeID);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/TransportConfigurationUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/TransportConfigurationUtil.java
index 806196fe028..8c88365845d 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/TransportConfigurationUtil.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/TransportConfigurationUtil.java
@@ -40,8 +40,10 @@ public class TransportConfigurationUtil {
public static Map
- * This method must NOT throw an exception if it fails to create the connection
- * (e.g. network is not available), in this case it MUST return null.
* This version can be used for testing purposes.
*
* @param onConnect a callback that would be called right after {@link Bootstrap#connect()}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
index 91ebe95cd9e..e7464975dfe 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
@@ -68,10 +68,10 @@ public class TransportConstants {
public static final String USE_KQUEUE_PROP_NAME = "useKQueue";
- @Deprecated
/**
* @deprecated Use USE_GLOBAL_WORKER_POOL_PROP_NAME
*/
+ @Deprecated
public static final String USE_NIO_GLOBAL_WORKER_POOL_PROP_NAME = "useNioGlobalWorkerPool";
public static final String USE_GLOBAL_WORKER_POOL_PROP_NAME = "useGlobalWorkerPool";
@@ -145,14 +145,15 @@ public class TransportConstants {
public static final String NETTY_VERSION;
/**
- * Disable Nagle's algorithm.
* Valid for (client) Sockets.
*
* @see
- * Netty note on this option
- * @see Oracle
- * doc on tcpNoDelay
+ * href="https://netty.io/4.1/api/io/netty/channel/socket/SocketChannelConfig.html#setTcpNoDelay-boolean-">Netty note
+ * on this option
+ * @see Oracle doc on
+ * tcpNoDelay
*/
public static final String TCP_NODELAY_PROPNAME = "tcpNoDelay";
@@ -160,10 +161,10 @@ public class TransportConstants {
public static final String TCP_RECEIVEBUFFER_SIZE_PROPNAME = "tcpReceiveBufferSize";
- @Deprecated
/**
* @deprecated Use REMOTING_THREADS_PROPNAME
*/
+ @Deprecated
public static final String NIO_REMOTING_THREADS_PROPNAME = "nioRemotingThreads";
public static final String WRITE_BUFFER_LOW_WATER_MARK_PROPNAME = "writeBufferLowWaterMark";
@@ -364,17 +365,20 @@ public class TransportConstants {
public static final String DISABLE_STOMP_SERVER_HEADER = "disableStompServerHeader";
- /** We let this to be defined as a System Variable, as we need a different timeout over our testsuite.
- * When running on a real server, this is the default we want.
- * When running on a test suite, we need it to be 0, You should see a property on the main pom.xml.
+ /**
+ * We let this to be defined as a System Variable, as we need a different timeout over our testsuite. When running on
+ * a real server, this is the default we want. When running on a test suite, we need it to be 0, You should see a
+ * property on the main pom.xml.
*/
public static final int DEFAULT_QUIET_PERIOD = parseDefaultVariable("DEFAULT_QUIET_PERIOD", 100);
public static final String SHUTDOWN_TIMEOUT = "shutdownTimeout";
- /** We let this to be defined as a System Variable, as we need a different timeout over our testsuite.
- * When running on a real server, this is the default we want.
- * When running on a test suite, we need it to be 0, You should see a property on the main pom.xml */
+ /**
+ * We let this to be defined as a System Variable, as we need a different timeout over our testsuite. When running on
+ * a real server, this is the default we want. When running on a test suite, we need it to be 0, You should see a
+ * property on the main pom.xml
+ */
public static final int DEFAULT_SHUTDOWN_TIMEOUT = parseDefaultVariable("DEFAULT_SHUTDOWN_TIMEOUT", 3_000);
public static final boolean DEFAULT_PROXY_ENABLED = false;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/CachingOpenSSLContextFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/CachingOpenSSLContextFactory.java
index c72706b53ba..3ef6af4c5db 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/CachingOpenSSLContextFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/CachingOpenSSLContextFactory.java
@@ -25,12 +25,10 @@
import org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextConfig;
/**
- * {@link OpenSSLContextFactory} providing a cache of {@link SslContext}.
- * Since {@link SslContext} should be reused instead of recreated and are thread safe.
- * To activate it you need to allow this Service to be discovered by having a
- *
+ * Perhaps a better name for this class now would be ProtocolConnection as this represents the link with the used
+ * protocol
*/
public interface RemotingConnection extends BufferHandler {
/**
- * Returns the unique id of the {@link RemotingConnection}.
- *
- * @return the id
+ * {@return the unique id of the {@link RemotingConnection}}
*/
Object getID();
/**
- * Returns the creation time of the {@link RemotingConnection}.
+ * {@return the creation time of the {@link RemotingConnection}}
*/
long getCreationTime();
/**
- * returns a string representation of the remote address of this connection
- *
- * @return the remote address
+ * {@return a string representation of the remote address of this connection}
*/
String getRemoteAddress();
@@ -100,9 +95,7 @@ public interface RemotingConnection extends BufferHandler {
void setCloseListeners(List
- * Leaving this method here and adding a different one at
- * {@code ServerConnectionLifeCycleListener} is a compromise for a reasonable split between the
- * activemq-server and activemq-client packages while avoiding to pull too much into activemq-core.
- * The pivotal point keeping us from removing the method is {@link ConnectorFactory} and the
+ * Leaving this method here and adding a different one at {@code ServerConnectionLifeCycleListener} is a compromise
+ * for a reasonable split between the activemq-server and activemq-client packages while avoiding to pull too much
+ * into activemq-core. The pivotal point keeping us from removing the method is {@link ConnectorFactory} and the
* usage of it.
*
* @param component This will probably be an {@code Acceptor} and only used on the server side.
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BufferDecoder.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BufferDecoder.java
index b96c2621a5b..9ab863d4e75 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BufferDecoder.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BufferDecoder.java
@@ -21,12 +21,13 @@
public interface BufferDecoder {
/**
- * called by the remoting system prior to {@link org.apache.activemq.artemis.spi.core.remoting.BufferHandler#bufferReceived(Object, ActiveMQBuffer)}.
+ * called by the remoting system prior to
+ * {@link org.apache.activemq.artemis.spi.core.remoting.BufferHandler#bufferReceived(Object, ActiveMQBuffer)}.
*
- * The implementation should return true if there is enough data in the buffer to decode. otherwise false.
- * * @param buffer the buffer
+ * The implementation should return {@code true} if there is enough data in the buffer to decode. otherwise false.
*
- * @return true id the buffer can be decoded..
+ * @param buffer the buffer
+ * @return {@code true} id the buffer can be decoded.
*/
int isReadyToHandle(ActiveMQBuffer buffer);
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BufferHandler.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BufferHandler.java
index f4ddf9d7488..df79833b16e 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BufferHandler.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BufferHandler.java
@@ -21,7 +21,8 @@
/**
* A BufferHandler that will handle buffers received by an acceptor.
*
- * The Buffer Handler will decode the buffer and take the appropriate action, typically forwarding to the correct channel.
+ * The Buffer Handler will decode the buffer and take the appropriate action, typically forwarding to the correct
+ * channel.
*/
public interface BufferHandler {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientProtocolManager.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientProtocolManager.java
index 04fcf011646..28b6c62bc0a 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientProtocolManager.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientProtocolManager.java
@@ -46,8 +46,8 @@ RemotingConnection connect(Connection transportConnection,
boolean waitOnLatch(long milliseconds) throws InterruptedException;
/**
- * This is to be called when a connection failed and we want to interrupt any communication.
- * This used to be called exitLoop at some point o the code.. with a method named causeExit from ClientSessionFactoryImpl
+ * This is to be called when a connection failed and we want to interrupt any communication. This used to be called
+ * exitLoop at some point o the code.. with a method named causeExit from ClientSessionFactoryImpl
*/
void stop();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientProtocolManagerFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientProtocolManagerFactory.java
index 78d3db35726..8b5045d0e0c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientProtocolManagerFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientProtocolManagerFactory.java
@@ -28,8 +28,8 @@ public interface ClientProtocolManagerFactory {
ServerLocator getLocator();
/**
- * Adapt the transport configuration passed in parameter and return an adapted one that is suitable to use with ClientProtocolManager
- * created by this factory.
+ * Adapt the transport configuration passed in parameter and return an adapted one that is suitable to use with
+ * ClientProtocolManager created by this factory.
*
* @param tc the original TransportConfiguration
* @return the adapted TransportConfiguration
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Connection.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Connection.java
index ab91b69a29e..a9695cc42c3 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Connection.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Connection.java
@@ -34,7 +34,7 @@ public interface Connection {
* Create a new ActiveMQBuffer of the given size.
*
* @param size the size of buffer to create
- * @return the new buffer.
+ * @return the new buffer
*/
ActiveMQBuffer createTransportBuffer(int size);
@@ -47,13 +47,14 @@ public interface Connection {
boolean isOpen();
/**
- * Causes the current thread to wait until the connection is writable unless the specified waiting time elapses.
- * The available capacity of the connection could change concurrently hence this method is suitable to perform precise flow-control
- * only in a single writer case, while its precision decrease inversely proportional with the rate and the number of concurrent writers.
- * If the current thread is not allowed to block the timeout will be ignored dependently on the connection type.
+ * Causes the current thread to wait until the connection is writable unless the specified waiting time elapses. The
+ * available capacity of the connection could change concurrently hence this method is suitable to perform precise
+ * flow-control only in a single writer case, while its precision decrease inversely proportional with the rate and
+ * the number of concurrent writers. If the current thread is not allowed to block the timeout will be ignored
+ * dependently on the connection type.
*
- * @param timeout the maximum time to wait
- * @param timeUnit the time unit of the timeout argument
+ * @param timeout the maximum time to wait
+ * @param timeUnit the time unit of the timeout argument
* @return {@code true} if the connection is writable, {@code false} otherwise
* @throws IllegalStateException if the connection is closed
*/
@@ -64,23 +65,20 @@ default boolean blockUntilWritable(final long timeout, final TimeUnit timeUnit)
void fireReady(boolean ready);
/**
- * This will disable reading from the channel.
- * This is basically the same as blocking the reading.
+ * This will disable reading from the channel. This is basically the same as blocking the reading.
*/
void setAutoRead(boolean autoRead);
/**
- * returns the unique id of this wire.
- *
- * @return the id
+ * {@return the unique id of this wire}
*/
Object getID();
EventLoop getEventLoop();
/**
- * writes the buffer to the connection and if flush is true request to flush the buffer
- * (and any previous un-flushed ones) into the wire.
+ * writes the buffer to the connection and if flush is true request to flush the buffer (and any previous un-flushed
+ * ones) into the wire.
*
* @param buffer the buffer to write
* @param requestFlush whether to request flush onto the wire
@@ -95,7 +93,8 @@ default void flush() {
}
/**
- * writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection.
+ * writes the buffer to the connection and if flush is true returns only when the buffer has been physically written
+ * to the connection.
*
* @param buffer the buffer to write
* @param flush whether to flush the buffers onto the wire
@@ -104,7 +103,8 @@ default void flush() {
void write(ActiveMQBuffer buffer, boolean flush, boolean batched);
/**
- * writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection.
+ * writes the buffer to the connection and if flush is true returns only when the buffer has been physically written
+ * to the connection.
*
* @param buffer the buffer to write
* @param flush whether to flush the buffers onto the wire
@@ -120,9 +120,8 @@ default void flush() {
void write(ActiveMQBuffer buffer);
/**
- * This should close the internal channel without calling any listeners.
- * This is to avoid a situation where the broker is busy writing on an internal thread.
- * This should close the socket releasing any pending threads.
+ * This should close the internal channel without calling any listeners. This is to avoid a situation where the
+ * broker is busy writing on an internal thread. This should close the socket releasing any pending threads.
*/
void forceClose();
@@ -136,16 +135,13 @@ default void disconnect() {
}
/**
- * Returns a string representation of the remote address this connection is connected to.
- *
- * @return the remote address
+ * {@return the string representation of the remote address this connection is connected to}
*/
String getRemoteAddress();
/**
- * Returns a string representation of the local address this connection is connected to.
- * This is useful when the server is configured at 0.0.0.0 (or multiple IPs).
- * This will give you the actual IP that's being used.
+ * Returns a string representation of the local address this connection is connected to. This is useful when the
+ * server is configured at 0.0.0.0 (or multiple IPs). This will give you the actual IP that's being used.
*
* @return the local address
*/
@@ -157,8 +153,7 @@ default void disconnect() {
void checkFlushBatchBuffer();
/**
- * Generates a {@link TransportConfiguration} to be used to connect to the same target this is
- * connected to.
+ * Generates a {@link TransportConfiguration} to be used to connect to the same target this is connected to.
*
* @return TransportConfiguration
*/
@@ -169,10 +164,8 @@ default void disconnect() {
ActiveMQPrincipal getDefaultActiveMQPrincipal();
/**
- * the InVM Connection has some special handling as it doesn't use Netty ProtocolChannel
- * we will use this method Instead of using instanceof
- *
- * @return
+ * the InVM Connection has some special handling as it doesn't use Netty ProtocolChannel we will use this method
+ * Instead of using instanceof
*/
boolean isUsingProtocolHandling();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Connector.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Connector.java
index 0f174695768..d495b1b6e3c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Connector.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Connector.java
@@ -23,40 +23,27 @@
*/
public interface Connector {
- /**
- * starts the connector
- */
void start();
- /**
- * closes the connector
- */
void close();
- /**
- * returns true if the connector is started, oterwise false.
- *
- * @return true if the connector is started
- */
boolean isStarted();
/**
* Create and return a connection from this connector.
*
- * This method must NOT throw an exception if it fails to create the connection
- * (e.g. network is not available), in this case it MUST return null
+ * This method must NOT throw an exception if it fails to create the connection (e.g. network is not available), in
+ * this case it MUST return null
*
* @return The connection, or null if unable to create a connection (e.g. network is unavailable)
*/
Connection createConnection();
/**
- * If the configuration is equivalent to this connector, which means
- * if the parameter configuration is used to create a connection to a target
- * node, it will be the same node as of the connections made with this connector.
+ * If the configuration is equivalent to this connector, which means if the parameter configuration is used to create
+ * a connection to a target node, it will be the same node as of the connections made with this connector.
*
- * @param configuration
- * @return true means the configuration is equivalent to the connector. false otherwise.
+ * @return true means the configuration is equivalent to the connector. false otherwise
*/
boolean isEquivalent(Map
* this is because we only ACK after on the RA, We may review this if we always acked earlier.
- *
- * @param lastMessageAsDelivered
- * @throws ActiveMQException
*/
public abstract void simpleRollback(boolean lastMessageAsDelivered) throws ActiveMQException;
@@ -345,8 +322,6 @@ public abstract ClientConsumerInternal createConsumer(SimpleString queueName,
/**
* Performs a round trip to the server requesting what is the current tx timeout on the session
- *
- * @return
*/
public abstract int recoverSessionTimeout() throws ActiveMQException;
@@ -378,8 +353,8 @@ public abstract void recreateSession(String username,
public abstract void returnBlocking(ActiveMQException cause);
/**
- * it will lock the communication channel of the session avoiding anything to come while failover is happening.
- * It happens on preFailover from ClientSessionImpl
+ * it will lock the communication channel of the session avoiding anything to come while failover is happening. It
+ * happens on preFailover from ClientSessionImpl
*/
public abstract void lockCommunications();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/OpenSSLContextFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/OpenSSLContextFactory.java
index 867619350b8..9cabff714a1 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/OpenSSLContextFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/OpenSSLContextFactory.java
@@ -21,11 +21,10 @@
import io.netty.handler.ssl.SslContext;
/**
- * Service interface to create an {@link SslContext} for a configuration.
- * This is ONLY used with OpenSSL.
- * To create and use your own implementation you need to create a file
- *
* Use {@link SSLContextConfig#builder()} to create new immutable instances.
*/
public final class SSLContextConfig {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/SSLContextFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/SSLContextFactory.java
index d3a4a03f741..e448a068988 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/SSLContextFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/SSLContextFactory.java
@@ -20,16 +20,15 @@
import javax.net.ssl.SSLContext;
/**
- * Service interface to create a SSLContext for a configuration.
- * This is NOT used by OpenSSL.
- * To create and use your own implementation you need to create a file
- *
* The reader takes an inputstream and compress it.
+ *
* Not for concurrent use.
*/
public class DeflaterReader extends InputStream {
@@ -55,12 +57,11 @@ public int read() throws IOException {
}
/**
- * Try to fill the buffer with compressed bytes. Except the last effective read,
- * this method always returns with a full buffer of compressed data.
+ * Try to fill the buffer with compressed bytes. Except the last effective read, this method always returns with a
+ * full buffer of compressed data.
*
* @param buffer the buffer to fill compressed bytes
- * @return the number of bytes really filled, -1 indicates end.
- * @throws IOException
+ * @return the number of bytes really filled, -1 indicates end
*/
@Override
public int read(final byte[] buffer, int offset, int len) throws IOException {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/IDGenerator.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/IDGenerator.java
index 4cbc2ff0f74..2cb0bccf9b2 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/IDGenerator.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/IDGenerator.java
@@ -19,12 +19,12 @@
/**
* Generator of record IDs for the journals.
*
- * Notice that while the bindings and messages journals are independent from one another they use
- * the same {@link IDGenerator} instance.
+ * Notice that while the bindings and messages journals are independent from one another they use the same
+ * {@link IDGenerator} instance.
*
- * The next recordID should be persisted in the journals during a normal shutdown. The lack of such
- * a record indicates a server crash. During server restart, if the journals lack a
- * {@literal next-recordID} record, we use the last recorded ID plus {@code MAX_INT}.
+ * The next recordID should be persisted in the journals during a normal shutdown. The lack of such a record indicates a
+ * server crash. During server restart, if the journals lack a {@literal next-recordID} record, we use the last recorded
+ * ID plus {@code MAX_INT}.
*/
public interface IDGenerator {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java
index 183989f4f08..6ff5b3c44e3 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java
@@ -23,8 +23,8 @@
/**
* InflaterReader
- * It takes a compressed input stream and decompressed it as it is being read.
- * Not for concurrent use.
+ *
+ * It takes a compressed input stream and decompressed it as it is being read. Not for concurrent use.
*/
public class InflaterReader extends InputStream {
@@ -70,9 +70,8 @@ public int read() throws IOException {
}
/*
- * feed inflater more bytes in order to get some
- * decompressed output.
- * returns number of bytes actually got
+ * Feed inflater more bytes in order to get some decompressed output.
+ * returns number of bytes actually read
*/
private int doRead(byte[] buf, int offset, int len) throws DataFormatException, IOException {
int read = 0;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterWriter.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterWriter.java
index 2921276ba80..143a354f141 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterWriter.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterWriter.java
@@ -24,9 +24,8 @@
/**
* InflaterWriter
*
- * This class takes an OutputStream. Compressed bytes
- * can directly be written into this class. The class will
- * decompress the bytes and write them to the output stream.
+ * This class takes an OutputStream. Compressed bytes can directly be written into this class. The class will decompress
+ * the bytes and write them to the output stream.
*
* Not for concurrent use.
*/
@@ -46,8 +45,10 @@ public InflaterWriter(final OutputStream output) {
this.output = output;
}
- /*
+ /**
* Write a compressed byte.
+ *
+ * {@inheritDoc}
*/
@Override
public void write(final int b) throws IOException {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/JNDIUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/JNDIUtil.java
index edcbb505556..1502d36bd95 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/JNDIUtil.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/JNDIUtil.java
@@ -61,10 +61,9 @@ public static void tearDownRecursively(final Context c) throws Exception {
}
/**
- * Context.rebind() requires that all intermediate contexts and the target context (that named by
- * all but terminal atomic component of the name) must already exist, otherwise
- * NameNotFoundException is thrown. This method behaves similar to Context.rebind(), but creates
- * intermediate contexts, if necessary.
+ * Context.rebind() requires that all intermediate contexts and the target context (that named by all but terminal
+ * atomic component of the name) must already exist, otherwise NameNotFoundException is thrown. This method behaves
+ * similar to Context.rebind(), but creates intermediate contexts, if necessary.
*/
public static void rebind(final Context c, final String jndiName, final Object o) throws NamingException {
Context context = c;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/ObjectInputStreamWithClassLoader.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/ObjectInputStreamWithClassLoader.java
index 3fa5d17429f..d2897b421c1 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/ObjectInputStreamWithClassLoader.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/ObjectInputStreamWithClassLoader.java
@@ -30,7 +30,6 @@
public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
-
/**
* Value used to indicate that all classes should be allowed or denied
*/
@@ -43,11 +42,9 @@ public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
public static final String BLACKLIST_PROPERTY = "org.apache.activemq.artemis.jms.deserialization.blacklist";
public static final String DENYLIST_PROPERTY = "org.apache.activemq.artemis.jms.deserialization.denylist";
-
private List
- * This IDGenerator doesn't support more than 16777215 IDs per 16 millisecond. It would throw an exception if this happens.
- *
* The information appended are:
*
* The information appended are:
*
* Properties are stored in a journal-sql.properties.
- *
+ *
* Dialects specific to a database can be customized by suffixing the property keys with the name of the dialect.
*/
public class PropertySQLProvider implements SQLProvider {
diff --git a/artemis-jdbc-store/src/test/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryTest.java b/artemis-jdbc-store/src/test/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryTest.java
index 7d3769a6b3b..ea34283f825 100644
--- a/artemis-jdbc-store/src/test/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryTest.java
+++ b/artemis-jdbc-store/src/test/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryTest.java
@@ -318,8 +318,6 @@ public void testCloneFile() throws Exception {
* descriptor has enough information. However, with JDBC we do require that some information is loaded in order to
* get the underlying BLOB. This tests ensures that file.size() returns the correct value, without the user calling
* file.open() with JDBCSequentialFile.
- *
- * @throws Exception
*/
@TestTemplate
public void testGetFileSizeWorksWhenNotOpen() throws Exception {
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/ActiveMQJMSClient.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/ActiveMQJMSClient.java
index f154b782cf6..da5fa58db81 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/ActiveMQJMSClient.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/ActiveMQJMSClient.java
@@ -60,30 +60,22 @@ public class ActiveMQJMSClient {
DEFAULT_ENABLE_1X_PREFIXES = prefixes;
}
- /**
- * Creates an ActiveMQConnectionFactory;
- *
- * @return the ActiveMQConnectionFactory
- */
public static ActiveMQConnectionFactory createConnectionFactory(final String url, String name) throws Exception {
ConnectionFactoryParser parser = new ConnectionFactoryParser();
return parser.newObject(parser.expandURI(url), name);
}
/**
- * Creates an ActiveMQConnectionFactory that receives cluster topology updates from the cluster as
- * servers leave or join and new backups are appointed or removed.
+ * Creates an ActiveMQConnectionFactory that receives cluster topology updates from the cluster as servers leave or
+ * join and new backups are appointed or removed.
*
- * The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP
- * broadcasts which contain connection information for members of the cluster. The broadcasted
- * connection information is simply used to make an initial connection to the cluster, once that
- * connection is made, up to date cluster topology information is downloaded and automatically
- * updated whenever the cluster topology changes. If the topology includes backup servers that
- * information is also propagated to the client so that it can know which server to failover onto
- * in case of server failure.
+ * The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP broadcasts which
+ * contain connection information for members of the cluster. The broadcasted connection information is simply used
+ * to make an initial connection to the cluster, once that connection is made, up to date cluster topology
+ * information is downloaded and automatically updated whenever the cluster topology changes. If the topology
+ * includes backup servers that information is also propagated to the client so that it can know which server to
+ * failover onto in case of server failure.
*
- * @param groupConfiguration
- * @param jmsFactoryType
* @return the ActiveMQConnectionFactory
*/
public static ActiveMQConnectionFactory createConnectionFactoryWithHA(final DiscoveryGroupConfiguration groupConfiguration,
@@ -92,12 +84,11 @@ public static ActiveMQConnectionFactory createConnectionFactoryWithHA(final Disc
}
/**
- * Create an ActiveMQConnectionFactory which creates session factories from a set of active servers, no HA backup information is propagated to the client
- *
+ * Create an ActiveMQConnectionFactory which creates session factories from a set of active servers, no HA backup
+ * information is propagated to the client
+ *
* The UDP address and port are used to listen for active servers in the cluster
*
- * @param groupConfiguration
- * @param jmsFactoryType
* @return the ActiveMQConnectionFactory
*/
public static ActiveMQConnectionFactory createConnectionFactoryWithoutHA(final DiscoveryGroupConfiguration groupConfiguration,
@@ -106,19 +97,17 @@ public static ActiveMQConnectionFactory createConnectionFactoryWithoutHA(final D
}
/**
- * Create an ActiveMQConnectionFactory which will receive cluster topology updates from the cluster
- * as servers leave or join and new backups are appointed or removed.
+ * Create an ActiveMQConnectionFactory which will receive cluster topology updates from the cluster as servers leave
+ * or join and new backups are appointed or removed.
*
- * The initial list of servers supplied in this method is simply to make an initial connection to
- * the cluster, once that connection is made, up to date cluster topology information is
- * downloaded and automatically updated whenever the cluster topology changes. If the topology
- * includes backup servers that information is also propagated to the client so that it can know
- * which server to failover onto in case of server failure.
+ * The initial list of servers supplied in this method is simply to make an initial connection to the cluster, once
+ * that connection is made, up to date cluster topology information is downloaded and automatically updated whenever
+ * the cluster topology changes. If the topology includes backup servers that information is also propagated to the
+ * client so that it can know which server to failover onto in case of server failure.
*
- * @param jmsFactoryType
- * @param initialServers The initial set of servers used to make a connection to the cluster.
- * Each one is tried in turn until a successful connection is made. Once a connection
- * is made, the cluster topology is downloaded and the rest of the list is ignored.
+ * @param initialServers The initial set of servers used to make a connection to the cluster. Each one is tried in
+ * turn until a successful connection is made. Once a connection is made, the cluster topology
+ * is downloaded and the rest of the list is ignored.
* @return the ActiveMQConnectionFactory
*/
public static ActiveMQConnectionFactory createConnectionFactoryWithHA(JMSFactoryType jmsFactoryType,
@@ -130,11 +119,9 @@ public static ActiveMQConnectionFactory createConnectionFactoryWithHA(JMSFactory
* Create an ActiveMQConnectionFactory which creates session factories using a static list of
* transportConfigurations.
*
- * The ActiveMQConnectionFactory is not updated automatically as the cluster topology changes, and
- * no HA backup information is propagated to the client
+ * The ActiveMQConnectionFactory is not updated automatically as the cluster topology changes, and no HA backup
+ * information is propagated to the client
*
- * @param jmsFactoryType
- * @param transportConfigurations
* @return the ActiveMQConnectionFactory
*/
public static ActiveMQConnectionFactory createConnectionFactoryWithoutHA(JMSFactoryType jmsFactoryType,
@@ -144,9 +131,9 @@ public static ActiveMQConnectionFactory createConnectionFactoryWithoutHA(JMSFact
/**
* Creates a client-side representation of a JMS Topic.
- *
- * This method is deprecated. Use {@link org.apache.activemq.artemis.jms.client.ActiveMQSession#createTopic(String)} as that method will know the proper
- * prefix used at the target server.
+ *
+ * This method is deprecated. Use {@link org.apache.activemq.artemis.jms.client.ActiveMQSession#createTopic(String)}
+ * as that method will know the proper prefix used at the target server.
*
* @param name the name of the topic
* @return The Topic
@@ -162,10 +149,10 @@ public static Topic createTopic(final String name) {
/**
* Creates a client-side representation of a JMS Queue.
+ *
+ * This method is deprecated. Use {@link org.apache.activemq.artemis.jms.client.ActiveMQSession#createQueue(String)}
+ * (String)} as that method will know the proper prefix used at the target server. *
*
- * This method is deprecated. Use {@link org.apache.activemq.artemis.jms.client.ActiveMQSession#createQueue(String)} (String)} as that method will know the proper
- * prefix used at the target server.
- * *
* @param name the name of the queue
* @return The Queue
*/
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/JMSFactoryType.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/JMSFactoryType.java
index 01ad1a69b40..ffcfa52a062 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/JMSFactoryType.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/JMSFactoryType.java
@@ -16,6 +16,13 @@
*/
package org.apache.activemq.artemis.api.jms;
+import javax.jms.ConnectionFactory;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.TopicConnectionFactory;
+import javax.jms.XAConnectionFactory;
+import javax.jms.XAQueueConnectionFactory;
+import javax.jms.XATopicConnectionFactory;
+
import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration;
import org.apache.activemq.artemis.api.core.TransportConfiguration;
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
@@ -23,17 +30,9 @@
import org.apache.activemq.artemis.jms.client.ActiveMQQueueConnectionFactory;
import org.apache.activemq.artemis.jms.client.ActiveMQTopicConnectionFactory;
import org.apache.activemq.artemis.jms.client.ActiveMQXAConnectionFactory;
-import org.apache.activemq.artemis.jms.client.ActiveMQXATopicConnectionFactory;
import org.apache.activemq.artemis.jms.client.ActiveMQXAQueueConnectionFactory;
+import org.apache.activemq.artemis.jms.client.ActiveMQXATopicConnectionFactory;
-import javax.jms.ConnectionFactory;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.XAConnectionFactory;
-import javax.jms.XAQueueConnectionFactory;
-import javax.jms.XATopicConnectionFactory;
-
-// XXX no javadocs
public enum JMSFactoryType {
CF {
@Override
@@ -216,45 +215,42 @@ public static JMSFactoryType valueOf(int val) {
}
/**
- * Creates an ActiveMQConnectionFactory that receives cluster topology updates from the cluster as
- * servers leave or join and new backups are appointed or removed.
+ * Creates an ActiveMQConnectionFactory that receives cluster topology updates from the cluster as servers leave or
+ * join and new backups are appointed or removed.
*
- * The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP
- * broadcasts which contain connection information for members of the cluster. The broadcasted
- * connection information is simply used to make an initial connection to the cluster, once that
- * connection is made, up to date cluster topology information is downloaded and automatically
- * updated whenever the cluster topology changes. If the topology includes backup servers that
- * information is also propagated to the client so that it can know which server to failover onto
- * in case of server failure.
+ * The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP broadcasts which
+ * contain connection information for members of the cluster. The broadcasted connection information is simply used
+ * to make an initial connection to the cluster, once that connection is made, up to date cluster topology
+ * information is downloaded and automatically updated whenever the cluster topology changes. If the topology
+ * includes backup servers that information is also propagated to the client so that it can know which server to
+ * failover onto in case of server failure.
*
- * @param groupConfiguration
* @return the ActiveMQConnectionFactory
*/
public abstract ActiveMQConnectionFactory createConnectionFactoryWithHA(DiscoveryGroupConfiguration groupConfiguration);
/**
- * Create an ActiveMQConnectionFactory which creates session factories from a set of active servers, no HA backup information is propagated to the client
+ * Create an ActiveMQConnectionFactory which creates session factories from a set of active servers, no HA backup
+ * information is propagated to the client
*
* The UDP address and port are used to listen for active servers in the cluster
*
- * @param groupConfiguration
* @return the ActiveMQConnectionFactory
*/
public abstract ActiveMQConnectionFactory createConnectionFactoryWithoutHA(DiscoveryGroupConfiguration groupConfiguration);
/**
- * Create an ActiveMQConnectionFactory which will receive cluster topology updates from the cluster
- * as servers leave or join and new backups are appointed or removed.
+ * Create an ActiveMQConnectionFactory which will receive cluster topology updates from the cluster as servers leave
+ * or join and new backups are appointed or removed.
*
- * The initial list of servers supplied in this method is simply to make an initial connection to
- * the cluster, once that connection is made, up to date cluster topology information is
- * downloaded and automatically updated whenever the cluster topology changes. If the topology
- * includes backup servers that information is also propagated to the client so that it can know
- * which server to failover onto in case of server failure.
+ * The initial list of servers supplied in this method is simply to make an initial connection to the cluster, once
+ * that connection is made, up to date cluster topology information is downloaded and automatically updated whenever
+ * the cluster topology changes. If the topology includes backup servers that information is also propagated to the
+ * client so that it can know which server to failover onto in case of server failure.
*
- * @param initialServers The initial set of servers used to make a connection to the cluster.
- * Each one is tried in turn until a successful connection is made. Once a connection
- * is made, the cluster topology is downloaded and the rest of the list is ignored.
+ * @param initialServers The initial set of servers used to make a connection to the cluster. Each one is tried in
+ * turn until a successful connection is made. Once a connection is made, the cluster topology
+ * is downloaded and the rest of the list is ignored.
* @return the ActiveMQConnectionFactory
*/
public abstract ActiveMQConnectionFactory createConnectionFactoryWithHA(TransportConfiguration... initialServers);
@@ -263,18 +259,15 @@ public static JMSFactoryType valueOf(int val) {
* Create an ActiveMQConnectionFactory which creates session factories using a static list of
* transportConfigurations.
*
- * The ActiveMQConnectionFactory is not updated automatically as the cluster topology changes, and
- * no HA backup information is propagated to the client
+ * The ActiveMQConnectionFactory is not updated automatically as the cluster topology changes, and no HA backup
+ * information is propagated to the client
*
- * @param transportConfigurations
* @return the ActiveMQConnectionFactory
*/
public abstract ActiveMQConnectionFactory createConnectionFactoryWithoutHA(TransportConfiguration... transportConfigurations);
/**
- * Returns the connection factory interface that this JMSFactoryType creates.
- *
- * @return the javax.jms Class ConnectionFactory interface
+ * {@return the javax.jms Class ConnectionFactory interface}
*/
public abstract Class connectionFactoryInterface();
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSManagementHelper.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSManagementHelper.java
index 4d0306ba559..2c1668e1380 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSManagementHelper.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSManagementHelper.java
@@ -52,7 +52,8 @@ public static void putAttribute(final Message message,
}
/**
- * Stores an operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.
+ * Stores an operation invocation in a JMS message to invoke the corresponding operation the value from the server
+ * resource.
*
* @param message JMS message
* @param resourceName the name of the resource
@@ -79,7 +80,8 @@ private static JMSException convertFromException(final Exception e) {
}
/**
- * Stores an operation invocation in a JMS message to invoke the corresponding operation the value from the server resource.
+ * Stores an operation invocation in a JMS message to invoke the corresponding operation the value from the server
+ * resource.
*
* @param message JMS message
* @param resourceName the name of the server resource
@@ -100,51 +102,48 @@ public static void putOperationInvocation(final Message message,
}
/**
- * Returns whether the JMS message corresponds to the result of a management operation invocation.
+ * {@return whether the JMS message corresponds to the result of a management operation invocation.}
*/
public static boolean isOperationResult(final Message message) throws JMSException {
return ManagementHelper.isOperationResult(JMSManagementHelper.getCoreMessage(message));
}
/**
- * Returns whether the JMS message corresponds to the result of a management attribute value.
+ * {@return whether the JMS message corresponds to the result of a management attribute value.}
*/
public static boolean isAttributesResult(final Message message) throws JMSException {
return ManagementHelper.isAttributesResult(JMSManagementHelper.getCoreMessage(message));
}
/**
- * Returns whether the invocation of the management operation on the server resource succeeded.
+ * {@return whether the invocation of the management operation on the server resource succeeded.}
*/
public static boolean hasOperationSucceeded(final Message message) throws JMSException {
return ManagementHelper.hasOperationSucceeded(JMSManagementHelper.getCoreMessage(message));
}
/**
- * Returns the result of an operation invocation or an attribute value.
- *
- * The flat implementation of {@link TopicConnection} and {@link QueueConnection} is per design,
- * following the common usage of these as one flat API in JMS 1.1.
+ * The flat implementation of {@link TopicConnection} and {@link QueueConnection} is per design, following the common
+ * usage of these as one flat API in JMS 1.1.
*/
public class ActiveMQConnection extends ActiveMQConnectionForContextImpl implements TopicConnection, QueueConnection {
@@ -173,12 +173,10 @@ public ActiveMQConnection(final ConnectionFactoryOptions options,
}
/**
- * This internal method serves basically the Resource Adapter.
- * The resource adapter plays with an XASession and a non XASession.
- * When there is no enlisted transaction, the EE specification mandates that the commit should
- * be done as if it was a nonXA Session (i.e. SessionTransacted).
- * For that reason we have this method to force that nonXASession, since the JMS Javadoc
- * mandates createSession to return a XASession.
+ * This internal method serves basically the Resource Adapter. The resource adapter plays with an XASession and a non
+ * XASession. When there is no enlisted transaction, the EE specification mandates that the commit should be done as
+ * if it was a nonXA Session (i.e. SessionTransacted). For that reason we have this method to force that
+ * nonXASession, since the JMS Javadoc mandates createSession to return a XASession.
*/
public synchronized Session createNonXASession(final boolean transacted, final int acknowledgeMode) throws JMSException {
checkClosed();
@@ -187,12 +185,10 @@ public synchronized Session createNonXASession(final boolean transacted, final i
}
/**
- * This internal method serves basically the Resource Adapter.
- * The resource adapter plays with an XASession and a non XASession.
- * When there is no enlisted transaction, the EE specification mandates that the commit should
- * be done as if it was a nonXA Session (i.e. SessionTransacted).
- * For that reason we have this method to force that nonXASession, since the JMS Javadoc
- * mandates createSession to return a XASession.
+ * This internal method serves basically the Resource Adapter. The resource adapter plays with an XASession and a non
+ * XASession. When there is no enlisted transaction, the EE specification mandates that the commit should be done as
+ * if it was a nonXA Session (i.e. SessionTransacted). For that reason we have this method to force that
+ * nonXASession, since the JMS Javadoc mandates createSession to return a XASession.
*/
public synchronized Session createNonXATopicSession(final boolean transacted, final int acknowledgeMode) throws JMSException {
checkClosed();
@@ -201,12 +197,10 @@ public synchronized Session createNonXATopicSession(final boolean transacted, fi
}
/**
- * This internal method serves basically the Resource Adapter.
- * The resource adapter plays with an XASession and a non XASession.
- * When there is no enlisted transaction, the EE specification mandates that the commit should
- * be done as if it was a nonXA Session (i.e. SessionTransacted).
- * For that reason we have this method to force that nonXASession, since the JMS Javadoc
- * mandates createSession to return a XASession.
+ * This internal method serves basically the Resource Adapter. The resource adapter plays with an XASession and a non
+ * XASession. When there is no enlisted transaction, the EE specification mandates that the commit should be done as
+ * if it was a nonXA Session (i.e. SessionTransacted). For that reason we have this method to force that
+ * nonXASession, since the JMS Javadoc mandates createSession to return a XASession.
*/
public synchronized Session createNonXAQueueSession(final boolean transacted, final int acknowledgeMode) throws JMSException {
checkClosed();
@@ -498,7 +492,6 @@ public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic,
* Sets a FailureListener for the session which is notified if a failure occurs on the session.
*
* @param listener the listener to add
- * @throws JMSException
*/
public void setFailoverListener(final FailoverEventListener listener) throws JMSException {
checkClosed();
@@ -510,8 +503,7 @@ public void setFailoverListener(final FailoverEventListener listener) throws JMS
}
/**
- * @return {@link FailoverEventListener} the current failover event listener for this connection
- * @throws JMSException
+ * {@return {@link FailoverEventListener} the current failover event listener for this connection}
*/
public FailoverEventListener getFailoverListener() throws JMSException {
checkClosed();
@@ -612,13 +604,6 @@ public ClientSessionFactory getSessionFactory() {
}
- /**
- * @param transacted
- * @param acknowledgeMode
- * @param session
- * @param type
- * @return
- */
protected ActiveMQSession createAMQSession(boolean isXA,
boolean transacted,
int acknowledgeMode,
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java
index 0d31706dff1..bb8bd135b14 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java
@@ -44,6 +44,7 @@
import java.util.Properties;
import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration;
+import org.apache.activemq.artemis.api.core.Interceptor;
import org.apache.activemq.artemis.api.core.TransportConfiguration;
import org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory;
import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
@@ -63,8 +64,9 @@
import org.apache.activemq.artemis.utils.uri.URISupport;
/**
- * ActiveMQ Artemis implementation of a JMS ConnectionFactory. This connection factory will use defaults defined by {@link DefaultConnectionProperties}.
+ * ActiveMQ Artemis implementation of a JMS ConnectionFactory.
+ *
+ * This connection factory will use defaults defined by {@link DefaultConnectionProperties}.
*/
public class ActiveMQConnectionFactory extends JNDIStorable implements ConnectionFactoryOptions, Externalizable, ConnectionFactory, XAConnectionFactory, AutoCloseable {
@@ -239,13 +241,14 @@ public ActiveMQConnectionFactory(String brokerURL) {
}
}
- /** Warning: This method will not clear any previous properties.
- * Say, you set the user on a first call.
- * Now you just change the brokerURI on a second call without passing the user.
- * The previous filled user will be already set, and nothing will clear it out.
- *
- * Also: you cannot use this method after the connection factory is made readOnly.
- * Which happens after you create a first connection. */
+ /**
+ * Warning: This method will not clear any previous properties. For example, if you set the user first then
+ * you change the brokerURL without passing the user. The previously set user will still exist, and nothing will
+ * clear it out.
+ *
+ * Also, you cannot use this method after this {@code ConnectionFactory} is made {@code readOnly} which happens after
+ * the first time it's used to create a connection.
+ */
public void setBrokerURL(String brokerURL) throws JMSException {
if (readOnly) {
throw new javax.jms.IllegalStateException("You cannot use setBrokerURL after the connection factory has been used");
@@ -640,9 +643,6 @@ public synchronized void setProducerWindowSize(final int producerWindowSize) {
serverLocator.setProducerWindowSize(producerWindowSize);
}
- /**
- * @param cacheLargeMessagesClient
- */
public synchronized void setCacheLargeMessagesClient(final boolean cacheLargeMessagesClient) {
checkWrite();
serverLocator.setCacheLargeMessagesClient(cacheLargeMessagesClient);
@@ -806,7 +806,10 @@ public void setIgnoreJTA(boolean ignoreJTA) {
}
/**
- * @param interceptorList a comma separated string of incoming interceptor class names to be used. Each interceptor needs a default Constructor to be used with this method.
+ * Set the list of {@link Interceptor}s to use for incoming packets.
+ *
+ * @param interceptorList a comma separated string of incoming interceptor class names to be used. Each interceptor
+ * needs a default Constructor to be used with this method.
*/
public void setIncomingInterceptorList(String interceptorList) {
checkWrite();
@@ -818,7 +821,10 @@ public String getIncomingInterceptorList() {
}
/**
- * @param interceptorList a comma separated string of incoming interceptor class names to be used. Each interceptor needs a default Constructor to be used with this method.
+ * Set the list of {@link Interceptor}s to use for outgoing packets.
+ *
+ * @param interceptorList a comma separated string of incoming interceptor class names to be used. Each interceptor
+ * needs a default Constructor to be used with this method.
*/
public void setOutgoingInterceptorList(String interceptorList) {
serverLocator.setOutgoingInterceptorList(interceptorList);
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
index 7cacc09e049..a9116684312 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
@@ -46,8 +46,9 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
public static final String TEMP_QUEUE_QUALIFED_PREFIX = DestinationUtil.TEMP_QUEUE_QUALIFED_PREFIX;
public static final String TEMP_TOPIC_QUALIFED_PREFIX = DestinationUtil.TEMP_TOPIC_QUALIFED_PREFIX;
- /** createQueue and createTopic from {@link ActiveMQSession} may change the name
- * in case Prefix usage */
+ /**
+ * {@code createQueue} and {@code createTopic} from {@link ActiveMQSession} may change the name in case Prefix usage
+ */
void setName(String name) {
this.name = name;
}
@@ -193,7 +194,8 @@ public static Pair
+ * JMS Messages only live on the client side - the server only deals with MessageImpl instances
*/
public class ActiveMQMessage implements javax.jms.Message {
@@ -206,7 +205,7 @@ public static ActiveMQMessage createMessage(final ClientMessage message,
- /*
+ /**
* Create a new message prior to sending
*/
protected ActiveMQMessage(final byte type, final ClientSession session) {
@@ -232,7 +231,7 @@ public ActiveMQMessage(final ClientMessage message, final ClientSession session)
this.session = session;
}
- /*
+ /**
* A constructor that takes a foreign message
*/
public ActiveMQMessage(final Message foreign, final ClientSession session) throws JMSException {
@@ -263,12 +262,9 @@ protected ActiveMQMessage(final Message foreign, final byte type, final ClientSe
}
}
} else {
- // Some providers, like WSMQ do automatic conversions between native byte[] correlation id
- // and String correlation id. This makes it impossible for ActiveMQ Artemis to guarantee to return the correct
- // type as set by the user
- // So we allow the behaviour to be overridden by a system property
- // https://jira.jboss.org/jira/browse/HORNETQ-356
- // https://jira.jboss.org/jira/browse/HORNETQ-332
+ // Some providers like WSMQ do automatic conversions between native byte[] correlation id and String
+ // correlation id. This makes it impossible for ActiveMQ Artemis to guarantee to return the correct type as set
+ // by the user. Therefore, we allow the behaviour to be overridden by a system property.
String corrIDString = foreign.getJMSCorrelationID();
if (corrIDString != null) {
setJMSCorrelationID(corrIDString);
@@ -736,7 +732,6 @@ public
+ * If the message is a {@code Message} (but not one of its subtypes) then this method will return {@code true}
+ * irrespective of the value of this parameter.
+ */
@Override
public boolean isBodyAssignableTo(Class c) {
- /**
- * From the specs:
- *
- * If the message is a {@code Message} (but not one of its subtypes) then this method will
- * return true irrespective of the value of this parameter.
- */
return true;
}
/**
* Helper method for {@link #isBodyAssignableTo(Class)}.
*
- * @return true if the message has no body.
+ * @return {@code true} if the message has no body
*/
protected boolean hasNoBody() {
return message.getBodySize() == 0;
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java
index 9f146f2b42f..4f6a3bd5d23 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java
@@ -243,8 +243,8 @@ private ActiveMQMessage getMessage(final long timeout, final boolean noWait) thr
throw ioob;
}
- // We Do the ack after doBeforeReceive, as in the case of large messages, this may fail so we don't want messages redelivered
- // https://issues.jboss.org/browse/JBPAPP-6110
+ // We Do the ack after doBeforeReceive, as in the case of large messages, this may fail so we don't want
+ // messages redelivered
if (session.getAcknowledgeMode() == ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE) {
jmsMsg.setIndividualAcknowledge();
} else if (session.getAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE) {
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
index 7da7acbb0e1..68cf2b13e65 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
@@ -473,7 +473,7 @@ private void doSendx(ActiveMQDestination destination,
coreMessage.setRoutingType(destination.isQueue() ? RoutingType.ANYCAST : RoutingType.MULTICAST);
try {
- /**
+ /*
* Using a completionListener requires wrapping using a {@link CompletionListenerWrapper},
* so we avoid it if we can.
*/
@@ -510,10 +510,6 @@ private static final class CompletionListenerWrapper implements SendAcknowledgem
private final Message jmsMessage;
private final ActiveMQMessageProducer producer;
- /**
- * @param jmsMessage
- * @param producer
- */
private CompletionListenerWrapper(CompletionListener listener,
Message jmsMessage,
ActiveMQMessageProducer producer) {
@@ -553,14 +549,14 @@ public void sendFailed(org.apache.activemq.artemis.api.core.Message clientMessag
try {
streamMessage.reset();
} catch (JMSException e) {
- // HORNETQ-1209 XXX ignore?
+ // ignore?
}
}
if (jmsMessage instanceof BytesMessage bytesMessage) {
try {
bytesMessage.reset();
} catch (JMSException e) {
- // HORNETQ-1209 XXX ignore?
+ // ignore?
}
}
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java
index e658f428080..63798c8c458 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java
@@ -32,7 +32,7 @@
/**
* ActiveMQ Artemis implementation of a JMS ObjectMessage.
- *
- * Otherwise, a subsequent {@link #trySend} would return {@link SendAttemptResult#NotAvailable}.
+ * If {@code true}, a subsequent {@link #trySend} would return {@link SendAttemptResult#Success}. Otherwise, a
+ * subsequent {@link #trySend} would return {@link SendAttemptResult#NotAvailable}.
*/
private boolean isAvailable() {
if (maxPending > 0 && pending == maxPending) {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/PaddingDecimalFormat.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/PaddingDecimalFormat.java
index da96323200e..7ade8fbf050 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/PaddingDecimalFormat.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/PaddingDecimalFormat.java
@@ -26,8 +26,8 @@ public class PaddingDecimalFormat extends DecimalFormat {
private final StringBuilder pad;
/**
- * Creates a PaddingDecimalFormat using the given pattern and minimum {@code minLength} and the symbols for the default
- * locale.
+ * Creates a PaddingDecimalFormat using the given pattern and minimum {@code minLength} and the symbols for the
+ * default locale.
*/
public PaddingDecimalFormat(String pattern, int minLength) {
super(pattern);
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java
index 055d9bce869..7bc59464f4c 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java
@@ -430,16 +430,10 @@ private static class PageCursorsInfo {
private PageCursorsInfo() {
}
- /**
- * @return the pgTXs
- */
Setorg.apache.activemq.tools.XmlDataImporter
and
- * org.apache.activemq.tools.XmlDataExporter
.
+ * The constants shared by {@code org.apache.activemq.tools.XmlDataImporter} and
+ * {@code org.apache.activemq.tools.XmlDataExporter}.
*/
public final class XmlDataConstants {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java
index 66ca7250a8b..3dee30d1178 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java
@@ -130,13 +130,6 @@ public Object execute(ActionContext context) throws Exception {
/**
* Use setConfiguration and process(out) instead.
- *
- * @param out
- * @param bindingsDir
- * @param journalDir
- * @param pagingDir
- * @param largeMessagesDir
- * @throws Exception
*/
@Deprecated
public void process(OutputStream out,
@@ -409,9 +402,10 @@ private void printSingleMessageAsXML(ICoreMessage message, Listorg.apache.activemq.artemis.core.persistence.impl.journal.XmlDataExporter
, create a core session, and
- * send the messages to a running instance of ActiveMQ Artemis. It uses the StAX javax.xml.stream.XMLStreamReader
- * for speed and simplicity.
+ * Read XML output from {@code org.apache.activemq.artemis.core.persistence.impl.journal.XmlDataExporter}, create a core
+ * session, and send the messages to a running instance of ActiveMQ Artemis. It uses the StAX
+ * {@code javax.xml.stream.XMLStreamReader} for speed and simplicity.
*/
@Command(name = "imp", description = "Import all message-data using an XML that could be interpreted by any system.")
public final class XmlDataImporter extends ConnectionConfigurationAbtract {
@@ -130,9 +130,9 @@ public void process(String inputFileName, String host, int port) throws Exceptio
/**
* This is the normal constructor for programmatic access to the
- * org.apache.activemq.artemis.core.persistence.impl.journal.XmlDataImporter
if the session passed
- * in uses auto-commit for sends.
- *
+ * {@code org.apache.activemq.artemis.core.persistence.impl.journal.XmlDataImporter} if the session passed in uses
+ * auto-commit for sends.
+ *
- * Pass in a session which doesn't use auto-commit for sends, and one that does (for management
- * operations necessary during import).
+ * {@code
* ./artemis user rm --user guest
+ * }
*/
@Command(name = "rm", description = "Remove an existing user.")
public class RemoveUser extends UserAction {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/ResetUser.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/ResetUser.java
index 795d1b739e0..bd782b75539 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/ResetUser.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/ResetUser.java
@@ -23,7 +23,9 @@
/**
* Reset a user's password or roles, example:
+ * {@code
* ./artemis user reset --user guest --role admin --password ***
+ * }
*/
@Command(name = "reset", description = "Reset user's password or roles.")
public class ResetUser extends PasswordAction {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java
index df43ac2f6af..8743beefb66 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java
@@ -37,7 +37,6 @@
/**
* It will perform a simple test to evaluate how many syncs a disk can make per second
- * * *
*/
public class SyncCalculation {
@@ -45,13 +44,16 @@ public class SyncCalculation {
private static final long MAX_FLUSH_NANOS = TimeUnit.SECONDS.toNanos(5);
/**
- * It will perform {@code tries} write tests of {@code blockSize * blocks} bytes and returning the lowest elapsed time to perform a try.
- *
+ * It will perform {@code tries} write tests of {@code blockSize * blocks} bytes and returning the lowest elapsed
+ * time to perform a try. *
*
* // Create a buffer whose readerIndex, writerIndex and capacity are
@@ -92,7 +85,7 @@ public interface ActiveMQBuffer extends DataInput {
* buf.readerIndex(2);
* buf.writerIndex(4);
*
- *
+ *
@@ -108,11 +101,9 @@ public interface ActiveMQBuffer extends DataInput {
* buf.writerIndex(4);
* buf.readerIndex(2);
*
- *
- * By contrast, {@link #setIndex(int, int)} guarantees that it never
- * throws an {@link IndexOutOfBoundsException} as long as the specified
- * indexes meet basic constraints, regardless what the current index
- * values of the buffer are:
+ *
* // No matter what the current state of the buffer is, the following
@@ -123,72 +114,64 @@ public interface ActiveMQBuffer extends DataInput {
*
* @param readerIndex The reader's index
* @param writerIndex The writer's index
- * @throws IndexOutOfBoundsException if the specified {@code readerIndex} is less than 0,
- * if the specified {@code writerIndex} is less than the specified
- * {@code readerIndex} or if the specified {@code writerIndex} is
- * greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code readerIndex} is less than 0, if the specified
+ * {@code writerIndex} is less than the specified {@code readerIndex} or if the
+ * specified {@code writerIndex} is greater than {@code this.capacity}
*/
void setIndex(int readerIndex, int writerIndex);
/**
- * @return the number of readable bytes which is equal to {@code (this.writerIndex - this.readerIndex)}.
+ * {@return the number of readable bytes which is equal to {@code (this.writerIndex - this.readerIndex)}}
*/
int readableBytes();
/**
- * @return the number of writable bytes which is equal to {@code (this.capacity - this.writerIndex)}.
+ * {@return the number of writable bytes which is equal to {@code (this.capacity - this.writerIndex)}}
*/
int writableBytes();
/**
- * @return {@code true} if and only if {@code (this.writerIndex - this.readerIndex)} is greater than {@code 0}.
+ * {@return {@code true} if and only if {@code (this.writerIndex - this.readerIndex)} is greater than {@code 0}}
*/
boolean readable();
/**
- * @return {@code true}if and only if {@code (this.capacity - this.writerIndex)} is greater than {@code 0}.
+ * {@return {@code true}if and only if {@code (this.capacity - this.writerIndex)} is greater than {@code 0}}
*/
boolean writable();
/**
- * Sets the {@code readerIndex} and {@code writerIndex} of this buffer to
- * {@code 0}.
- * This method is identical to {@link #setIndex(int, int) setIndex(0, 0)}.
+ * Sets the {@code readerIndex} and {@code writerIndex} of this buffer to {@code 0}. This method is identical to
+ * {@link #setIndex(int, int) setIndex(0, 0)}.
*
- *
- *
*/
public interface JsonArray extends JsonValue, List
+ * When a delay request succeed it schedule a new execution to happen in {@link #getPeriod()}.
*/
public boolean delay() {
final AtomicBoolean booked = this.bookedForRunning;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
index 73c86e2976e..4d29a5e4a8d 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
@@ -39,8 +39,8 @@
import java.lang.invoke.MethodHandles;
/**
- * This will use {@link InetAddress#isReachable(int)} to determine if the network is alive.
- * It will have a set of addresses, and if any address is reached the network will be considered alive.
+ * This will use {@link InetAddress#isReachable(int)} to determine if the network is alive. It will have a set of
+ * addresses, and if any address is reached the network will be considered alive.
*/
public class NetworkHealthCheck extends ActiveMQScheduledComponent {
@@ -306,7 +306,7 @@ public void run() {
}
/**
- * @return true if no checks were done or if one address/url responds; false if all addresses/urls fail
+ * {@return true if no checks were done or if one address/url responds; false if all addresses/urls fail}
*/
public boolean check() {
if (isEmpty()) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonArray.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonArray.java
index 88833dec64a..af4c2d7c545 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonArray.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonArray.java
@@ -33,67 +33,71 @@
* {"name":"sue", "age": 42},
* ]
* {@code
+ * Returns a {@code List} for the array. The value and the type of the elements in the list is specified by the
+ * {@code func} argument.
+ *
* It can also be used to obtain a list of simple projections, such as
- *
+ * {@code
* List
+ * }
+ * {@code
+ *
+ *
+ * @param
+ * {@code
* Lsit
- * @param
+ * This ensure a more exact resizing then {@link ByteBuf#ensureWritable(int)}, if needed.
+ *
- * In order to be fast is up to the caller to check arguments correctness.
- * Original algorithm is on https://en.wikipedia.org/wiki/Data_structure_alignment.
+ * Fast alignment operation with power of 2 {@code alignment} and {@code value >=0} and
+ * {@code value <}{@link Integer#MAX_VALUE}.
+ * String
for the given
+ * String
+ * @return An upper case hexadecimal {@code String}
*/
private static String hex(char ch) {
return Integer.toHexString(ch).toUpperCase();
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Suppliers.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Suppliers.java
index c184f097274..023f9d73962 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Suppliers.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Suppliers.java
@@ -27,18 +27,15 @@
public class Suppliers {
/**
- * Returns a supplier which caches the instance retrieved during the first
- * call to {@code get()} and returns that value on subsequent calls to
- * {@code get()}. See:
+ * Returns a supplier which caches the instance retrieved during the first call to {@code get()} and returns that
+ * value on subsequent calls to {@code get()}. See:
* memoization
- *
- *
- * Of course, assuming UUIDs are randomized enough, even simpler approach
- * might be good enough?
- *
- * Is this a good hash? ... one of these days I better read more about basic
- * hashing techniques I swear!
+ *
- *
*
- *
* System.currentTimeMillis()
- * returned: used to catch (and report) cases where system clock goes
- * backwards. Is also used to limit "drifting", that is, amount timestamps
- * used can differ from the system time value. This value is not guaranteed
- * to be monotonically increasing.
+ * Last physical timestamp value {@code System.currentTimeMillis()} returned: used to catch (and report) cases where
+ * system clock goes backwards. Is also used to limit "drifting", that is, amount timestamps used can differ from the
+ * system time value. This value is not guaranteed to be monotonically increasing.
*/
private long mLastSystemTimestamp = 0L;
/**
- * Timestamp value last used for generating a UUID (along with
- * {@link #mClockCounter}. Usually the same as {@link #mLastSystemTimestamp},
- * but not always (system clock moved backwards). Note that this value is
- * guaranteed to be monotonically increasing; that is, at given absolute time
- * points t1 and t2 (where t2 is after t1), t1 <= t2 will always hold true.
+ * Timestamp value last used for generating a UUID (along with {@link #mClockCounter}. Usually the same as
+ * {@link #mLastSystemTimestamp}, but not always (system clock moved backwards). Note that this value is guaranteed
+ * to be monotonically increasing; that is, at given absolute time points t1 and t2 (where t2 is after t1), t1 <= t2
+ * will always hold true.
*/
private long mLastUsedTimestamp = 0L;
@@ -133,16 +116,15 @@ public class UUIDTimer {
private void initCounters(final Random rnd) {
/*
- * Let's generate the clock sequence field now; as with counter, this
- * reduces likelihood of collisions (as explained in UUID specs)
+ * Let's generate the clock sequence field now; as with counter, this reduces likelihood of collisions (as
+ * explained in UUID specs)
*/
rnd.nextBytes(mClockSequence);
/*
- * Ok, let's also initialize the counter... Counter is used to make it
- * slightly less likely that two instances of UUIDGenerator (from separate
- * JVMs as no more than one can be created in one JVM) would produce
- * colliding time-based UUIDs. The practice of using multiple generators,
- * is strongly discouraged, of course, but just in case...
+ * Ok, let's also initialize the counter... Counter is used to make it slightly less likely that two instances of
+ * UUIDGenerator (from separate JVMs as no more than one can be created in one JVM) would produce colliding
+ * time-based UUIDs. The practice of using multiple generators, is strongly discouraged, of course, but just in
+ * case...
*/
mClockCounter = mClockSequence[2] & 0xFF;
}
@@ -154,10 +136,7 @@ public void getTimestamp(final byte[] uuidData) {
long systime = System.currentTimeMillis();
- /*
- * Let's first verify that the system time is not going backwards;
- * independent of whether we can use it:
- */
+ // Let's first verify that the system time is not going backwards; independent of whether we can use it:
if (systime < mLastSystemTimestamp) {
// Logger.logWarning("System time going backwards! (got value
// "+systime+", last "+mLastSystemTimestamp);
@@ -166,15 +145,11 @@ public void getTimestamp(final byte[] uuidData) {
}
/*
- * But even without it going backwards, it may be less than the last one
- * used (when generating UUIDs fast with coarse clock resolution; or if
- * clock has gone backwards over reboot etc).
+ * But even without it going backwards, it may be less than the last one used (when generating UUIDs fast with
+ * coarse clock resolution; or if clock has gone backwards over reboot etc).
*/
if (systime <= mLastUsedTimestamp) {
- /*
- * Can we just use the last time stamp (ok if the counter hasn't hit
- * max yet)
- */
+ // Can we just use the last time stamp (ok if the counter hasn't hit max yet)
if (mClockCounter < UUIDTimer.kClockMultiplier) { // yup, still have room
systime = mLastUsedTimestamp;
} else { // nope, have to roll over to next value and maybe wait
@@ -186,17 +161,15 @@ public void getTimestamp(final byte[] uuidData) {
// random sequence");
/*
- * Clock counter is now at exactly the multiplier; no use just
- * anding its value. So, we better get some random numbers
- * instead...
+ * Clock counter is now at exactly the multiplier; no use just anding its value. So, we better get some
+ * random numbers instead...
*/
initCounters(mRnd);
/*
- * But do we also need to slow down? (to try to keep virtual time
- * close to physical time; ie. either catch up when system clock has
- * been moved backwards, or when coarse clock resolution has forced
- * us to advance virtual timer too far)
+ * But do we also need to slow down? (to try to keep virtual time close to physical time; ie. either catch
+ * up when system clock has been moved backwards, or when coarse clock resolution has forced us to advance
+ * virtual timer too far)
*/
if (actDiff >= UUIDTimer.kMaxClockAdvance) {
UUIDTimer.slowDown(origTime, actDiff);
@@ -204,9 +177,8 @@ public void getTimestamp(final byte[] uuidData) {
}
} else {
/*
- * Clock has advanced normally; just need to make sure counter is reset
- * to a low value (need not be 0; good to leave a small residual to
- * further decrease collisions)
+ * Clock has advanced normally; just need to make sure counter is reset to a low value (need not be 0; good to
+ * leave a small residual to further decrease collisions)
*/
mClockCounter &= 0xFF;
}
@@ -214,8 +186,8 @@ public void getTimestamp(final byte[] uuidData) {
mLastUsedTimestamp = systime;
/*
- * Now, let's translate the timestamp to one UUID needs, 100ns unit offset
- * from the beginning of Gregorian calendar...
+ * Now, let's translate the timestamp to one UUID needs, 100ns unit offset from the beginning of Gregorian
+ * calendar...
*/
systime *= UUIDTimer.kClockMultiplierL;
systime += UUIDTimer.kClockOffset;
@@ -225,10 +197,7 @@ public void getTimestamp(final byte[] uuidData) {
// and then increase
++mClockCounter;
- /*
- * Time fields are nicely split across the UUID, so can't just linearly
- * dump the stamp:
- */
+ // Time fields are nicely split across the UUID, so can't just linearly dump the stamp:
int clockHi = (int) (systime >>> 32);
int clockLo = (int) systime;
@@ -246,17 +215,12 @@ public void getTimestamp(final byte[] uuidData) {
private static final int MAX_WAIT_COUNT = 50;
/**
- * Simple utility method to use to wait for couple of milliseconds, to let
- * system clock hopefully advance closer to the virtual timestamps used.
- * Delay is kept to just a millisecond or two, to prevent excessive blocking;
- * but that should be enough to eventually synchronize physical clock with
- * virtual clock values used for UUIDs.
+ * Simple utility method to use to wait for couple of milliseconds, to let system clock hopefully advance closer to
+ * the virtual timestamps used. Delay is kept to just a millisecond or two, to prevent excessive blocking; but that
+ * should be enough to eventually synchronize physical clock with virtual clock values used for UUIDs.
*/
private static void slowDown(final long startTime, final long actDiff) {
- /*
- * First, let's determine how long we'd like to wait. This is based on how
- * far ahead are we as of now.
- */
+ // First, let's determine how long we'd like to wait. This is based on how far ahead are we as of now.
long ratio = actDiff / UUIDTimer.kMaxClockAdvance;
long delay;
@@ -280,8 +244,8 @@ private static void slowDown(final long startTime, final long actDiff) {
}
delay = 1L;
/*
- * This is just a sanity check: don't want an "infinite" loop if clock
- * happened to be moved backwards by, say, an hour...
+ * This is just a sanity check: don't want an "infinite" loop if clock happened to be moved backwards by, say,
+ * an hour...
*/
if (++counter > UUIDTimer.MAX_WAIT_COUNT) {
break;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Waiter.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Waiter.java
index 49e301085e1..45e9b630eb2 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Waiter.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Waiter.java
@@ -27,8 +27,10 @@ public interface Condition {
boolean result();
}
- /** This method will wait for the condition.result to be true or a timeout has ocurred.
- * it will return the last result. */
+ /**
+ * This method will wait for the condition.result to be true or a timeout has ocurred. it will return the last
+ * result.
+ */
public static boolean waitFor(Condition condition, TimeUnit unit, long timeout, TimeUnit parkUnit, long parkTime) {
long timeoutNanos = unit.toNanos(timeout);
final long deadline = System.nanoTime() + timeoutNanos;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ArtemisExecutor.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ArtemisExecutor.java
index e1ea54e0c39..43bbd9cf0c3 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ArtemisExecutor.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ArtemisExecutor.java
@@ -24,18 +24,15 @@
public interface ArtemisExecutor extends Executor {
/**
- * Artemis is supposed to implement this properly, however in tests or tools
- * this can be used as a fake, doing a simple delegate and using the default methods implemented here.
- * @param executor
- * @return
+ * Artemis is supposed to implement this properly, however in tests or tools this can be used as a fake, doing a
+ * simple delegate and using the default methods implemented here.
*/
static ArtemisExecutor delegate(Executor executor) {
return executor::execute;
}
/**
- * It will wait the current execution (if there is one) to finish
- * but will not complete any further executions.
+ * It will wait the current execution (if there is one) to finish but will not complete any further executions.
*
* @param onPendingTask it will be called for each pending task found
* @return the number of pending tasks that won't be executed
@@ -44,12 +41,9 @@ default int shutdownNow(Consumer super Runnable> onPendingTask, int timeout, T
return 0;
}
- /** To be used to flush an executor from a different thread.
- * WARNING: Do not call this within the executor. That would be stoopid ;)
- *
- * @param timeout
- * @param unit
- * @return
+ /**
+ * To be used to flush an executor from a different thread.
+ * WARNING: Do not call this within the executor. That would be stoopid ;)
*/
default boolean flush(long timeout, TimeUnit unit) {
CountDownLatch latch = new CountDownLatch(1);
@@ -62,8 +56,7 @@ default boolean flush(long timeout, TimeUnit unit) {
}
/**
- * It will wait the current execution (if there is one) to finish
- * but will not complete any further executions
+ * It will wait the current execution (if there is one) to finish but will not complete any further executions
*/
default int shutdownNow() {
return shutdownNow(t -> {
@@ -86,16 +79,16 @@ default boolean isFair() {
return false;
}
- /** If this OrderedExecutor is fair, it will yield for another executors after each task ran */
+ /**
+ * If this OrderedExecutor is fair, it will yield for another executors after each task ran
+ */
default ArtemisExecutor setFair(boolean fair) {
return this;
}
-
-
/**
- * This will verify if the executor is flushed with no wait (or very minimal wait if not the {@link org.apache.activemq.artemis.utils.actors.OrderedExecutor}
- * @return
+ * This will verify if the executor is flushed with no wait (or very minimal wait if not the
+ * {@link org.apache.activemq.artemis.utils.actors.OrderedExecutor}
*/
default boolean isFlushed() {
CountDownLatch latch = new CountDownLatch(1);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/HandlerBase.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/HandlerBase.java
index cd76ba493e0..6010a028a04 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/HandlerBase.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/HandlerBase.java
@@ -18,10 +18,8 @@
package org.apache.activemq.artemis.utils.actors;
/**
- * This abstract class will encapsulate
- * ThreadLocals to determine when a class is a handler.
- * This is because some functionality has to be avoided if inHandler().
- *
+ * This abstract class will encapsulate ThreadLocals to determine when a class is a handler. This is because some
+ * functionality has to be avoided if inHandler().
*/
public abstract class HandlerBase {
@@ -32,7 +30,10 @@ private static class Counter {
// There is only going to be a single Thread using the counter, so it is safe to cache this instance
private final Counter cachedCounter = new Counter();
- /** an actor could be used within an OrderedExecutor. So we need this counter to decide if there's a Handler anywhere in the stack trace */
+ /**
+ * an actor could be used within an OrderedExecutor. So we need this counter to decide if there's a Handler anywhere
+ * in the stack trace
+ */
private static final ThreadLocal
+ *
- * It is meant to be used only for test purposes, because of its {@code O(n)} cost.
+ * This method is safe to be called by different threads and its accuracy is subject to concurrent modifications. It
+ * is meant to be used only for test purposes, because of its {@code O(n)} cost.
+ *
+ * @return the remaining items to be processed
*/
public final int remaining() {
return tasks.size();
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/bean/MetaBean.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/bean/MetaBean.java
index cc89858660a..191f55fb591 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/bean/MetaBean.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/bean/MetaBean.java
@@ -34,13 +34,13 @@
import org.slf4j.LoggerFactory;
/**
- * Receives a metadata about a class with methods to read, write and certain gates.
- * And provides a generic logic to convert to and from JSON.
+ * Receives a metadata about a class with methods to read, write and certain gates. And provides a generic logic to
+ * convert to and from JSON.
*
+ *
*/
public MetaBean add(Class type,
String name,
@@ -133,7 +135,9 @@ public void parseToJSON(T object, JsonObjectBuilder builder, boolean ignoreNullA
});
}
- /** Generates a random Object using the setters for testing purposes. */
+ /**
+ * Generates a random Object using the setters for testing purposes.
+ */
public void setRandom(T randomObject) {
forEach((type, name, setter, getter, gate) -> {
if (Enum.class.isAssignableFrom(type)) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ArrayResettableIterator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ArrayResettableIterator.java
index 9de3f6422bf..90be5fc5dd2 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ArrayResettableIterator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ArrayResettableIterator.java
@@ -19,10 +19,8 @@
import java.util.Collection;
/**
- * Provides an Array Iterator that is able to reset, allowing you to iterate over the full array.
- * It achieves this though by moving end position mark to the the current cursors position,
- * so it round robins, even with reset.
- * @param
+ * This collection is a concurrent append-only list that grows in chunks.
+ *
- * {@code arrayAllocator} will be used to instantiate the array of the correct size with the right runtime type.
+ * {@return an array containing all of the elements in this collection in proper sequence (from first to last
+ * element); {@code arrayAllocator} will be used to instantiate the array of the correct size with the right runtime
+ * type}
*/
public E[] toArray(IntFunction
*
- *
- * @param
+ * A type of linked list which maintains items according to a priority and allows adding and removing of elements at
+ * both ends, and peeking.
+ *
- * It is safe to be called concurrently.
+ * {@return the size of this list; safe to be called concurrently}
*/
int size();
LinkedListIterator
- * It is safe to be called concurrently.
+ * {@return {@code true} if empty, {@code false} otherwise; safe to be called concurrently}
*/
boolean isEmpty();
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ResettableIterator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ResettableIterator.java
index 9091a4eed37..5b72961e96b 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ResettableIterator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ResettableIterator.java
@@ -21,8 +21,8 @@
public interface ResettableIterator
+ * This list share the same motivation and structure of https://en.wikipedia.org/wiki/Unrolled_linked_list: it's a
+ * linked list of arrays/chunks of {@code T}.
+ *
- *
+ * utilization among chunks ie a chunk is removed only if empty and chunks can't be merged. This list has been optimized
+ * for small-sized chunks (ideally <= 32 elements): this allow search/removal to be performed with a greedy approach
+ * despite a sparse chunk utilization (ie chunks contains few sparse elements).
+ *
- * If using UDP, all the UDP properties will be filled and the jgroups properties will be
- * {@code null}.
- * If using JGroups, all the UDP properties will be -1 or {@code null} and the jgroups properties
- * will be filled.
+ * The discovery configuration could either use plain UDP or JGroups.
+ *
- * To add it to a client, use {@link org.apache.activemq.artemis.api.core.client.ServerLocator#addIncomingInterceptor(Interceptor)}
+ * {@literal broker.xml}.
+ * Message Properties
*
* | | boolean byte short int long float double String byte[]
* |----------------------------------------------------------------
@@ -52,25 +52,23 @@
* |byte[] | X
* |-----------------------------------------------------------------
*
+ * If conversion is not allowed (for example calling {@code getFloatProperty} on a property set a {@code boolean}), a
+ * {@link ActiveMQPropertyConversionException} will be thrown.
* {@code
* Message encode = new CoreMessage(); // or any other implementation
* encode.receiveBuffer(buffer);
- *
- *
+ * }
+ * {@code
* Message encode;
* size = encode.getEncodeSize();
* encode.encodeDirectly(bufferOutput);
- *
+ * }
*/
public interface Message {
@@ -155,7 +153,8 @@ public interface Message {
SimpleString HDR_LAST_VALUE_NAME = SimpleString.of("_AMQ_LVQ_NAME");
/**
- * To define the mime-type of body messages. Mainly for stomp but it could be informed on any message for user purposes.
+ * To define the mime-type of body messages. Mainly for stomp but it could be informed on any message for user
+ * purposes.
*/
SimpleString HDR_CONTENT_TYPE = SimpleString.of("_AMQ_CONTENT_TYPE");
@@ -180,8 +179,8 @@ public interface Message {
SimpleString HDR_INGRESS_TIMESTAMP = SimpleString.of("_AMQ_INGRESS_TIMESTAMP");
/**
- * The prefix used (if any) when sending this message. For protocols (e.g. STOMP) that need to track this and restore
- * the prefix when the message is consumed.
+ * The prefix used (if any) when sending this message. For protocols (e.g. STOMP) that need to track this and
+ * restore the prefix when the message is consumed.
*/
SimpleString HDR_PREFIX = SimpleString.of("_AMQ_PREFIX");
@@ -197,10 +196,15 @@ public interface Message {
byte STREAM_TYPE = 6;
- /** The message will contain another message persisted through {@literal org.apache.activemq.artemis.spi.core.protocol.EmbedMessageUtil}*/
+ /**
+ * The message will contain another message persisted through
+ * {@code org.apache.activemq.artemis.spi.core.protocol.EmbedMessageUtil}
+ */
byte EMBEDDED_TYPE = 7;
- /** This is to embedd Large Messages from other protocol */
+ /**
+ * This is to embedd Large Messages from other protocol
+ */
byte LARGE_EMBEDDED_TYPE = 8;
default void clearInternalProperties() {
@@ -211,8 +215,7 @@ default void clearAMQPProperties() {
}
/**
- * Search for the existence of the property: an implementor can save
- * the message to be decoded, if possible.
+ * Search for the existence of the property: an implementor can save the message to be decoded, if possible.
*/
default boolean hasScheduledDeliveryTime() {
return getScheduledDeliveryTime() != null;
@@ -243,18 +246,17 @@ default InputStream getBodyInputStream() {
}
/**
- * @deprecated do not use this, use through ICoreMessage or ClientMessage
- * Warning: if you need to read the content of a message use getDataBuffer(). This method is intended for when you
- * want to make changes.
+ * @deprecated do not use this, use through ICoreMessage or ClientMessage Warning: if you need to read the content of
+ * a message use getDataBuffer(). This method is intended for when you want to make changes.
*/
@Deprecated
default ActiveMQBuffer getBodyBuffer() {
return null;
}
- /**
- * @deprecated do not use this, use through ICoreMessage or ClientMessage
- */
+ /**
+ * @deprecated do not use this, use through ICoreMessage or ClientMessage
+ */
@Deprecated
default byte getType() {
return (byte)0;
@@ -273,8 +275,9 @@ default Message setType(byte type) {
*/
void messageChanged();
- /** Used to calculate what is the delivery time.
- * Return null if not scheduled. */
+ /**
+ * Used to calculate what is the delivery time. Return null if not scheduled.
+ */
Long getScheduledDeliveryTime();
void setPaged();
@@ -318,13 +321,19 @@ default Message setCorrelationID(Object correlationID) {
Message setReplyTo(SimpleString address);
- /** It will generate a new instance of the message encode, being a deep copy, new properties, new everything */
+ /**
+ * It will generate a new instance of the message encode, being a deep copy, new properties, new everything
+ */
Message copy();
- /** It will generate a new instance of the message encode, being a deep copy, new properties, new everything */
+ /**
+ * It will generate a new instance of the message encode, being a deep copy, new properties, new everything
+ */
Message copy(long newID);
- /** It will generate a new instance of the message encode, being a deep copy, new properties, new everything */
+ /**
+ * It will generate a new instance of the message encode, being a deep copy, new properties, new everything
+ */
default Message copy(long newID, boolean isExpiryOrDLQ) {
return copy(newID);
}
@@ -337,9 +346,7 @@ default void rejectConsumer(long uniqueConsumerID) {
}
/**
- * Returns the messageID.
- *
- * The messageID is set when the message is handled by the server.
+ * {@return the messageID; the messageID is set when the message is handled by the server}
*/
long getMessageID();
@@ -361,7 +368,7 @@ default boolean isLargeMessage() {
}
/**
- * Returns the expiration time of this message.
+ * {@return the expiration time of this message}
*/
long getExpiration();
@@ -373,7 +380,7 @@ default boolean isLargeMessage() {
Message setExpiration(long expiration);
/**
- * Returns whether this message is expired or not.
+ * {@return whether this message is expired or not}
*/
default boolean isExpired() {
if (getExpiration() == 0) {
@@ -383,12 +390,10 @@ default boolean isExpired() {
return System.currentTimeMillis() - getExpiration() >= 0;
}
-
/**
- *
- * This represents historically the JMSMessageID.
- * We had in the past used this for the MessageID that was sent on core messages...
- *
+ * This represents historically the JMSMessageID. We had in the past used this for the MessageID that was sent on
+ * core messages...
+ *
* HashMap<String, Object> map = new HashMap<String, Object>();
@@ -98,8 +96,8 @@ public TransportConfiguration() {
}
/**
- * Creates a TransportConfiguration with a specific name providing the class name of the {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory}
- * and any parameters needed.
+ * Creates a TransportConfiguration with a specific name providing the class name of the
+ * {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory} and any parameters needed.
*
* @param className The class name of the ConnectorFactory
* @param params The parameters needed by the ConnectorFactory
@@ -110,8 +108,8 @@ public TransportConfiguration(final String className, final Map
- * Messages can be consumed synchronously by using the receive()
methods
- * which will block until a message is received (or a timeout expires) or asynchronously
- * by setting a {@link MessageHandler}.
- *
- * These 2 types of consumption are exclusive: a ClientConsumer with a MessageHandler set will
- * throw ActiveMQException if its receive()
methods are called.
+ * true
if this consumer is closed, false
else
+ * {@return {@code true} if this consumer is closed, {@code false} else}
*/
boolean isClosed();
/**
- * Returns the last exception thrown by a call to this consumer's MessageHandler.
- *
- * @return the last exception thrown by a call to this consumer's MessageHandler or {@code null}
+ * {@return the last exception thrown by a call to this consumer's MessageHandler or {@code null}}
*/
Exception getLastException();
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java
index 1af7d91bf82..b6c1287f6c3 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java
@@ -30,7 +30,7 @@
public interface ClientMessage extends ICoreMessage {
/**
- * Returns the number of times this message was delivered.
+ * {@return the number of times this message was delivered.}
*/
int getDeliveryCount();
@@ -47,9 +47,9 @@ public interface ClientMessage extends ICoreMessage {
/**
* Acknowledges reception of this message.
*
+ *
- *
- * @throws ActiveMQException
+ * Saves the content of the message to the OutputStream. It will block until the entire content is transferred to the
+ * OutputStream.
*/
void saveToOutputStream(OutputStream out) throws ActiveMQException;
/**
* Wait the outputStream completion of the message.
- *
+ *
+ *
+ * A {@code ClientProducer} is used to send messages to a specific address. Messages are then routed on the server to
+ * any queues that are bound to the address. A {@code ClientProducer} can either be created with a specific address in
+ * mind or with none. With the latter the address must be provided using the appropriate {@code send} method.
*
+ * {@link ServerLocator#setBlockOnDurableSend} and {@link ServerLocator#setBlockOnNonDurableSend}. If set to
+ * {@code true} then for each message type, durable and non durable respectively, any exceptions such as the address not
+ * existing or security exceptions will be thrown at the time of send. Alternatively if set to {@code false} then
+ * exceptions will only be logged on the server.
*
- *
+ * The send rate can also be controlled via {@link ServerLocator#setProducerMaxRate} and the
+ * {@link ServerLocator#setProducerWindowSize}.
*/
public interface ClientProducer extends AutoCloseable {
/**
- * Returns the address where messages will be sent.
- *
- *
The address can be {@code null} if the ClientProducer
- *
- * was creating without specifying an address, that is by using {@link ClientSession#createProducer()}.
- *
- * @return the address where messages will be sent
+ * {@return the address where messages will be sent; the address can be {@code null} if the {@code ClientProducer}
+ * was created without specifying an address, e.g. by using {@link ClientSession#createProducer()}}
*/
SimpleString getAddress();
/**
- * Sends a message to an address. specified in {@link ClientSession#createProducer(String)} or
- * similar methods.
- *
- * This will block until confirmation that the message has reached the server has been received
- * if {@link ServerLocator#setBlockOnDurableSend(boolean)} or
- * {@link ServerLocator#setBlockOnNonDurableSend(boolean)} are set to true
for the
- * specified message type.
+ * Sends a message to an address. specified in {@link ClientSession#createProducer(String)} or similar methods.
+ *
- *
+ * Sends a message to the specified address instead of the ClientProducer's address.
+ *
- *
- * This will block until confirmation that the message has reached the server has been received
- * if {@link ServerLocator#setBlockOnDurableSend(boolean)} or
- * {@link ServerLocator#setBlockOnNonDurableSend(boolean)} are set to true for the specified
- * message type.
+ * Sends a message to the specified address instead of the ClientProducer's address.
+ *
- *
+ * Sends a message to the specified address instead of the ClientProducer's address.
+ *
- *
- * This will block until confirmation that the message has reached the server has been received
- * if {@link ServerLocator#setBlockOnDurableSend(boolean)} or
- * {@link ServerLocator#setBlockOnNonDurableSend(boolean)} are set to true for the specified
- * message type.
+ * Sends a message to the specified address instead of the ClientProducer's address.
+ * true
if the producer is closed, false
else
+ * {@return {@code true} if the producer is closed, {@code false} else}
*/
boolean isClosed();
/**
- * Returns whether the producer will block when sending durable messages.
- *
- * @return true
if the producer blocks when sending durable, false
else
+ * {@return {@code true} if the producer blocks when sending durable messages, {@code false} else}
*/
boolean isBlockOnDurableSend();
/**
- * Returns whether the producer will block when sending non-durable messages.
- *
- * @return true
if the producer blocks when sending non-durable, false
else
+ * {@return {@code true} if the producer blocks when sending non-durable messages, {@code false} else}
*/
boolean isBlockOnNonDurableSend();
/**
- * Returns the maximum rate at which a ClientProducer can send messages per second.
- *
- * @return the producers maximum rate
+ * {@return the maximum rate at which a ClientProducer can send messages per second}
*/
int getMaxRate();
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientRequestor.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientRequestor.java
index 83256864041..c02a33d18cf 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientRequestor.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientRequestor.java
@@ -24,9 +24,9 @@
/**
* The ClientRequestor class helps making requests.
- *
- * The ClientRequestor constructor is given a ClientSession and a request address.
- * It creates a temporary queue for the responses and provides a request method that sends the request message and waits for its reply.
+ * true
if the binding exists, false
else.
+ * {@return {@code true} if the binding exists, {@code false} else}
*/
boolean isExists();
/**
- * Returns the names of the queues bound to the binding.
+ * {@return the names of the queues bound to the binding}
*/
Listtrue
if auto-queue-creation for this address is enabled, false
else.
+ * {@return {@code true} if auto-queue-creation for this address is enabled, {@code false} else}
*/
boolean isAutoCreateQueues();
/**
- * Returns true
if auto-address-creation for this address is enabled, false
else.
+ * {@return {@code true} if auto-address-creation for this address is enabled, {@code false} else}
*/
boolean isAutoCreateAddresses();
@@ -108,50 +105,48 @@ interface AddressQuery {
interface QueueQuery {
/**
- * Returns true
if the queue exists, false
else.
+ * {@return {@code true} if the queue exists, {@code false} else}
*/
boolean isExists();
/**
- * Return true
if the queue is temporary, false
else.
+ * {@return {@code true} if the queue is temporary, {@code false} else}
*/
boolean isTemporary();
/**
- * Returns true
if the queue is durable, false
else.
+ * {@return {@code true} if the queue is durable, {@code false} else}
*/
boolean isDurable();
/**
- * Returns true
if auto-creation for this queue is enabled and if the queue queried is a JMS queue,
- * false
else.
+ * {@return {@code true} if auto-creation for this queue is enabled and if the queue queried is a JMS queue,
+ * {@code false} else}
*/
boolean isAutoCreateQueues();
/**
- * Returns the number of consumers attached to the queue.
+ * {@return the number of consumers attached to the queue}
*/
int getConsumerCount();
/**
- * Returns the number of messages in the queue.
+ * {@return the number of messages in the queue}
*/
long getMessageCount();
/**
- * Returns the queue's filter string (or {@code null} if the queue has no filter).
+ * {@return the queue's filter string (or {@code null} if the queue has no filter)}
*/
SimpleString getFilterString();
/**
- * Returns the address that the queue is bound to.
+ * {@return the address that the queue is bound to}
*/
SimpleString getAddress();
/**
* Return the name of the queue
- *
- * @return
*/
SimpleString getName();
@@ -201,16 +196,15 @@ interface QueueQuery {
// Lifecycle operations ------------------------------------------
/**
- * Starts the session.
- * The session must be started before ClientConsumers created by the session can consume messages from the queue.
+ * Starts the session. The session must be started before ClientConsumers created by the session can consume messages
+ * from the queue.
*
* @throws ActiveMQException if an exception occurs while starting the session
*/
ClientSession start() throws ActiveMQException;
/**
- * Stops the session.
- * ClientConsumers created by the session can not consume messages when the session is stopped.
+ * Stops the session. ClientConsumers created by the session can not consume messages when the session is stopped.
*
* @throws ActiveMQException if an exception occurs while stopping the session
*/
@@ -225,9 +219,7 @@ interface QueueQuery {
void close() throws ActiveMQException;
/**
- * Returns whether the session is closed or not.
- *
- * @return true
if the session is closed, false
else
+ * {@return {@code true} if the session is closed, {@code false} else}
*/
boolean isClosed();
@@ -242,7 +234,7 @@ interface QueueQuery {
* Removes a FailureListener to the session.
*
* @param listener the listener to remove
- * @return true
if the listener was removed, false
else
+ * @return {@code true} if the listener was removed, {@code false} else
*/
boolean removeFailureListener(SessionFailureListener listener);
@@ -257,40 +249,28 @@ interface QueueQuery {
* Removes a FailoverEventListener to the session.
*
* @param listener the listener to remove
- * @return true
if the listener was removed, false
else
+ * @return {@code true} if the listener was removed, {@code false} else
*/
boolean removeFailoverListener(FailoverEventListener listener);
/**
- * Returns the server's incrementingVersion.
- *
- * @return the server's incrementingVersion
+ * {@return the server's {@code incrementingVersion}}
*/
int getVersion();
/**
* Create Address with a single initial routing type
- * @param address
- * @param autoCreated
- * @throws ActiveMQException
*/
void createAddress(SimpleString address, EnumSetbrowseOnly
is true
, the ClientConsumer will receive the messages
- * from the queue but they will not be consumed (the messages will remain in the queue). Note
- * that paged messages will not be in the queue, and will therefore not be visible if
- * {@code browseOnly} is {@code true}.
+ * If {@code browseOnly} is {@code true}, the ClientConsumer will receive the messages from the queue but they will
+ * not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and
+ * will therefore not be visible if {@code browseOnly} is {@code true}.
* browseOnly
is false
, the ClientConsumer will behave like consume
- * the messages from the queue and the messages will effectively be removed from the queue.
+ * If {@code browseOnly} is {@code false}, the ClientConsumer will behave like consume the messages from the queue
+ * and the messages will effectively be removed from the queue.
*
* @param queueName name of the queue to consume messages from
* @param browseOnly whether the ClientConsumer will only browse the queue or consume messages.
@@ -928,13 +938,12 @@ void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleS
/**
* Creates a ClientConsumer to consume or browse messages from the queue with the given name.
* browseOnly
is true
, the ClientConsumer will receive the messages
- * from the queue but they will not be consumed (the messages will remain in the queue). Note
- * that paged messages will not be in the queue, and will therefore not be visible if
- * {@code browseOnly} is {@code true}.
+ * If {@code browseOnly} is {@code true}, the ClientConsumer will receive the messages from the queue but they will
+ * not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and
+ * will therefore not be visible if {@code browseOnly} is {@code true}.
* browseOnly
is false
, the ClientConsumer will behave like consume
- * the messages from the queue and the messages will effectively be removed from the queue.
+ * If {@code browseOnly} is {@code false}, the ClientConsumer will behave like consume the messages from the queue
+ * and the messages will effectively be removed from the queue.
*
* @param queueName name of the queue to consume messages from
* @param browseOnly whether the ClientConsumer will only browse the queue or consume messages.
@@ -944,16 +953,14 @@ void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleS
ClientConsumer createConsumer(String queueName, boolean browseOnly) throws ActiveMQException;
/**
- * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with
- * the given name.
+ * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.
* browseOnly
is true
, the ClientConsumer will receive the messages
- * from the queue but they will not be consumed (the messages will remain in the queue). Note
- * that paged messages will not be in the queue, and will therefore not be visible if
- * {@code browseOnly} is {@code true}.
+ * If {@code browseOnly} is {@code true}, the ClientConsumer will receive the messages from the queue but they will
+ * not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and
+ * will therefore not be visible if {@code browseOnly} is {@code true}.
* browseOnly
is false
, the ClientConsumer will behave like consume
- * the messages from the queue and the messages will effectively be removed from the queue.
+ * If {@code browseOnly} is {@code false}, the ClientConsumer will behave like consume the messages from the queue
+ * and the messages will effectively be removed from the queue.
*
* @param queueName name of the queue to consume messages from
* @param filter only messages which match this filter will be consumed
@@ -964,16 +971,14 @@ void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleS
ClientConsumer createConsumer(String queueName, String filter, boolean browseOnly) throws ActiveMQException;
/**
- * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with
- * the given name.
+ * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.
* browseOnly
is true
, the ClientConsumer will receive the messages
- * from the queue but they will not be consumed (the messages will remain in the queue). Note
- * that paged messages will not be in the queue, and will therefore not be visible if
- * {@code browseOnly} is {@code true}.
+ * If {@code browseOnly} is {@code true}, the ClientConsumer will receive the messages from the queue but they will
+ * not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and
+ * will therefore not be visible if {@code browseOnly} is {@code true}.
* browseOnly
is false
, the ClientConsumer will behave like consume
- * the messages from the queue and the messages will effectively be removed from the queue.
+ * If {@code browseOnly} is {@code false}, the ClientConsumer will behave like consume the messages from the queue
+ * and the messages will effectively be removed from the queue.
*
* @param queueName name of the queue to consume messages from
* @param filter only messages which match this filter will be consumed
@@ -981,21 +986,17 @@ void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleS
* @return a ClientConsumer
* @throws ActiveMQException if an exception occurs while creating the ClientConsumer
*/
- ClientConsumer createConsumer(SimpleString queueName,
- SimpleString filter,
- boolean browseOnly) throws ActiveMQException;
+ ClientConsumer createConsumer(SimpleString queueName, SimpleString filter, boolean browseOnly) throws ActiveMQException;
/**
- * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with
- * the given name.
+ * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.
* browseOnly
is true
, the ClientConsumer will receive the messages
- * from the queue but they will not be consumed (the messages will remain in the queue). Note
- * that paged messages will not be in the queue, and will therefore not be visible if
- * {@code browseOnly} is {@code true}.
+ * If {@code browseOnly} is {@code true}, the ClientConsumer will receive the messages from the queue but they will
+ * not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and
+ * will therefore not be visible if {@code browseOnly} is {@code true}.
* browseOnly
is false
, the ClientConsumer will behave like consume
- * the messages from the queue and the messages will effectively be removed from the queue.
+ * If {@code browseOnly} is {@code false}, the ClientConsumer will behave like consume the messages from the queue
+ * and the messages will effectively be removed from the queue.
*
* @param queueName name of the queue to consume messages from
* @param filter only messages which match this filter will be consumed
@@ -1004,22 +1005,17 @@ ClientConsumer createConsumer(SimpleString queueName,
* @return a ClientConsumer
* @throws ActiveMQException if an exception occurs while creating the ClientConsumer
*/
- ClientConsumer createConsumer(SimpleString queueName,
- SimpleString filter,
- int priority,
- boolean browseOnly) throws ActiveMQException;
+ ClientConsumer createConsumer(SimpleString queueName, SimpleString filter, int priority, boolean browseOnly) throws ActiveMQException;
/**
- * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with
- * the given name.
+ * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.
* browseOnly
is true
, the ClientConsumer will receive the messages
- * from the queue but they will not be consumed (the messages will remain in the queue). Note
- * that paged messages will not be in the queue, and will therefore not be visible if
- * {@code browseOnly} is {@code true}.
+ * If {@code browseOnly} is {@code true}, the ClientConsumer will receive the messages from the queue but they will
+ * not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and
+ * will therefore not be visible if {@code browseOnly} is {@code true}.
* browseOnly
is false
, the ClientConsumer will behave like consume
- * the messages from the queue and the messages will effectively be removed from the queue.
+ * If {@code browseOnly} is {@code false}, the ClientConsumer will behave like consume the messages from the queue
+ * and the messages will effectively be removed from the queue.
*
* @param queueName name of the queue to consume messages from
* @param filter only messages which match this filter will be consumed
@@ -1029,24 +1025,17 @@ ClientConsumer createConsumer(SimpleString queueName,
* @return a ClientConsumer
* @throws ActiveMQException if an exception occurs while creating the ClientConsumer
*/
- ClientConsumer createConsumer(SimpleString queueName,
- SimpleString filter,
- int windowSize,
- int maxRate,
- boolean browseOnly) throws ActiveMQException;
-
+ ClientConsumer createConsumer(SimpleString queueName, SimpleString filter, int windowSize, int maxRate, boolean browseOnly) throws ActiveMQException;
/**
- * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with
- * the given name.
+ * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.
* browseOnly
is true
, the ClientConsumer will receive the messages
- * from the queue but they will not be consumed (the messages will remain in the queue). Note
- * that paged messages will not be in the queue, and will therefore not be visible if
- * {@code browseOnly} is {@code true}.
+ * If {@code browseOnly} is {@code true}, the ClientConsumer will receive the messages from the queue but they will
+ * not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and
+ * will therefore not be visible if {@code browseOnly} is {@code true}.
* browseOnly
is false
, the ClientConsumer will behave like consume
- * the messages from the queue and the messages will effectively be removed from the queue.
+ * If {@code browseOnly} is {@code false}, the ClientConsumer will behave like consume the messages from the queue
+ * and the messages will effectively be removed from the queue.
*
* @param queueName name of the queue to consume messages from
* @param filter only messages which match this filter will be consumed
@@ -1065,16 +1054,14 @@ ClientConsumer createConsumer(SimpleString queueName,
boolean browseOnly) throws ActiveMQException;
/**
- * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with
- * the given name.
+ * Creates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.
* browseOnly
is true
, the ClientConsumer will receive the messages
- * from the queue but they will not be consumed (the messages will remain in the queue). Note
- * that paged messages will not be in the queue, and will therefore not be visible if
- * {@code browseOnly} is {@code true}.
+ * If {@code browseOnly} is {@code true}, the ClientConsumer will receive the messages from the queue but they will
+ * not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and
+ * will therefore not be visible if {@code browseOnly} is {@code true}.
* browseOnly
is false
, the ClientConsumer will behave like consume
- * the messages from the queue and the messages will effectively be removed from the queue.
+ * If {@code browseOnly} is {@code false}, the ClientConsumer will behave like consume the messages from the queue
+ * and the messages will effectively be removed from the queue.
*
* @param queueName name of the queue to consume messages from
* @param filter only messages which match this filter will be consumed
@@ -1093,8 +1080,7 @@ ClientConsumer createConsumer(String queueName,
// Producer Operations -------------------------------------------
/**
- * Creates a producer with no default address.
- * Address must be specified every time a message is sent
+ * Creates a producer with no default address. Address must be specified every time a message is sent
*
* @return a ClientProducer
* @see ClientProducer#send(SimpleString, org.apache.activemq.artemis.api.core.Message)
@@ -1183,16 +1169,12 @@ ClientConsumer createConsumer(String queueName,
// Transaction operations ----------------------------------------
/**
- * Returns the XAResource associated to the session.
- *
- * @return the XAResource associated to the session
+ * {@return the XAResource associated to the session}
*/
XAResource getXAResource();
/**
- * Return true
if the session supports XA, false
else.
- *
- * @return true
if the session supports XA, false
else.
+ * {@return {@code true} if the session supports XA, {@code false} else}
*/
boolean isXA();
@@ -1227,37 +1209,29 @@ ClientConsumer createConsumer(String queueName,
void rollback(boolean considerLastMessageAsDelivered) throws ActiveMQException;
/**
- * Returns true
if the current transaction has been flagged to rollback, false
else.
- *
- * @return true
if the current transaction has been flagged to rollback, false
else.
+ * {@return {@code true} if the current transaction has been flagged to rollback, {@code false} else}
*/
boolean isRollbackOnly();
/**
- * Returns whether the session will automatically commit its transaction every time a message is sent
- * by a ClientProducer created by this session, false
else
- *
- * @return true
if the session automatically commit its transaction every time a message is sent, false
else
+ * {@return whether the session will automatically commit its transaction every time a message is sent by a
+ * ClientProducer created by this session, {@code false} else}
*/
boolean isAutoCommitSends();
/**
- * Returns whether the session will automatically commit its transaction every time a message is acknowledged
- * by a ClientConsumer created by this session, false
else
- *
- * @return true
if the session automatically commit its transaction every time a message is acknowledged, false
else
+ * {@return {@code true} if the session automatically commit its transaction every time a message is
+ * acknowledged by a ClientConsumer created by this session, {@code false} else}
*/
boolean isAutoCommitAcks();
/**
- * Returns whether the ClientConsumer created by the session will block when they acknowledge a message.
- *
- * @return true
if the session's ClientConsumer block when they acknowledge a message, false
else
+ * {@return {@code true} if the session's ClientConsumer block when they acknowledge a message, {@code false} else}
*/
boolean isBlockOnAcknowledge();
/**
- * Sets a SendAcknowledgementHandler
for this session.
+ * Sets a {@code SendAcknowledgementHandler} for this session.
*
* @param handler a SendAcknowledgementHandler
* @return this ClientSession
@@ -1266,24 +1240,19 @@ ClientConsumer createConsumer(String queueName,
/**
* Attach any metadata to the session.
- *
- * @throws ActiveMQException
*/
void addMetaData(String key, String data) throws ActiveMQException;
/**
- * Attach any metadata to the session. Throws an exception if there's already a metadata available.
- * You can use this metadata to ensure that there is no other session with the same meta-data you are passing as an argument.
- * This is useful to simulate unique client-ids, where you may want to avoid multiple instances of your client application connected.
- *
- * @throws ActiveMQException
+ * Attach any metadata to the session. Throws an exception if there's already a metadata available. You can use this
+ * metadata to ensure that there is no other session with the same meta-data you are passing as an argument. This is
+ * useful to simulate unique client-ids, where you may want to avoid multiple instances of your client application
+ * connected.
*/
void addUniqueMetaData(String key, String data) throws ActiveMQException;
/**
- * Return the sessionFactory used to created this Session.
- *
- * @return
+ * {@return the {@code ClientSessionFactory} used to created this {@code ClientSession}}
*/
ClientSessionFactory getSessionFactory();
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSessionFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSessionFactory.java
index e1e18e927e3..494c239acc3 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSessionFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSessionFactory.java
@@ -21,10 +21,11 @@
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
/**
- * A ClientSessionFactory is the entry point to create and configure ActiveMQ Artemis resources to produce and consume messages.
- *
- * It is possible to configure a factory using the setter methods only if no session has been created.
- * Once a session is created, the configuration is fixed and any call to a setter method will throw an IllegalStateException.
+ * A ClientSessionFactory is the entry point to create and configure ActiveMQ Artemis resources to produce and consume
+ * messages.
+ * true
to automatically commit message sends, false
to commit manually
- * @param autoCommitAcks true
to automatically commit message acknowledgement, false
to commit manually
+ * @param autoCommitSends {@code true} to automatically commit message sends, {@code false} to commit manually
+ * @param autoCommitAcks {@code true} to automatically commit message acknowledgement, {@code false} to commit
+ * manually
* @return a ClientSession
* @throws ActiveMQException if an exception occurs while creating the session
*/
@@ -71,8 +72,9 @@ public interface ClientSessionFactory extends AutoCloseable {
/**
* Creates a session.
*
- * @param autoCommitSends true
to automatically commit message sends, false
to commit manually
- * @param autoCommitAcks true
to automatically commit message acknowledgement, false
to commit manually
+ * @param autoCommitSends {@code true} to automatically commit message sends, {@code false} to commit manually
+ * @param autoCommitAcks {@code true} to automatically commit message acknowledgement, {@code false} to commit
+ * manually
* @param ackBatchSize the batch size of the acknowledgements
* @return a ClientSession
* @throws ActiveMQException if an exception occurs while creating the session
@@ -85,8 +87,9 @@ ClientSession createSession(boolean autoCommitSends,
* Creates a session.
*
* @param xa whether the session support XA transaction semantic or not
- * @param autoCommitSends true
to automatically commit message sends, false
to commit manually
- * @param autoCommitAcks true
to automatically commit message acknowledgement, false
to commit manually
+ * @param autoCommitSends {@code true} to automatically commit message sends, {@code false} to commit manually
+ * @param autoCommitAcks {@code true} to automatically commit message acknowledgement, {@code false} to commit
+ * manually
* @return a ClientSession
* @throws ActiveMQException if an exception occurs while creating the session
*/
@@ -95,14 +98,17 @@ ClientSession createSession(boolean autoCommitSends,
/**
* Creates a session.
* true
to automatically commit message sends, false
to commit manually
- * @param autoCommitAcks true
to automatically commit message acknowledgement, false
to commit manually
- * @param preAcknowledge true
to pre-acknowledge messages on the server, false
to let the client acknowledge the messages
+ * @param autoCommitSends {@code true} to automatically commit message sends, {@code false} to commit manually
+ * @param autoCommitAcks {@code true} to automatically commit message acknowledgement, {@code false} to commit
+ * manually
+ * @param preAcknowledge {@code true} to pre-acknowledge messages on the server, {@code false} to let the client
+ * acknowledge the messages
* @return a ClientSession
* @throws ActiveMQException if an exception occurs while creating the session
*/
@@ -114,16 +120,19 @@ ClientSession createSession(boolean xa,
/**
* Creates an authenticated session.
* true
to automatically commit message sends, false
to commit manually
- * @param autoCommitAcks true
to automatically commit message acknowledgement, false
to commit manually
- * @param preAcknowledge true
to pre-acknowledge messages on the server, false
to let the client acknowledge the messages
+ * @param autoCommitSends {@code true} to automatically commit message sends, {@code false} to commit manually
+ * @param autoCommitAcks {@code true} to automatically commit message acknowledgement, {@code false} to commit
+ * manually
+ * @param preAcknowledge {@code true} to pre-acknowledge messages on the server, {@code false} to let the client
+ * acknowledge the messages
* @return a ClientSession
* @throws ActiveMQException if an exception occurs while creating the session
*/
@@ -138,16 +147,19 @@ ClientSession createSession(String username,
/**
* Creates an authenticated session.
* true
to automatically commit message sends, false
to commit manually
- * @param autoCommitAcks true
to automatically commit message acknowledgement, false
to commit manually
- * @param preAcknowledge true
to pre-acknowledge messages on the server, false
to let the client acknowledge the messages
+ * @param autoCommitSends {@code true} to automatically commit message sends, {@code false} to commit manually
+ * @param autoCommitAcks {@code true} to automatically commit message acknowledgement, {@code false} to commit
+ * manually
+ * @param preAcknowledge {@code true} to pre-acknowledge messages on the server, {@code false} to let the client
+ * acknowledge the messages
* @param clientID the session clientID
* @return a ClientSession
* @throws ActiveMQException if an exception occurs while creating the session
@@ -168,7 +180,7 @@ ClientSession createSession(String username,
void close();
/**
- * @return {@code true} if the factory is closed, {@code false} otherwise.
+ * {@return {@code true} if the factory is closed, {@code false} otherwise}
*/
boolean isClosed();
@@ -184,7 +196,7 @@ ClientSession createSession(String username,
* Removes a FailoverEventListener to the session.
*
* @param listener the listener to remove
- * @return true
if the listener was removed, false
else
+ * @return {@code true} if the listener was removed, {@code false} else
*/
boolean removeFailoverListener(FailoverEventListener listener);
@@ -194,21 +206,17 @@ ClientSession createSession(String username,
void cleanup();
/**
- * @return the server locator associated with this session factory
+ * {@return the server locator associated with this session factory}
*/
ServerLocator getServerLocator();
/**
- * Returns the code connection used by this session factory.
- *
- * @return the core connection
+ * {@return the code connection used by this session factory}
*/
RemotingConnection getConnection();
/**
- * Return the configuration used
- *
- * @return
+ * {@return the configuration used}
*/
TransportConfiguration getConnectorConfiguration();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClusterTopologyListener.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClusterTopologyListener.java
index 4617e5bd8ba..3e0c7d044d8 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClusterTopologyListener.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClusterTopologyListener.java
@@ -19,27 +19,23 @@
/**
* A cluster topology listener.
*
+ * Notifies that a connection state has changed according the specified event type.
+ * true
, consumers created through this factory will create temporary files to
- * cache large messages.
+ * When {@code true}, consumers created through this factory will create temporary files to cache large messages.
* true
if consumers created through this factory will cache large messages
- * in temporary files, false
else
+ * @return {@code true} if consumers created through this factory will cache large messages in temporary files,
+ * {@code false} else
*/
boolean isCacheLargeMessagesClient();
/**
- * Sets whether large messages received by consumers created through this factory will be cached in temporary files or not.
+ * Sets whether large messages received by consumers created through this factory will be cached in temporary files
+ * or not.
*
- * @param cached true
to cache large messages in temporary files, false
else
+ * @param cached {@code true} to cache large messages in temporary files, {@code false} else
* @return this ServerLocator
*/
ServerLocator setCacheLargeMessagesClient(boolean cached);
@@ -166,9 +153,8 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Returns the connection time-to-live.
* true
to block when sending message
- * acknowledgments or false
to send them
+ * @param blockOnAcknowledge {@code true} to block when sending message acknowledgments or {@code false} to send them
* asynchronously
* @return this ServerLocator
*/
ServerLocator setBlockOnAcknowledge(boolean blockOnAcknowledge);
/**
- * Returns whether producers created through this factory will block while sending durable messages or do it asynchronously.
- *
- * If the session is configured to send durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession
- * to be notified once the message has been handled by the server.
+ * Returns whether producers created through this factory will block while sending durable messages or do it
+ * asynchronously.
+ * true
to block when sending durable messages or false
to send them asynchronously
+ * @param blockOnDurableSend {@code true} to block when sending durable messages or {@code false} to send them
+ * asynchronously
* @return this ServerLocator
*/
ServerLocator setBlockOnDurableSend(boolean blockOnDurableSend);
/**
- * Returns whether producers created through this factory will block while sending non-durable messages or do it asynchronously.
- *
- * If the session is configured to send non-durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession
- * to be notified once the message has been handled by the server.
+ * Returns whether producers created through this factory will block while sending non-durable messages or
+ * do it asynchronously.
+ * true
to block when sending non-durable messages or false
to send them asynchronously
+ * @param blockOnNonDurableSend {@code true} to block when sending non-durable messages or {@code false} to send them
+ * asynchronously
* @return this ServerLocator
*/
ServerLocator setBlockOnNonDurableSend(boolean blockOnNonDurableSend);
/**
- * Returns whether producers created through this factory will automatically
- * assign a group ID to the messages they sent.
+ * Returns whether producers created through this factory will automatically assign a group ID to the messages they
+ * sent.
* true
, a random unique group ID is created and set on each message for the property
- * {@link org.apache.activemq.artemis.api.core.Message#HDR_GROUP_ID}.
- * Default value is {@link ActiveMQClient#DEFAULT_AUTO_GROUP}.
+ * if {@code true}, a random unique group ID is created and set on each message for the property
+ * {@link org.apache.activemq.artemis.api.core.Message#HDR_GROUP_ID}. Default value is
+ * {@link ActiveMQClient#DEFAULT_AUTO_GROUP}.
*
* @return whether producers will automatically assign a group ID to their messages
*/
boolean isAutoGroup();
/**
- * Sets whether producers created through this factory will automatically
- * assign a group ID to the messages they sent.
+ * Sets whether producers created through this factory will automatically assign a group ID to the messages they
+ * sent.
*
- * @param autoGroup true
to automatically assign a group ID to each messages sent through this factory, false
else
+ * @param autoGroup {@code true} to automatically assign a group ID to each messages sent through this factory,
+ * {@code false} else
* @return this ServerLocator
*/
ServerLocator setAutoGroup(boolean autoGroup);
/**
- * Returns the group ID that will be eventually set on each message for the property {@link org.apache.activemq.artemis.api.core.Message#HDR_GROUP_ID}.
+ * Returns the group ID that will be eventually set on each message for the property
+ * {@link org.apache.activemq.artemis.api.core.Message#HDR_GROUP_ID}.
* true
to pre-acknowledge consumed messages on the
- * server before they are sent to consumers, else set to false
- * to let clients acknowledge the message they consume.
+ * Sets to {@code true} to pre-acknowledge consumed messages on the server before they are sent to consumers, else
+ * set to {@code false} to let clients acknowledge the message they consume.
*
- * @param preAcknowledge true
to enable pre-acknowledgment,
- * false
else
+ * @param preAcknowledge {@code true} to enable pre-acknowledgment, {@code false} else
* @return this ServerLocator
*/
ServerLocator setPreAcknowledge(boolean preAcknowledge);
@@ -490,8 +486,8 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
ServerLocator setAckBatchSize(int ackBatchSize);
/**
- * Returns an array of TransportConfigurations representing the static list of servers used
- * when creating this object
+ * Returns an array of TransportConfigurations representing the static list of servers used when creating this
+ * object
*
* @return array with all static {@link TransportConfiguration}s
*/
@@ -503,20 +499,20 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
DiscoveryGroupConfiguration getDiscoveryGroupConfiguration();
/**
- * Returns whether this factory will use global thread pools (shared among all the factories in the same JVM)
- * or its own pools.
+ * Returns whether this factory will use global thread pools (shared among all the factories in the same JVM) or its
+ * own pools.
* true
if this factory uses global thread pools, false
else
+ * @return {@code true} if this factory uses global thread pools, {@code false} else
*/
boolean isUseGlobalPools();
/**
- * Sets whether this factory will use global thread pools (shared among all the factories in the same JVM)
- * or its own pools.
+ * Sets whether this factory will use global thread pools (shared among all the factories in the same JVM) or its own
+ * pools.
*
- * @param useGlobalPools true
to let this factory uses global thread pools, false
else
+ * @param useGlobalPools {@code true} to let this factory uses global thread pools, {@code false} else
* @return this ServerLocator
*/
ServerLocator setUseGlobalPools(boolean useGlobalPools);
@@ -526,15 +522,14 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
* true
if the incoming interceptor is removed from this factory, false
else
+ * @return {@code true} if the incoming interceptor is removed from this factory, {@code false} else
*/
boolean removeIncomingInterceptor(Interceptor interceptor);
@@ -791,7 +790,7 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
* Removes an outgoing interceptor.
*
* @param interceptor interceptor to remove
- * @return true
if the outgoing interceptor is removed from this factory, false
else
+ * @return {@code true} if the outgoing interceptor is removed from this factory, {@code false} else
*/
boolean removeOutgoingInterceptor(Interceptor interceptor);
@@ -801,12 +800,6 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
@Override
void close();
- /**
- *
- *
- * @param useTopologyForLoadBalancing
- * @return
- */
ServerLocator setUseTopologyForLoadBalancing(boolean useTopologyForLoadBalancing);
boolean getUseTopologyForLoadBalancing();
@@ -819,8 +812,7 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
Topology getTopology();
/**
- * Whether this server receives topology notifications from the cluster as servers join or leave
- * the cluster.
+ * Whether this server receives topology notifications from the cluster as servers join or leave the cluster.
*
* @return {@code true} if the locator receives topology updates from the cluster
*/
@@ -829,45 +821,36 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
/**
* Verify if all of the transports are using inVM.
*
- * @return {@code true} if the locator has all inVM transports.
+ * @return {@code true} if the locator has all inVM transports
*/
boolean allInVM();
/**
* Whether to compress large messages.
- *
- * @return
*/
boolean isCompressLargeMessage();
/**
* Sets whether to compress or not large messages.
*
- * @param compressLargeMessages
* @return this ServerLocator
*/
ServerLocator setCompressLargeMessage(boolean compressLargeMessages);
/**
* What compression level is in use
- *
- * @return
*/
int getCompressionLevel();
/**
- * Sets what compressionLevel to use when compressing messages
- * Value must be -1 (default), or 0-9
+ * Sets what compressionLevel to use when compressing messages Value must be -1 (default), or 0-9
*
- * @param compressionLevel
* @return this ServerLocator
*/
ServerLocator setCompressionLevel(int compressionLevel);
- // XXX No javadocs
ServerLocator addClusterTopologyListener(ClusterTopologyListener listener);
- // XXX No javadocs
void removeClusterTopologyListener(ClusterTopologyListener listener);
ClientProtocolManagerFactory getProtocolManagerFactory();
@@ -875,20 +858,32 @@ ClientSessionFactory createSessionFactory(TransportConfiguration transportConfig
ServerLocator setProtocolManagerFactory(ClientProtocolManagerFactory protocolManager);
/**
- * @param interceptorList a comma separated string of incoming interceptor class names to be used. Each interceptor needs a default Constructor to be used with this method.
+ * Set the list of {@link Interceptor}s to use for incoming packets.
+ *
+ * @param interceptorList a comma separated string of incoming interceptor class names to be used. Each interceptor
+ * needs a default Constructor to be used with this method.
* @return this
*/
ServerLocator setIncomingInterceptorList(String interceptorList);
String getIncomingInterceptorList();
+ /**
+ * Set the list of {@link Interceptor}s to use for outgoing packets.
+ *
+ * @param interceptorList a comma separated string of incoming interceptor class names to be used. Each interceptor
+ * needs a default Constructor to be used with this method.
+ * @return this
+ */
ServerLocator setOutgoingInterceptorList(String interceptorList);
String getOutgoingInterceptorList();
boolean setThreadPools(Executor threadPool, ScheduledExecutorService scheduledThreadPoolExecutor, Executor flowControlThreadPool);
- /** This will only instantiate internal objects such as the topology */
+ /**
+ * This will only instantiate internal objects such as the topology
+ */
void initialize() throws ActiveMQException;
ServerLocatorConfig getLocatorConfig();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/SessionFailureListener.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/SessionFailureListener.java
index 011cee1de04..5a6aa5f0256 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/SessionFailureListener.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/SessionFailureListener.java
@@ -26,7 +26,7 @@ public interface SessionFailureListener extends FailureListener {
/**
* Notifies that a connection has failed due to the specified exception.
- *
+ *
- * The first call to {@link #select(int)} will return a random integer between {@code 0} (inclusive) and {@code max} (exclusive).
- * Subsequent calls will then return an integer in a round-robin fashion.
+ *
- * If a backup server has been activated, returns {@code false}.
+ * {@return {@code true} if this server is a backup, {@code false} if it is a primary server or if it is a backup
+ * server and has been activated}
*/
@Attribute(desc = "Whether this server is a backup")
boolean isBackup();
/**
- * Returns whether this server shares its data store with a corresponding primary or backup server.
+ * {@return whether this server shares its data store with a corresponding primary or backup server.}
*/
@Attribute(desc = "Whether this server shares its data store with a corresponding primary or backup serve")
boolean isSharedStore();
/**
- * Returns the file system directory used to store paging files.
+ * {@return the file system directory used to store paging files.}
*/
@Attribute(desc = "File system directory used to store paging files")
String getPagingDirectory();
/**
- * Returns whether delivery count is persisted before messages are delivered to the consumers.
+ * {@return whether delivery count is persisted before messages are delivered to the consumers.}
*/
@Attribute(desc = "Whether delivery count is persisted before messages are delivered to the consumers")
boolean isPersistDeliveryCountBeforeDelivery();
/**
- * Returns the connection time to live.
- *
- * This value overrides the connection time to live sent by the client.
+ * {@return the connection time to live; this value overrides the connection time to live sent by the client}
*/
@Attribute(desc = "Connection time to live")
long getConnectionTTLOverride();
/**
- * Returns the management address of this server.
- *
- * Clients can send management messages to this address to manage this server.
+ * {@return the management address of this server; clients can send management messages to this address to manage
+ * this server}
*/
@Attribute(desc = "Management address of this server")
String getManagementAddress();
/**
- * Returns the node ID of this server.
- *
- * Clients can send management messages to this address to manage this server.
+ * {@return the node ID of this server.}
*/
@Attribute(desc = "Node ID of this server")
String getNodeID();
/**
- * Returns the current activation sequence number of this server.
- *
- * When replicated, peers may coordinate activation with this monotonic sequence
+ * {@return the current activation sequence number of this server; when replicated, peers may coordinate activation
+ * with this monotonic sequence}
*/
@Attribute(desc = "Activation sequence of this server instance")
long getActivationSequence();
/**
- * Returns the management notification address of this server.
- *
- * Clients can bind queues to this address to receive management notifications emitted by this server.
+ * {@return the management notification address of this server; clients can bind queues to this address to receive
+ * management notifications emitted by this server}
*/
@Attribute(desc = "Management notification address of this server")
String getManagementNotificationAddress();
/**
- * Returns the size of the cache for pre-creating message IDs.
+ * {@return the size of the cache for pre-creating message IDs.}
*/
@Attribute(desc = "Size of the cache for pre-creating message IDs")
int getIDCacheSize();
/**
- * Returns whether message ID cache is persisted.
+ * {@return whether message ID cache is persisted.}
*/
@Attribute(desc = "Whether message ID cache is persisted")
boolean isPersistIDCache();
/**
- * Returns the file system directory used to store large messages.
+ * {@return the file system directory used to store large messages.}
*/
@Attribute(desc = "File system directory used to store large messages")
String getLargeMessagesDirectory();
/**
- * Returns whether wildcard routing is supported by this server.
+ * {@return whether wildcard routing is supported by this server.}
*/
@Attribute(desc = "Whether wildcard routing is supported by this server")
boolean isWildcardRoutingEnabled();
/**
- * Returns the timeout (in milliseconds) after which transactions is removed
+ * {@return the timeout (in milliseconds) after which transactions is removed}
* from the resource manager after it was created.
*/
@Attribute(desc = "Timeout (in milliseconds) after which transactions is removed from the resource manager after it was created")
long getTransactionTimeout();
/**
- * Returns the frequency (in milliseconds) to scan transactions to detect which transactions
+ * {@return the frequency (in milliseconds) to scan transactions to detect which transactions}
* have timed out.
*/
@Attribute(desc = "Frequency (in milliseconds) to scan transactions to detect which transactions have timed out")
long getTransactionTimeoutScanPeriod();
/**
- * Returns the frequency (in milliseconds) to scan messages to detect which messages
+ * {@return the frequency (in milliseconds) to scan messages to detect which messages}
* have expired.
*/
@Attribute(desc = "Frequency (in milliseconds) to scan messages to detect which messages have expired")
long getMessageExpiryScanPeriod();
/**
- * Returns the priority of the thread used to scan message expiration.
+ * {@return the priority of the thread used to scan message expiration.}
*/
@Attribute(desc = "Priority of the thread used to scan message expiration")
@Deprecated
long getMessageExpiryThreadPriority();
/**
- * Returns whether code coming from connection is executed asynchronously or not.
+ * {@return whether code coming from connection is executed asynchronously or not.}
*/
@Attribute(desc = "Whether code coming from connection is executed asynchronously or not")
boolean isAsyncConnectionExecutionEnabled();
/**
- * Returns the connectors configured for this server.
+ * {@return the connectors configured for this server.}
*/
@Attribute(desc = "Connectors configured for this server")
Object[] getConnectors() throws Exception;
/**
- * Returns the connectors configured for this server using JSON serialization.
+ * {@return the connectors configured for this server using JSON serialization.}
*/
@Attribute(desc = "Connectors configured for this server using JSON serialization")
String getConnectorsAsJSON() throws Exception;
/**
- * Returns the acceptors configured for this server.
+ * {@return the acceptors configured for this server.}
*/
@Attribute(desc = "Connectors configured for this server")
Object[] getAcceptors() throws Exception;
/**
- * Returns the acceptors configured for this server using JSON serialization.
+ * {@return the acceptors configured for this server using JSON serialization.}
*/
@Attribute(desc = "Acceptors configured for this server using JSON serialization")
String getAcceptorsAsJSON() throws Exception;
/**
- * Returns the number of addresses created on this server.
+ * {@return the number of addresses created on this server.}
*/
@Attribute(desc = "Number of addresses created on this server")
int getAddressCount();
/**
- * Returns the names of the addresses created on this server.
+ * {@return the names of the addresses created on this server.}
*/
@Attribute(desc = "Names of the addresses created on this server")
String[] getAddressNames();
/**
- * Returns the number of queues created on this server.
+ * {@return the number of queues created on this server.}
*/
@Attribute(desc = "Number of queues created on this server")
int getQueueCount();
/**
- * Returns the names of the queues created on this server.
+ * {@return the names of the queues created on this server.}
*/
@Attribute(desc = "Names of the queues created on this server")
String[] getQueueNames();
/**
- * Returns the uptime of this server.
+ * {@return the uptime of this server.}
*/
@Attribute(desc = "Uptime of this server")
String getUptime();
/**
- * Returns the uptime of this server.
+ * {@return the uptime of this server.}
*/
@Attribute(desc = "Uptime of this server in milliseconds")
long getUptimeMillis();
/**
- * Returns whether the initial replication synchronization process with the backup server is complete; applicable for
- * either the primary or backup server.
+ * {@return whether the initial replication synchronization process with the backup server is complete; applicable
+ * for either the primary or backup server}
*/
@Attribute(desc = REPLICA_SYNC_DESCRIPTION)
boolean isReplicaSync();
/**
- * Returns how often the server checks for disk space usage.
+ * {@return how often the server checks for disk space usage.}
*/
@Attribute(desc = "How often to check for disk space usage, in milliseconds")
int getDiskScanPeriod();
/**
- * Returns the disk use max limit.
+ * {@return the disk use max limit.}
*/
@Attribute(desc = "Maximum limit for disk use, in percentage")
int getMaxDiskUsage();
/**
- * Returns the global max bytes limit for in-memory messages.
+ * {@return the global max bytes limit for in-memory messages.}
*/
@Attribute(desc = "Global maximum limit for in-memory messages, in bytes")
long getGlobalMaxSize();
/**
- * Returns the memory used by all the addresses on broker for in-memory messages
+ * {@return the memory used by all the addresses on broker for in-memory messages}
*/
@Attribute(desc = ADDRESS_MEMORY_USAGE_DESCRIPTION)
long getAddressMemoryUsage();
/**
- * Returns the percentage of total disk store use
+ * {@return the percentage of total disk store use}
*/
@Attribute(desc = DISK_STORE_USAGE_DESCRIPTION)
double getDiskStoreUsage();
/**
- * Returns the memory used by all the addresses on broker as a percentage of the global-max-size
+ * {@return the memory used by all the addresses on broker as a percentage of the global-max-size}
*/
@Attribute(desc = ADDRESS_MEMORY_USAGE_PERCENTAGE_DESCRIPTION)
int getAddressMemoryUsagePercentage();
@@ -523,13 +515,13 @@ public interface ActiveMQServerControl {
String getHAPolicy();
/**
- * Returns the runtime size of the authentication cache
+ * {@return the runtime size of the authentication cache}
*/
@Attribute(desc = "The runtime size of the authentication cache")
long getAuthenticationCacheSize();
/**
- * Returns the runtime size of the authorization cache
+ * {@return the runtime size of the authorization cache}
*/
@Attribute(desc = "The runtime size of the authorization cache")
long getAuthorizationCacheSize();
@@ -558,10 +550,11 @@ void deleteAddress(@Parameter(name = "name", desc = "The name of the address") S
/**
* Create a durable queue.
- *
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exits.
+ *
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exits.
+ *
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exits.
+ *
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exits.
+ *
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exits.
+ *
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exits.
+ *
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exits.
+ *
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exits.
+ *
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exits.
+ *
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exits.
+ *
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exits.
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exists.
+ *
- * This method throws a {@link org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException}) exception if the queue already exists and {@code ignoreIfExists} is {@code false}.
+ *
+ *
+ *
+ *
+ *
- * The Strings are Base-64 representation of the transaction XID and can be
- * used to heuristically commit or rollback the transactions.
+ *
* [
* {
@@ -1296,8 +1282,8 @@ boolean closeConsumerWithID(@Parameter(desc = "The session ID", name = "sessionI
String listConnectionsAsJSON() throws Exception;
/**
- * Lists all the consumers which belongs to the connection specified by the connectionID.
- * The returned String is a JSON string containing details about each consumer, e.g.:
+ * Lists all the consumers which belongs to the connection specified by the connectionID. The returned String is a
+ * JSON string containing details about each consumer, e.g.:
*
* [
* {
@@ -1317,8 +1303,8 @@ boolean closeConsumerWithID(@Parameter(desc = "The session ID", name = "sessionI
String listConsumersAsJSON(@Parameter(desc = "a connection ID", name = "connectionID") String connectionID) throws Exception;
/**
- * Lists all the consumers connected to this server.
- * The returned String is a JSON string containing details about each consumer, e.g.:
+ * Lists all the consumers connected to this server. The returned String is a JSON string containing details about
+ * each consumer, e.g.:
*
* [
* {
@@ -1337,8 +1323,8 @@ boolean closeConsumerWithID(@Parameter(desc = "The session ID", name = "sessionI
String listAllConsumersAsJSON() throws Exception;
/**
- * Lists details about all the sessions for the specified connection ID.
- * The returned String is a JSON string containing details about each session associated with the specified ID, e.g.:
+ * Lists details about all the sessions for the specified connection ID. The returned String is a JSON string
+ * containing details about each session associated with the specified ID, e.g.:
*
* [
* {
@@ -1354,8 +1340,8 @@ boolean closeConsumerWithID(@Parameter(desc = "The session ID", name = "sessionI
String listSessionsAsJSON(@Parameter(desc = "a connection ID", name = "connectionID") String connectionID) throws Exception;
/**
- * Lists details about all sessions.
- * The returned String is a JSON string containing details about each and every session, e.g.:
+ * Lists details about all sessions. The returned String is a JSON string containing details about each and every
+ * session, e.g.:
*
* [
* {
@@ -1691,7 +1677,7 @@ void addAddressSettings(@Parameter(desc = "an address match", name = "addressMat
void removeAddressSettings(@Parameter(desc = "an address match", name = "addressMatch") String addressMatch) throws Exception;
/**
- * returns the address settings as a JSON string
+ * {@return the address settings as a JSON string}
*/
@Operation(desc = "Returns the address settings as a JSON string for an address match", impact = MBeanOperationInfo.INFO)
String getAddressSettingsAsJSON(@Parameter(desc = "an address match", name = "addressMatch") String addressMatch) throws Exception;
@@ -1700,8 +1686,7 @@ void addAddressSettings(@Parameter(desc = "an address match", name = "addressMat
String[] getDivertNames();
/**
- * Jon plugin doesn't recognize an Operation whose name is in
- * form getXXXX(), so add this one.
+ * Jon plugin doesn't recognize an Operation whose name is in form getXXXX(), so add this one.
*/
@Operation(desc = "names of the diverts deployed on this server", impact = MBeanOperationInfo.INFO)
default String[] listDivertNames() {
@@ -1981,24 +1966,19 @@ String listQueues(@Parameter(name = "options", desc = "Options") String options,
@Parameter(name = "pageSize", desc = "Page Size") int pageSize) throws Exception;
/**
- * Returns the names of the queues created on this server with the given routing-type.
+ * {@return the names of the queues created on this server with the given routing-type.}
*/
@Operation(desc = "Names of the queues created on this server with the given routing-type (i.e. ANYCAST or MULTICAST)", impact = MBeanOperationInfo.INFO)
String[] getQueueNames(@Parameter(name = "routingType", desc = "The routing type, MULTICAST or ANYCAST") String routingType) throws Exception;
/**
- * Returns the names of the cluster-connections deployed on this server.
+ * {@return the names of the cluster-connections deployed on this server.}
*/
@Operation(desc = "Names of the cluster-connections deployed on this server", impact = MBeanOperationInfo.INFO)
String[] getClusterConnectionNames();
/**
* Add a user (only applicable when using the JAAS PropertiesLoginModule or the ActiveMQBasicSecurityManager)
- *
- * @param username
- * @param password
- * @param roles
- * @throws Exception
*/
@Operation(desc = "add a user (only applicable when using the JAAS PropertiesLoginModule or the ActiveMQBasicSecurityManager)", impact = MBeanOperationInfo.ACTION)
void addUser(@Parameter(name = "username", desc = "Name of the user") String username,
@@ -2007,46 +1987,33 @@ void addUser(@Parameter(name = "username", desc = "Name of the user") String use
@Parameter(name = "plaintext", desc = "whether or not to store the password in plaintext or hash it") boolean plaintext) throws Exception;
/**
- * List the information about a user or all users if no username is supplied (only applicable when using the JAAS PropertiesLoginModule or the ActiveMQBasicSecurityManager).
+ * List the information about a user or all users if no username is supplied (only applicable when using the JAAS
+ * PropertiesLoginModule or the ActiveMQBasicSecurityManager).
*
- * @param username
* @return JSON array of user and role information
- * @throws Exception
*/
@Operation(desc = "list info about a user or all users if no username is supplied (only applicable when using the JAAS PropertiesLoginModule or the ActiveMQBasicSecurityManager)", impact = MBeanOperationInfo.ACTION)
String listUser(@Parameter(name = "username", desc = "Name of the user; leave null to list all known users") String username) throws Exception;
/**
* Remove a user (only applicable when using the JAAS PropertiesLoginModule or the ActiveMQBasicSecurityManager).
- *
- * @param username
- * @throws Exception
*/
@Operation(desc = "remove a user (only applicable when using the JAAS PropertiesLoginModule or the ActiveMQBasicSecurityManager)", impact = MBeanOperationInfo.ACTION)
void removeUser(@Parameter(name = "username", desc = "Name of the user") String username) throws Exception;
/**
- * Set new properties on an existing user (only applicable when using the JAAS PropertiesLoginModule or the ActiveMQBasicSecurityManager).
- *
- * @param username
- * @param password
- * @param roles
- * @throws Exception
+ * Set new properties on an existing user (only applicable when using the JAAS PropertiesLoginModule or the
+ * ActiveMQBasicSecurityManager).
*/
@Operation(desc = "set new properties on an existing user (only applicable when using the JAAS PropertiesLoginModule or the ActiveMQBasicSecurityManager)", impact = MBeanOperationInfo.ACTION)
void resetUser(@Parameter(name = "username", desc = "Name of the user") String username,
@Parameter(name = "password", desc = "User's password") String password,
@Parameter(name = "roles", desc = "User's role (comma separated)") String roles) throws Exception;
+
/**
- * Set new properties on an existing user (only applicable when using the JAAS PropertiesLoginModule or the ActiveMQBasicSecurityManager).
- *
- * @param username
- * @param password
- * @param roles
- * @param plaintext
- * @throws Exception
+ * Set new properties on an existing user (only applicable when using the JAAS PropertiesLoginModule or the
+ * ActiveMQBasicSecurityManager).
*/
-
@Operation(desc = "set new properties on an existing user (only applicable when using the JAAS PropertiesLoginModule or the ActiveMQBasicSecurityManager)", impact = MBeanOperationInfo.ACTION)
void resetUser(@Parameter(name = "username", desc = "Name of the user") String username,
@Parameter(name = "password", desc = "User's password") String password,
@@ -2058,10 +2025,6 @@ void resetUser(@Parameter(name = "username", desc = "Name of the user") String u
/**
* Replays messages from all files in the retention folder that match an address and filter.
- * @param address
- * @param target
- * @param filter
- * @throws Exception
*/
@Operation(desc = "Replays messages from all files in the retention folder that match an address and filter.", impact = MBeanOperationInfo.ACTION)
void replay(@Parameter(name = "address", desc = "Name of the address to replay") String address,
@@ -2070,12 +2033,6 @@ void replay(@Parameter(name = "address", desc = "Name of the address to replay")
/**
* Replays messages from a configurable subset of the files in the retention folder that match an address and filter.
- * @param startScan
- * @param endScan
- * @param address
- * @param target
- * @param filter
- * @throws Exception
*/
@Operation(desc = "Replays messages from a configurable subset of the files in the retention folder that match an address and filter.", impact = MBeanOperationInfo.ACTION)
void replay(@Parameter(name = "startScanDate", desc = "Start date where we will start scanning for journals to replay. Format YYYYMMDDHHMMSS") String startScan,
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressControl.java
index cabb21291aa..ee8f407187c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressControl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressControl.java
@@ -30,54 +30,66 @@ public interface AddressControl {
String LIMIT_PERCENT_DESCRIPTION = "the % of memory limit (global or local) that is in use by this address";
/**
- * Returns the managed address.
+ * {@return the managed address}
*/
@Attribute(desc = "managed address")
String getAddress();
- /*
- * Whether multicast routing is enabled for this address
- * */
+ /**
+ * {@return whether multicast routing is enabled for this address}
+ */
@Attribute(desc = "Get the routing types enabled on this address")
String[] getRoutingTypes();
- /*
- * Whether multicast routing is enabled for this address
- * */
+ /**
+ * {@return the routing types enabled on this address as JSON}
+ */
@Attribute(desc = "Get the routing types enabled on this address as JSON")
String getRoutingTypesAsJSON() throws Exception;
/**
- * Returns the roles (name and permissions) associated with this address.
+ * {@return the roles (name and permissions) associated with this address}
*/
@Attribute(desc = "roles (name and permissions) associated with this address")
Object[] getRoles() throws Exception;
/**
- * Returns the roles (name and permissions) associated with this address
- * using JSON serialization.
- *
- * Java objects can be recreated from JSON serialization using {@link RoleInfo#from(String)}.
+ * {@return the roles (name and permissions) associated with this address using JSON serialization.
+ *
- * keys are node IDs, values are the addresses used to connect to the nodes.
+ * {@return a map of the nodes connected to this cluster connection; keys are node IDs, values are the addresses used
+ * to connect to the nodes}
*/
@Attribute(desc = "map of the nodes connected to this cluster connection (keys are node IDs, values are the addresses used to connect to the nodes)")
Map
- * if {@code true} messages will be exclusively diverted and will not be routed to the origin address,
- * else messages will be routed both to the origin address and the forwarding address.
+ * {@return {@code true} if messages will be exclusively diverted and will not be routed to the origin address;
+ * otherwise {@code false} if messages will be routed both to the origin address and the forwarding address}
*/
@Attribute(desc = "whether this divert is exclusive")
boolean isExclusive();
/**
- * Returns the cluster-wide unique name of this divert.
+ * {@return the cluster-wide unique name of this divert}
*/
@Attribute(desc = "cluster-wide unique name of this divert")
String getUniqueName();
/**
- * Returns the routing name of this divert.
+ * {@return the routing name of this divert}
*/
@Attribute(desc = "routing name of this divert")
String getRoutingName();
/**
- * Returns the origin address used by this divert.
+ * {@return the origin address used by this divert}
*/
@Attribute(desc = "origin address used by this divert")
String getAddress();
/**
- * Returns the forwarding address used by this divert.
+ * {@return the forwarding address used by this divert}
*/
@Attribute(desc = "forwarding address used by this divert")
String getForwardingAddress();
/**
- * Return the name of the org.apache.activemq.artemis.core.server.cluster.Transformer implementation associated with this divert.
+ * {@return the name of the {@code org.apache.activemq.artemis.core.server.transformer.Transformer} implementation
+ * associated with this divert}
*/
- @Attribute(desc = "name of the org.apache.activemq.artemis.core.server.cluster.Transformer implementation associated with this divert")
+ @Attribute(desc = "name of the org.apache.activemq.artemis.core.server.transformer.Transformer implementation associated with this divert")
String getTransformerClassName();
/**
- * Returns a map of the properties configured for the transformer.
+ * {@return a map of key/value pairs used to configure the transformer in JSON form}
*/
- @Attribute(desc = "map of key, value pairs used to configure the transformer in JSON form")
+ @Attribute(desc = "map of key/value pairs used to configure the transformer in JSON form")
String getTransformerPropertiesAsJSON();
/**
- * Returns a map of the properties configured for the transformer.
+ * {@return a map of the key/value pairs used to configure the transformer}
*/
- @Attribute(desc = "map of key, value pairs used to configure the transformer")
+ @Attribute(desc = "map of key/value pairs used to configure the transformer")
Map
- * If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
- * and the result will be a String corresponding to the server exception.
+ * {@return the result of an operation invocation or an attribute value; if an error occurred on the server {@link
+ * #hasOperationSucceeded(Message)} will return {@code false} and the result will be a {@code String} corresponding
+ * to the server exception}
*/
public static Object[] getResults(final ICoreMessage message) throws Exception {
SimpleString sstring = message.getReadOnlyBodyBuffer().readNullableSimpleString();
@@ -260,20 +263,18 @@ public static Object[] getResults(final ICoreMessage message) throws Exception {
}
/**
- * Returns the result of an operation invocation or an attribute value.
- *
- * If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
- * and the result will be a String corresponding to the server exception.
+ * {@return the result of an operation invocation or an attribute value; if an error occurred on the server {@link
+ * #hasOperationSucceeded(Message)} will return {@code false} and the result will be a {@code String} corresponding
+ * to the server exception}
*/
public static Object getResult(final ICoreMessage message) throws Exception {
return getResult(message, null);
}
/**
- * Returns the result of an operation invocation or an attribute value.
- *
- * If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
- * and the result will be a String corresponding to the server exception.
+ * {@return the result of an operation invocation or an attribute value; if an error occurred on the server {@link
+ * #hasOperationSucceeded(Message)} will return {@code false} and the result will be a {@code String} corresponding
+ * to the server exception}
*/
public static Object getResult(final ICoreMessage message, Class desiredType) throws Exception {
Object[] res = ManagementHelper.getResults(message);
@@ -286,7 +287,7 @@ public static Object getResult(final ICoreMessage message, Class desiredType) th
}
/**
- * Returns whether the invocation of the management operation on the server resource succeeded.
+ * {@return whether the invocation of the management operation on the server resource succeeded}
*/
public static boolean hasOperationSucceeded(final Message message) {
if (message == null) {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/MessageCounterInfo.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/MessageCounterInfo.java
index e5c3cc964e7..2fa64643109 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/MessageCounterInfo.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/MessageCounterInfo.java
@@ -21,8 +21,8 @@
import org.apache.activemq.artemis.api.core.JsonUtil;
/**
- * Helper class to create Java Objects from the
- * JSON serialization returned by {@link QueueControl#listMessageCounter()}.
+ * Helper class to create Java Objects from the JSON serialization returned by
+ * {@link QueueControl#listMessageCounter()}.
*/
public final class MessageCounterInfo {
@@ -47,8 +47,8 @@ public final class MessageCounterInfo {
private final String updateTimestamp;
/**
- * Returns a MessageCounterInfo corresponding to the JSON serialization returned
- * by {@link QueueControl#listMessageCounter()}.
+ * {@return a MessageCounterInfo corresponding to the JSON serialization returned by {@link
+ * QueueControl#listMessageCounter()}}
*/
public static MessageCounterInfo fromJSON(final String jsonString) throws Exception {
JsonObject data = JsonUtil.readJsonObject(jsonString);
@@ -90,70 +90,70 @@ public MessageCounterInfo(final String name,
}
/**
- * Returns the name of the queue.
+ * {@return the name of the queue}
*/
public String getName() {
return name;
}
/**
- * Returns the name of the subscription.
+ * {@return the name of the subscription}
*/
public String getSubscription() {
return subscription;
}
/**
- * Returns whether the queue is durable.
+ * {@return whether the queue is durable}
*/
public boolean isDurable() {
return durable;
}
/**
- * Returns the number of messages added to the queue since it was created.
+ * {@return the number of messages added to the queue since it was created}
*/
public long getCount() {
return count;
}
/**
- * Returns the number of messages added to the queue since the last counter sample.
+ * {@return the number of messages added to the queue since the last counter sample}
*/
public long getCountDelta() {
return countDelta;
}
/**
- * Returns the number of messages currently in the queue.
+ * {@return the number of messages currently in the queue}
*/
public int getDepth() {
return depth;
}
/**
- * Returns the number of messages in the queue since last counter sample.
+ * {@return the number of messages in the queue since last counter sample}
*/
public int getDepthDelta() {
return depthDelta;
}
/**
- * Returns the timestamp of the last time a message was added to the queue.
+ * {@return the timestamp of the last time a message was added to the queue}
*/
public String getLastAddTimestamp() {
return lastAddTimestamp;
}
/**
- * Returns the timestamp of the last time a message from the queue was acknolwedged.
+ * {@return the timestamp of the last time a message from the queue was acknolwedged}
*/
public String getLastAckTimestamp() {
return lastAckTimestamp;
}
/**
- * Returns the timestamp of the last time the queue was updated.
+ * {@return the timestamp of the last time the queue was updated}
*/
public String getUpdateTimestamp() {
return updateTimestamp;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/NodeInfo.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/NodeInfo.java
index a6a53e20553..b17bfbc93cd 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/NodeInfo.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/NodeInfo.java
@@ -22,8 +22,8 @@
import org.apache.activemq.artemis.api.core.JsonUtil;
/**
- * Helper class to create Java Objects from the
- * JSON serialization returned by {@link ActiveMQServerControl#listNetworkTopology()}.
+ * Helper class to create Java Objects from the JSON serialization returned by
+ * {@link ActiveMQServerControl#listNetworkTopology()}.
*/
public class NodeInfo {
private final String id;
@@ -43,8 +43,8 @@ public String getBackup() {
}
/**
- * Returns an array of NodeInfo corresponding to the JSON serialization returned
- * by {@link ActiveMQServerControl#listNetworkTopology()}.
+ * {@return an array of NodeInfo corresponding to the JSON serialization returned by {@link
+ * ActiveMQServerControl#listNetworkTopology()}}
*/
public static NodeInfo[] from(final String jsonString) throws Exception {
JsonArray array = JsonUtil.readJsonArray(jsonString);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java
index 73221629a6e..1ef8d0474d3 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java
@@ -74,14 +74,14 @@ private ObjectNameBuilder(final String domain, final String brokerName, boolean
}
/**
- * Returns the ObjectName used by the single {@link ActiveMQServerControl}.
+ * {@return the ObjectName used by the single {@link ActiveMQServerControl}}
*/
public ObjectName getActiveMQServerObjectName() throws Exception {
return ObjectName.getInstance(getActiveMQServerName());
}
/**
- * Returns the ObjectName used by AddressControl.
+ * {@return the ObjectName used by AddressControl}
*
* @see AddressControl
*/
@@ -90,7 +90,7 @@ public ObjectName getAddressObjectName(final SimpleString address) throws Except
}
/**
- * Returns the ObjectName used by QueueControl.
+ * {@return the ObjectName used by QueueControl}
*
* @see QueueControl
*/
@@ -100,7 +100,7 @@ public ObjectName getQueueObjectName(final SimpleString address, final SimpleStr
/**
- * Returns the ObjectName used by DivertControl.
+ * {@return the ObjectName used by DivertControl}
*
* @see DivertControl
*/
@@ -109,7 +109,7 @@ public ObjectName getDivertObjectName(final String name, String address) throws
}
/**
- * Returns the ObjectName used by AcceptorControl.
+ * {@return the ObjectName used by AcceptorControl}
*
* @see AcceptorControl
*/
@@ -118,7 +118,7 @@ public ObjectName getAcceptorObjectName(final String name) throws Exception {
}
/**
- * Returns the ObjectName used by BroadcastGroupControl.
+ * {@return the ObjectName used by BroadcastGroupControl}
*
* @see BroadcastGroupControl
*/
@@ -127,7 +127,7 @@ public ObjectName getBroadcastGroupObjectName(final String name) throws Exceptio
}
/**
- * Returns the ObjectName used by broker connection management objects for outgoing connections.
+ * {@return the ObjectName used by broker connection management objects for outgoing connections}
*
* @see BrokerConnectionControl
*/
@@ -136,16 +136,13 @@ public ObjectName getBrokerConnectionObjectName(String name) throws Exception {
}
/**
- * Returns the base ObjectName string used by for outgoing broker connections and possibly broker connection
- * services that are registered by broker connection specific features. This value is pre-quoted and ready
- * for use in an ObjectName.getIstnace call but is intended for use by broker connection components to create
- * names specific to a broker connection feature that registers its own object for management.
- *
- * @param name
- * The broker connection name
- *
- * @return the base object name string that is used for broker connection Object names.
+ * Returns the base ObjectName string used by for outgoing broker connections and possibly broker connection services
+ * that are registered by broker connection specific features. This value is pre-quoted and ready for use in an
+ * ObjectName.getIstnace call but is intended for use by broker connection components to create names specific to a
+ * broker connection feature that registers its own object for management.
*
+ * @param name The broker connection name
+ * @return the base object name string that is used for broker connection Object names
* @see BrokerConnectionControl
*/
public String getBrokerConnectionBaseObjectNameString(String name) throws Exception {
@@ -153,7 +150,7 @@ public String getBrokerConnectionBaseObjectNameString(String name) throws Except
}
/**
- * Returns the ObjectName used by remote broker connection management objects for incoming connections.
+ * {@return the ObjectName used by remote broker connection management objects for incoming connections}
*
* @see RemoteBrokerConnectionControl
*/
@@ -162,17 +159,14 @@ public ObjectName getRemoteBrokerConnectionObjectName(String nodeId, String name
}
/**
- * Returns the base ObjectName string used by for incoming broker connections and possibly broker connection
- * services that are registered by broker connection specific features. This value is pre-quoted and ready
- * for use in an ObjectName.getIstnace call but is intended for use by broker connection components to create
- * names specific to a broker connection feature that registers its own object for management.
- *
- * @param nodeId
- * The node ID of the remote broker that initiated the broker connection.
- * @param name
- * The broker connection name configured on the initiating broker.
+ * Returns the base ObjectName string used by for incoming broker connections and possibly broker connection services
+ * that are registered by broker connection specific features. This value is pre-quoted and ready for use in an
+ * ObjectName.getIstnace call but is intended for use by broker connection components to create names specific to a
+ * broker connection feature that registers its own object for management.
*
- * @return the base object name string that is used for broker connection Object names.
+ * @param nodeId The node ID of the remote broker that initiated the broker connection.
+ * @param name The broker connection name configured on the initiating broker.
+ * @return the base object name string that is used for broker connection Object names
*/
public String getRemoteBrokerConnectionBaseObjectNameString(String nodeId, String name) throws Exception {
return getActiveMQServerName() +
@@ -182,7 +176,7 @@ public String getRemoteBrokerConnectionBaseObjectNameString(String nodeId, Strin
}
/**
- * Returns the ObjectName used by BridgeControl.
+ * {@return the ObjectName used by BridgeControl}
*
* @see BridgeControl
*/
@@ -191,7 +185,7 @@ public ObjectName getBridgeObjectName(final String name) throws Exception {
}
/**
- * Returns the ObjectName used by ClusterConnectionControl.
+ * {@return the ObjectName used by ClusterConnectionControl}
*
* @see ClusterConnectionControl
*/
@@ -200,7 +194,7 @@ public ObjectName getClusterConnectionObjectName(final String name) throws Excep
}
/**
- * Returns the ObjectName used by ConnectionRouterControl.
+ * {@return the ObjectName used by ConnectionRouterControl}
*
* @see ConnectionRouterControl
*/
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Operation.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Operation.java
index 9e03b11f1d2..e95dd58c302 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Operation.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Operation.java
@@ -26,8 +26,7 @@
/**
* Info for a MBean Operation.
*
+ *
- * The Map's key is a toString representation for the consumer. Each consumer will then return a {@code Map
+ *
+ *
+ *
+ *
+ *
+ *
+ * Counts the number of delivering messages in this queue matching the specified filter, grouped by the given
+ * property field. In case of null property will be grouped in "null"
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
- * Resource's name is build by appending its name to its corresponding type.
- * For example, the resource name of the "foo" queue is {@code QUEUE + "foo"}.
+ *
- * However when decompressing the message, we are not sure how large the message could be..
- * for that reason we fake a large message controller that will deal with the message as it was a large message
- *
+ * This method deals with messages arrived as regular message but its contents are compressed. Such messages come
+ * from message senders who are configured to compress large messages, and if some of the messages are compressed
+ * below the min-large-message-size limit, they are sent as regular messages.
+ *
*
+ *
- * The messageID is set when the message is handled by the server.
- */
@Override
public long getMessageID() {
return message.getMessageID();
@@ -193,33 +174,17 @@ public Message setMessageID(long id) {
return this;
}
- /**
- * Returns the expiration time of this message.
- */
@Override
public long getExpiration() {
return message.getExpiration();
}
- /**
- * Sets the expiration of this message.
- *
- * @param expiration expiration time
- */
@Override
public Message setExpiration(long expiration) {
message.setExpiration(expiration);
return this;
}
- /**
- * This represents historically the JMSMessageID.
- * We had in the past used this for the MessageID that was sent on core messages...
- *
- * later on when we added AMQP this name clashed with AMQPMessage.getUserID();
- *
- * @return the user id
- */
@Override
public Object getUserID() {
return message.getUserID();
@@ -231,19 +196,11 @@ public Message setUserID(Object userID) {
return this;
}
- /**
- * Returns whether this message is durable or not.
- */
@Override
public boolean isDurable() {
return message.isDurable();
}
- /**
- * Sets whether this message is durable or not.
- *
- * @param durable {@code true} to flag this message as durable, {@code false} else
- */
@Override
public Message setDurable(boolean durable) {
message.setDurable(durable);
@@ -288,45 +245,22 @@ public Message setTimestamp(long timestamp) {
return this;
}
- /**
- * Returns the message priority.
- *
+ * Similarly to {@code flushConnection} on {@link #send(Packet, boolean)}, it requests any un-flushed previous sent
+ * packets to be flushed to the underlying connection.
+ * false
or null
if no interceptors
- * returned false
.
*/
public static String invokeInterceptors(final Packet packet,
final List
- */
public class SessionSendContinuationMessage extends SessionContinuationMessage {
protected boolean requiresResponse;
@@ -31,12 +28,14 @@ public class SessionSendContinuationMessage extends SessionContinuationMessage {
// Used on confirmation handling
protected Message message;
/**
- * In case, we are using a different handler than the one set on the {@link org.apache.activemq.artemis.api.core.client.ClientSession}
- *
+ * In case, we are using a different handler than the one set on the
+ * {@link org.apache.activemq.artemis.api.core.client.ClientSession}
+ *
- */
public class SessionSendContinuationMessage_V2 extends SessionSendContinuationMessage {
private long correlationID;
@@ -34,11 +31,6 @@ public SessionSendContinuationMessage_V2() {
super();
}
- /**
- * @param body
- * @param continues
- * @param requiresResponse
- */
public SessionSendContinuationMessage_V2(final Message message,
final byte[] body,
final boolean continues,
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage_V3.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage_V3.java
index 60db0c2d92a..b280bb92b1f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage_V3.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendContinuationMessage_V3.java
@@ -21,9 +21,6 @@
import org.apache.activemq.artemis.api.core.client.SendAcknowledgementHandler;
import org.apache.activemq.artemis.utils.DataConstants;
-/**
- * A SessionSendContinuationMessage
- */
public class SessionSendContinuationMessage_V3 extends SessionSendContinuationMessage_V2 {
private int senderID;
@@ -32,11 +29,6 @@ public SessionSendContinuationMessage_V3() {
super();
}
- /**
- * @param body
- * @param continues
- * @param requiresResponse
- */
public SessionSendContinuationMessage_V3(final Message message,
final byte[] body,
final boolean continues,
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java
index f1afbdb7d9e..c98476abf2d 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java
@@ -28,16 +28,20 @@ public class SessionSendMessage extends MessagePacket {
protected boolean requiresResponse;
/**
- * In case, we are using a different handler than the one set on the {@link org.apache.activemq.artemis.api.core.client.ClientSession}
- *
+ * In case, we are using a different handler than the one set on the
+ * {@link org.apache.activemq.artemis.api.core.client.ClientSession}
+ *
+ * This method must NOT throw an exception if it fails to create the connection (e.g. network is not available), in
+ * this case it MUST return null.
+ *
+ * Disable Nagle's algorithm.
+ * META-INF/services/org.apache.activemq.artemis.spi.core.remoting.ssl.OpenSSLContextFactory
- * file with org.apache.activemq.artemis.core.remoting.impl.ssl.CachingOpenSSLContextFactory
- * as value.
+ * {@link OpenSSLContextFactory} providing a cache of {@link SslContext}. Since {@link SslContext} should be reused
+ * instead of recreated and are thread safe. To activate it you need to allow this Service to be discovered by having a
+ * {@code META-INF/services/org.apache.activemq.artemis.spi.core.remoting.ssl.OpenSSLContextFactory} file with
+ * {@code org.apache.activemq.artemis.core.remoting.impl.ssl.CachingOpenSSLContextFactory} as value.
*/
public class CachingOpenSSLContextFactory extends DefaultOpenSSLContextFactory {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/CachingSSLContextFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/CachingSSLContextFactory.java
index bd385c82821..e283ac1b6eb 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/CachingSSLContextFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/CachingSSLContextFactory.java
@@ -28,12 +28,10 @@
import org.apache.activemq.artemis.utils.ConfigurationHelper;
/**
- * {@link SSLContextFactory} providing a cache of {@link SSLContext}.
- * Since {@link SSLContext} should be reused instead of recreated and are thread safe.
- * To activate it you need to allow this Service to be discovered by having a
- * META-INF/services/org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextFactory
- * file with org.apache.activemq.artemis.core.remoting.impl.ssl.CachingSSLContextFactory
- * as value.
+ * {@link SSLContextFactory} providing a cache of {@link SSLContext}. Since {@link SSLContext} should be reused instead
+ * of recreated and are thread safe. To activate it you need to allow this Service to be discovered by having a
+ * {@code META-INF/services/org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextFactory} file with
+ * {@code org.apache.activemq.artemis.core.remoting.impl.ssl.CachingSSLContextFactory} as value.
*/
public class CachingSSLContextFactory extends DefaultSSLContextFactory {
@@ -59,11 +57,11 @@ public SSLContext getSSLContext(final SSLContextConfig config, final Mapconfig
contains an entry with key "sslContext", the associated value is returned
+ * additionalOpts) throws Exception {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java
index 1e5ab56baee..7dee7e0379c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java
@@ -60,10 +60,10 @@
import org.apache.activemq.artemis.utils.ClassloadingUtil;
/**
- * Please note, this class supports PKCS#11 keystores, but there are no specific tests in the ActiveMQ Artemis test-suite to
- * validate/verify this works because this requires a functioning PKCS#11 provider which is not available by default
- * (see java.security.Security#getProviders()). The main thing to keep in mind is that PKCS#11 keystores will either use
- * null, and empty string, or NONE for their keystore path.
+ * Please note, this class supports PKCS#11 keystores, but there are no specific tests in the ActiveMQ Artemis
+ * test-suite to validate/verify this works because this requires a functioning PKCS#11 provider which is not available
+ * by default (see java.security.Security#getProviders()). The main thing to keep in mind is that PKCS#11 keystores
+ * will either use null, and empty string, or NONE for their keystore path.
*/
public class SSLSupport {
@@ -410,9 +410,9 @@ private static URL validateStoreURL(final String storePath) throws Exception {
}
/**
- * This seems duplicate code all over the place, but for security reasons we can't let something like this to be open in a
- * utility class, as it would be a door to load anything you like in a safe VM.
- * For that reason any class trying to do a privileged block should do with the AccessController directly.
+ * This seems duplicate code all over the place, but for security reasons we can't let something like this to be open
+ * in a utility class, as it would be a door to load anything you like in a safe VM. For that reason any class trying
+ * to do a privileged block should do with the AccessController directly.
*/
private static URL findResource(final String resourceName) {
return AccessController.doPrivileged((PrivilegedAction
- *
- * in addition to the properties defined in ManagementHelper.HDR_NOTIFICATION_TYPE
- the type of notification (SimpleString)ManagementHelper.HDR_NOTIFICATION_MESSAGE
- a message contextual to the notification (SimpleString)ManagementHelper.HDR_NOTIFICATION_TIMESTAMP
- the timestamp when the notification occurred (long)props
+ * in addition to the properties defined in {@code props}
*
* @see org.apache.activemq.artemis.api.core.management.ManagementHelper
*/
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/transaction/impl/XidImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/transaction/impl/XidImpl.java
index 3dfca762f61..09404262586 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/transaction/impl/XidImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/transaction/impl/XidImpl.java
@@ -65,10 +65,6 @@ private static byte[] toByteArray(final Xid xid) {
/**
* Standard constructor
- *
- * @param branchQualifier
- * @param formatId
- * @param globalTransactionId
*/
public XidImpl(final byte[] branchQualifier, final int formatId, final byte[] globalTransactionId) {
this.branchQualifier = branchQualifier;
@@ -78,8 +74,6 @@ public XidImpl(final byte[] branchQualifier, final int formatId, final byte[] gl
/**
* Copy constructor
- *
- * @param other
*/
public XidImpl(final Xid other) {
branchQualifier = copyBytes(other.getBranchQualifier());
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/BytesMessageUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/BytesMessageUtil.java
index 0a38be2d785..0e8d6c88768 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/BytesMessageUtil.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/BytesMessageUtil.java
@@ -128,11 +128,7 @@ public static void bytesWriteBytes(ActiveMQBuffer message, final byte[] value, f
}
/**
- * Returns true if it could send the Object to any known format
- *
- * @param message
- * @param value
- * @return
+ * {@return {@code true} if it could send the Object to any known format}
*/
public static boolean bytesWriteObject(ActiveMQBuffer message, Object value) {
if (value == null) {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/MessageUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/MessageUtil.java
index 03b3f89fdd5..8c626cb208c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/MessageUtil.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/MessageUtil.java
@@ -135,7 +135,7 @@ public static void setJMSReplyTo(Message message, final SimpleString dest) {
}
public static void clearProperties(Message message) {
- /**
+ /*
* JavaDoc for this method states:
* Clears a message's properties.
* The message's header fields and body are not cleared.
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/StreamMessageUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/StreamMessageUtil.java
index ad98a0155a7..cd20f86d0e7 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/StreamMessageUtil.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/StreamMessageUtil.java
@@ -23,11 +23,8 @@
public class StreamMessageUtil extends MessageUtil {
/**
- * Method to read boolean values out of the Stream protocol existent on JMS Stream Messages
- * Throws IllegalStateException if the type was invalid
- *
- * @param buff
- * @return
+ * Method to read boolean values out of the Stream protocol existent on JMS Stream Messages Throws
+ * IllegalStateException if the type was invalid
*/
public static boolean streamReadBoolean(ActiveMQBuffer buff) {
byte type = buff.readByte();
@@ -164,11 +161,9 @@ public static String streamReadString(ActiveMQBuffer buff) {
}
/**
- * Utility for reading bytes out of streaming.
- * It will return remainingBytes, bytesRead
+ * Utility for reading bytes out of streaming. It will return remainingBytes, bytesRead
*
* @param remainingBytes remaining Bytes from previous read. Send it to 0 if it was the first call for the message
- * @param buff
* @return a pair of remaining bytes and bytes read
*/
public static PairMETA-INF/services/org.apache.activemq.artemis.spi.core.remoting.ssl.OpenSSLContextFactory
- * in your jar and fill it with the full qualified name of your implementation.
+ * Service interface to create an {@link SslContext} for a configuration. This is ONLY used with OpenSSL. To create and
+ * use your own implementation you need to create a file
+ * {@code META-INF/services/org.apache.activemq.artemis.spi.core.remoting.ssl.OpenSSLContextFactory} in your jar and
+ * fill it with the full qualified name of your implementation.
*/
public interface OpenSSLContextFactory extends Comparable
+ * This class holds configuration parameters for SSL context initialization. To be used with {@link SSLContextFactory}
+ * and {@link OpenSSLContextFactory}.
+ * META-INF/services/org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextFactory
- * in your jar and fill it with the full qualified name of your implementation.
+ * Service interface to create a SSLContext for a configuration. This is NOT used by OpenSSL. To create and use your own
+ * implementation you need to create a file
+ * {@code META-INF/services/org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextFactory} in your jar and fill it
+ * with the full qualified name of your implementation.
*/
public interface SSLContextFactory extends Comparable
+ * Append to {@code errorMessage} a detailed description of the provided {@link SQLException}.
+ *
*
+ * Append to {@code errorMessage} a detailed description of the provided {@link SQLException}.
+ *
*
- * If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
- * and the result will be a String corresponding to the server exception.
+ * {@return the result of an operation invocation or an attribute value; if an error occurred on the server {@link
+ * #hasOperationSucceeded(Message)} will return {@code false} and the result will be a {@code String} corresponding
+ * to the server exception}
*/
public static Object[] getResults(final Message message) throws Exception {
return ManagementHelper.getResults(JMSManagementHelper.getCoreMessage(message));
}
/**
- * Returns the result of an operation invocation or an attribute value.
- *
- * If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
- * and the result will be a String corresponding to the server exception.
+ * {@return the result of an operation invocation or an attribute value; if an error occurred on the server {@link
+ * #hasOperationSucceeded(Message)} will return {@code false} and the result will be a {@code String} corresponding
+ * to the server exception}
*/
public static Object getResult(final Message message) throws Exception {
return getResult(message, null);
}
/**
- * Returns the result of an operation invocation or an attribute value.
- *
- * If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
- * and the result will be a String corresponding to the server exception.
+ * {@return the result of an operation invocation or an attribute value; if an error occurred on the server {@link
+ * #hasOperationSucceeded(Message)} will return {@code false} and the result will be a {@code String} corresponding
+ * to the server exception}
*/
public static Object getResult(final Message message, Class desiredType) throws Exception {
return ManagementHelper.getResult(JMSManagementHelper.getCoreMessage(message), desiredType);
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
index 8b66bc6ada2..d9f8cc55aad 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
@@ -61,8 +61,8 @@
/**
* ActiveMQ Artemis implementation of a JMS Connection.
*
- * JMS Messages only live on the client side - the server only deals with MessageImpl
- * instances
+ *