You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2015/08/06 00:13:59 UTC
activemq git commit: Fix some javadoc warnings and spelling errors in
the docs.
Repository: activemq
Updated Branches:
refs/heads/master 5e4014a97 -> 61b2f6b40
Fix some javadoc warnings and spelling errors in the docs.
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/61b2f6b4
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/61b2f6b4
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/61b2f6b4
Branch: refs/heads/master
Commit: 61b2f6b40e06a5fd72077a4abcca7faadc07e3e4
Parents: 5e4014a
Author: Timothy Bish <ta...@gmail.com>
Authored: Wed Aug 5 18:13:42 2015 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Wed Aug 5 18:13:42 2015 -0400
----------------------------------------------------------------------
.../org/apache/activemq/ActiveMQConnection.java | 8 +-
.../activemq/ActiveMQConnectionFactory.java | 2 +-
.../activemq/ActiveMQMessageAuditNoSync.java | 19 +-
.../activemq/ActiveMQMessageConsumer.java | 7 +-
.../apache/activemq/ActiveMQQueueReceiver.java | 17 +-
.../apache/activemq/ActiveMQQueueSession.java | 207 ++++---------------
.../org/apache/activemq/ActiveMQSession.java | 13 +-
.../jndi/ActiveMQInitialContextFactory.java | 8 +-
.../activemq/jndi/JNDIStorableInterface.java | 7 +-
.../activemq/transport/TransportServer.java | 3 +-
.../ExceededMaximumConnectionsException.java | 9 +-
.../transport/udp/SimpleBufferPool.java | 10 +-
.../java/org/apache/activemq/util/Callback.java | 9 +-
.../org/apache/activemq/util/StopWatch.java | 8 +-
.../org/apache/activemq/util/TimeUtils.java | 9 +-
15 files changed, 102 insertions(+), 234 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java
index 9afb522..50a64d8 100755
--- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java
+++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java
@@ -1246,7 +1246,7 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
}
/**
- * @return
+ * @return a newly created ConsumedId unique to this connection session instance.
*/
private ConsumerId createConsumerId() {
return new ConsumerId(connectionSessionId, consumerIdGenerator.getNextSequenceId());
@@ -1316,7 +1316,7 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
* Send a packet through a Connection - for internal use only
*
* @param command
- * @return
+ *
* @throws JMSException
*/
public void syncSendPacket(final Command command, final AsyncCallback onComplete) throws JMSException {
@@ -1418,7 +1418,9 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
* Send a packet through a Connection - for internal use only
*
* @param command
- * @return
+ *
+ * @return the broker Response for the given Command.
+ *
* @throws JMSException
*/
public Response syncSendPacket(Command command, int timeout) throws JMSException {
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
index 1fbf604..a25737f 100755
--- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
+++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
@@ -288,7 +288,7 @@ public class ActiveMQConnectionFactory extends JNDIBaseStorable implements Conne
}
/**
- * @returns the StatsImpl associated with this ConnectionFactory.
+ * @return the StatsImpl associated with this ConnectionFactory.
*/
@Override
public StatsImpl getStats() {
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageAuditNoSync.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageAuditNoSync.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageAuditNoSync.java
index de30592..464f63a 100755
--- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageAuditNoSync.java
+++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageAuditNoSync.java
@@ -30,8 +30,6 @@ import org.apache.activemq.util.LRUCache;
/**
* Provides basic audit functions for Messages without sync
- *
- *
*/
public class ActiveMQMessageAuditNoSync implements Serializable {
@@ -219,8 +217,11 @@ public class ActiveMQMessageAuditNoSync implements Serializable {
/**
* Check the message is in order
+ *
* @param msg
- * @return
+ *
+ * @return true if the id is in order
+ *
* @throws JMSException
*/
public boolean isInOrder(Message msg) throws JMSException {
@@ -229,8 +230,10 @@ public class ActiveMQMessageAuditNoSync implements Serializable {
/**
* Check the message id is in order
+ *
* @param id
- * @return
+ *
+ * @return true if the id is in order
*/
public boolean isInOrder(final String id) {
boolean answer = true;
@@ -251,8 +254,10 @@ public class ActiveMQMessageAuditNoSync implements Serializable {
/**
* Check the MessageId is in order
+ *
* @param message
- * @return
+ *
+ * @return true if the id is in order
*/
public boolean isInOrder(final MessageReference message) {
return isInOrder(message.getMessageId());
@@ -260,8 +265,10 @@ public class ActiveMQMessageAuditNoSync implements Serializable {
/**
* Check the MessageId is in order
+ *
* @param id
- * @return
+ *
+ * @return true if the id is in order
*/
public boolean isInOrder(final MessageId id) {
boolean answer = false;
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
index 45232e5..a518a0b 100755
--- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
+++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
@@ -579,7 +579,9 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
/**
* @param md
- * @return
+ * the MessageDispatch that arrived from the Broker.
+ *
+ * @return an ActiveMQMessage initialized from the Message in the dispatch.
*/
private ActiveMQMessage createActiveMQMessage(final MessageDispatch md) throws JMSException {
ActiveMQMessage m = (ActiveMQMessage)md.getMessage().copy();
@@ -1534,7 +1536,8 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
/**
* Delivers a message to the message listener.
*
- * @return
+ * @return true if another execution is needed.
+ *
* @throws JMSException
*/
public boolean iterate() {
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java
index bf6b950..1f6d476 100755
--- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java
+++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java
@@ -44,44 +44,43 @@ import org.apache.activemq.command.ConsumerId;
* object is recommended for creating new code. The <CODE>QueueReceiver
* </CODE>
* is provided to support existing code.
- *
+ *
* @see javax.jms.Session#createConsumer(javax.jms.Destination, String)
* @see javax.jms.Session#createConsumer(javax.jms.Destination)
* @see javax.jms.QueueSession#createReceiver(Queue, String)
* @see javax.jms.QueueSession#createReceiver(Queue)
* @see javax.jms.MessageConsumer
*/
-
public class ActiveMQQueueReceiver extends ActiveMQMessageConsumer implements QueueReceiver {
/**
* @param theSession
- * @param value
+ * @param consumerId
* @param destination
- * @param messageSelector
+ * @param selector
* @param prefetch
+ * @param maximumPendingMessageCount
* @param asyncDispatch
+ *
* @throws JMSException
*/
protected ActiveMQQueueReceiver(ActiveMQSession theSession, ConsumerId consumerId,
ActiveMQDestination destination, String selector, int prefetch,
- int maximumPendingMessageCount, boolean asyncDispatch)
- throws JMSException {
+ int maximumPendingMessageCount, boolean asyncDispatch) throws JMSException {
super(theSession, consumerId, destination, null, selector, prefetch, maximumPendingMessageCount,
false, false, asyncDispatch, null);
}
/**
* Gets the <CODE>Queue</CODE> associated with this queue receiver.
- *
+ *
* @return this receiver's <CODE>Queue</CODE>
* @throws JMSException if the JMS provider fails to get the queue for this
* queue receiver due to some internal error.
*/
-
+ @Override
public Queue getQueue() throws JMSException {
checkClosed();
return (Queue)super.getDestination();
}
-
}
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/ActiveMQQueueSession.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQQueueSession.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQQueueSession.java
index 272d4cd..66170e5 100755
--- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQQueueSession.java
+++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQQueueSession.java
@@ -45,10 +45,8 @@ import javax.jms.TopicSubscriber;
* A QueueSession implementation that throws IllegalStateExceptions when Topic
* operations are attempted but which delegates to another QueueSession for all
* other operations. The ActiveMQSessions implement both Topic and Queue
- * Sessions methods but the spec states that Queue session should throw
+ * Sessions methods but the specification states that Queue session should throw
* Exceptions if topic operations are attempted on it.
- *
- *
*/
public class ActiveMQQueueSession implements QueueSession {
@@ -58,52 +56,32 @@ public class ActiveMQQueueSession implements QueueSession {
this.next = next;
}
- /**
- * @throws JMSException
- */
+ @Override
public void close() throws JMSException {
next.close();
}
- /**
- * @throws JMSException
- */
+ @Override
public void commit() throws JMSException {
next.commit();
}
- /**
- * @param queue
- * @return
- * @throws JMSException
- */
+ @Override
public QueueBrowser createBrowser(Queue queue) throws JMSException {
return next.createBrowser(queue);
}
- /**
- * @param queue
- * @param messageSelector
- * @return
- * @throws JMSException
- */
+ @Override
public QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException {
return next.createBrowser(queue, messageSelector);
}
- /**
- * @return
- * @throws JMSException
- */
+ @Override
public BytesMessage createBytesMessage() throws JMSException {
return next.createBytesMessage();
}
- /**
- * @param destination
- * @return
- * @throws JMSException
- */
+ @Override
public MessageConsumer createConsumer(Destination destination) throws JMSException {
if (destination instanceof Topic) {
throw new InvalidDestinationException("Topics are not supported by a QueueSession");
@@ -111,12 +89,7 @@ public class ActiveMQQueueSession implements QueueSession {
return next.createConsumer(destination);
}
- /**
- * @param destination
- * @param messageSelector
- * @return
- * @throws JMSException
- */
+ @Override
public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException {
if (destination instanceof Topic) {
throw new InvalidDestinationException("Topics are not supported by a QueueSession");
@@ -124,13 +97,7 @@ public class ActiveMQQueueSession implements QueueSession {
return next.createConsumer(destination, messageSelector);
}
- /**
- * @param destination
- * @param messageSelector
- * @param noLocal
- * @return
- * @throws JMSException
- */
+ @Override
public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean noLocal) throws JMSException {
if (destination instanceof Topic) {
throw new InvalidDestinationException("Topics are not supported by a QueueSession");
@@ -138,66 +105,37 @@ public class ActiveMQQueueSession implements QueueSession {
return next.createConsumer(destination, messageSelector, noLocal);
}
- /**
- * @param topic
- * @param name
- * @return
- * @throws JMSException
- */
+ @Override
public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException {
throw new IllegalStateException("Operation not supported by a QueueSession");
}
- /**
- * @param topic
- * @param name
- * @param messageSelector
- * @param noLocal
- * @return
- * @throws JMSException
- */
+ @Override
public TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException {
throw new IllegalStateException("Operation not supported by a QueueSession");
}
- /**
- * @return
- * @throws JMSException
- */
+ @Override
public MapMessage createMapMessage() throws JMSException {
return next.createMapMessage();
}
- /**
- * @return
- * @throws JMSException
- */
+ @Override
public Message createMessage() throws JMSException {
return next.createMessage();
}
- /**
- * @return
- * @throws JMSException
- */
+ @Override
public ObjectMessage createObjectMessage() throws JMSException {
return next.createObjectMessage();
}
- /**
- * @param object
- * @return
- * @throws JMSException
- */
+ @Override
public ObjectMessage createObjectMessage(Serializable object) throws JMSException {
return next.createObjectMessage(object);
}
- /**
- * @param destination
- * @return
- * @throws JMSException
- */
+ @Override
public MessageProducer createProducer(Destination destination) throws JMSException {
if (destination instanceof Topic) {
throw new InvalidDestinationException("Topics are not supported by a QueueSession");
@@ -205,98 +143,57 @@ public class ActiveMQQueueSession implements QueueSession {
return next.createProducer(destination);
}
- /**
- * @param queueName
- * @return
- * @throws JMSException
- */
+ @Override
public Queue createQueue(String queueName) throws JMSException {
return next.createQueue(queueName);
}
- /**
- * @param queue
- * @return
- * @throws JMSException
- */
+ @Override
public QueueReceiver createReceiver(Queue queue) throws JMSException {
return next.createReceiver(queue);
}
- /**
- * @param queue
- * @param messageSelector
- * @return
- * @throws JMSException
- */
+ @Override
public QueueReceiver createReceiver(Queue queue, String messageSelector) throws JMSException {
return next.createReceiver(queue, messageSelector);
}
- /**
- * @param queue
- * @return
- * @throws JMSException
- */
+ @Override
public QueueSender createSender(Queue queue) throws JMSException {
return next.createSender(queue);
}
- /**
- * @return
- * @throws JMSException
- */
+ @Override
public StreamMessage createStreamMessage() throws JMSException {
return next.createStreamMessage();
}
- /**
- * @return
- * @throws JMSException
- */
+ @Override
public TemporaryQueue createTemporaryQueue() throws JMSException {
return next.createTemporaryQueue();
}
- /**
- * @return
- * @throws JMSException
- */
+ @Override
public TemporaryTopic createTemporaryTopic() throws JMSException {
throw new IllegalStateException("Operation not supported by a QueueSession");
}
- /**
- * @return
- * @throws JMSException
- */
+ @Override
public TextMessage createTextMessage() throws JMSException {
return next.createTextMessage();
}
- /**
- * @param text
- * @return
- * @throws JMSException
- */
+ @Override
public TextMessage createTextMessage(String text) throws JMSException {
return next.createTextMessage(text);
}
- /**
- * @param topicName
- * @return
- * @throws JMSException
- */
+ @Override
public Topic createTopic(String topicName) throws JMSException {
throw new IllegalStateException("Operation not supported by a QueueSession");
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
+ @Override
public boolean equals(Object arg0) {
if(this != arg0) {
return next.equals(arg0);
@@ -305,81 +202,52 @@ public class ActiveMQQueueSession implements QueueSession {
return true;
}
- /**
- * @return
- * @throws JMSException
- */
+ @Override
public int getAcknowledgeMode() throws JMSException {
return next.getAcknowledgeMode();
}
- /**
- * @return
- * @throws JMSException
- */
+ @Override
public MessageListener getMessageListener() throws JMSException {
return next.getMessageListener();
}
- /**
- * @return
- * @throws JMSException
- */
+ @Override
public boolean getTransacted() throws JMSException {
return next.getTransacted();
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
+ @Override
public int hashCode() {
return next.hashCode();
}
- /**
- * @throws JMSException
- */
+ @Override
public void recover() throws JMSException {
next.recover();
}
- /**
- * @throws JMSException
- */
+ @Override
public void rollback() throws JMSException {
next.rollback();
}
- /**
- *
- */
+ @Override
public void run() {
next.run();
}
- /**
- * @param listener
- * @throws JMSException
- */
+ @Override
public void setMessageListener(MessageListener listener) throws JMSException {
next.setMessageListener(listener);
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
+ @Override
public String toString() {
return next.toString();
}
- /**
- * @param name
- * @throws JMSException
- */
+ @Override
public void unsubscribe(String name) throws JMSException {
throw new IllegalStateException("Operation not supported by a QueueSession");
}
@@ -387,5 +255,4 @@ public class ActiveMQQueueSession implements QueueSession {
public QueueSession getNext() {
return next;
}
-
}
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
index b3e6ae6..5c7cc4f 100755
--- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
+++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
@@ -1552,7 +1552,7 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
* the specified queue.
*
* @param queue the <CODE>Queue</CODE> to access
- * @return
+ * @return a new QueueBrowser instance.
* @throws JMSException if the session fails to create a receiver due to
* some internal error.
* @throws JMSException
@@ -1874,14 +1874,14 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
}
/**
- * @return
+ * @return a unique ConsumerId instance.
*/
protected ConsumerId getNextConsumerId() {
return new ConsumerId(info.getSessionId(), consumerIdGenerator.getNextSequenceId());
}
/**
- * @return
+ * @return a unique ProducerId instance.
*/
protected ProducerId getNextProducerId() {
return new ProducerId(info.getSessionId(), producerIdGenerator.getNextSequenceId());
@@ -1890,11 +1890,10 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
/**
* Sends the message for dispatch by the broker.
*
- *
* @param producer - message producer.
* @param destination - message destination.
* @param message - message to be sent.
- * @param deliveryMode - JMS messsage delivery mode.
+ * @param deliveryMode - JMS message delivery mode.
* @param priority - message priority.
* @param timeToLive - message expiration.
* @param producerWindow
@@ -2066,7 +2065,7 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
}
/**
- * Send the asynchronus command.
+ * Send the asynchronous command.
*
* @param command - command to be executed.
* @throws JMSException
@@ -2076,7 +2075,7 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
}
/**
- * Send the synchronus command.
+ * Send the synchronous command.
*
* @param command - command to be executed.
* @return Response
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java b/activemq-client/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java
index a3b7419..c0434fd 100755
--- a/activemq-client/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java
+++ b/activemq-client/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java
@@ -39,12 +39,10 @@ import org.apache.activemq.command.ActiveMQTopic;
/**
* A factory of the ActiveMQ InitialContext which contains
- * {@link ConnectionFactory} instances as well as a child context called
+ * {@link javax.jms.ConnectionFactory} instances as well as a child context called
* <i>destinations</i> which contain all of the current active destinations, in
* child context depending on the QoS such as transient or durable and queue or
* topic.
- *
- *
*/
public class ActiveMQInitialContextFactory implements InitialContextFactory {
@@ -54,6 +52,7 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory {
private String queuePrefix = "queue.";
private String topicPrefix = "topic.";
+ @Override
public Context getInitialContext(Hashtable environment) throws NamingException {
// lets create a factory
Map<String, Object> data = new ConcurrentHashMap<String, Object>();
@@ -85,6 +84,7 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory {
data.put("dynamicQueues", new LazyCreateContext() {
private static final long serialVersionUID = 6503881346214855588L;
+ @Override
protected Object createEntry(String name) {
return new ActiveMQQueue(name);
}
@@ -92,6 +92,7 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory {
data.put("dynamicTopics", new LazyCreateContext() {
private static final long serialVersionUID = 2019166796234979615L;
+ @Override
protected Object createEntry(String name) {
return new ActiveMQTopic(name);
}
@@ -224,5 +225,4 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory {
public void setConnectionPrefix(String connectionPrefix) {
this.connectionPrefix = connectionPrefix;
}
-
}
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java b/activemq-client/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java
index e8643ab..e58fa4a 100644
--- a/activemq-client/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java
+++ b/activemq-client/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java
@@ -21,9 +21,8 @@ import java.util.Properties;
import javax.naming.Referenceable;
/**
- * Faciliates objects to be stored in JNDI as properties
+ * Facilitates objects to be stored in JNDI as properties
*/
-
public interface JNDIStorableInterface extends Referenceable {
/**
@@ -31,15 +30,13 @@ public interface JNDIStorableInterface extends Referenceable {
*
* @param properties
*/
-
void setProperties(Properties properties);
/**
* Get the properties from this instance for storing in JNDI
*
- * @return
+ * @return the properties that should be stored in JNDI
*/
-
Properties getProperties();
}
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/transport/TransportServer.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/TransportServer.java b/activemq-client/src/main/java/org/apache/activemq/transport/TransportServer.java
index fb25f4f..152edd1 100755
--- a/activemq-client/src/main/java/org/apache/activemq/transport/TransportServer.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/TransportServer.java
@@ -69,7 +69,8 @@ public interface TransportServer extends Service {
/**
* Some protocols allow link stealing by default (if 2 connections have the same clientID - the youngest wins).
* This is the default for AMQP and MQTT. However, JMS 1.1 spec requires the opposite
- * @return
+ *
+ * @return true if allow link stealing is enabled.
*/
boolean isAllowLinkStealing();
}
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/transport/tcp/ExceededMaximumConnectionsException.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/ExceededMaximumConnectionsException.java b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/ExceededMaximumConnectionsException.java
index f621059..78200a0 100644
--- a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/ExceededMaximumConnectionsException.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/ExceededMaximumConnectionsException.java
@@ -17,12 +17,10 @@
package org.apache.activemq.transport.tcp;
/**
- * Thrown to indicate that the {@link TcpTransportServer#maximumConnections}
- * property has been exceeded.
- *
- * @see {@link TcpTransportServer#maximumConnections}
- * @author bsnyder
+ * Thrown to indicate that the {@link TcpTransportServer#maximumConnections}
+ * property has been exceeded.
*
+ * @see TcpTransportServer#maximumConnections
*/
public class ExceededMaximumConnectionsException extends Exception {
@@ -34,5 +32,4 @@ public class ExceededMaximumConnectionsException extends Exception {
public ExceededMaximumConnectionsException(String message) {
super(message);
}
-
}
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/transport/udp/SimpleBufferPool.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/udp/SimpleBufferPool.java b/activemq-client/src/main/java/org/apache/activemq/transport/udp/SimpleBufferPool.java
index 6d93388..14f28dc 100644
--- a/activemq-client/src/main/java/org/apache/activemq/transport/udp/SimpleBufferPool.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/udp/SimpleBufferPool.java
@@ -19,10 +19,8 @@ package org.apache.activemq.transport.udp;
import java.nio.ByteBuffer;
/**
- * A simple implementation of {@link BufferPool} which does no pooling and just
+ * A simple implementation of {@link ByteBufferPool} which does no pooling and just
* creates new buffers each time
- *
- *
*/
public class SimpleBufferPool implements ByteBufferPool {
@@ -37,13 +35,16 @@ public class SimpleBufferPool implements ByteBufferPool {
this.useDirect = useDirect;
}
+ @Override
public synchronized ByteBuffer borrowBuffer() {
return createBuffer();
}
+ @Override
public void returnBuffer(ByteBuffer buffer) {
}
+ @Override
public void setDefaultSize(int defaultSize) {
this.defaultSize = defaultSize;
}
@@ -59,9 +60,11 @@ public class SimpleBufferPool implements ByteBufferPool {
this.useDirect = useDirect;
}
+ @Override
public void start() throws Exception {
}
+ @Override
public void stop() throws Exception {
}
@@ -72,5 +75,4 @@ public class SimpleBufferPool implements ByteBufferPool {
return ByteBuffer.allocate(defaultSize);
}
}
-
}
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/util/Callback.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/util/Callback.java b/activemq-client/src/main/java/org/apache/activemq/util/Callback.java
index 0d1fb49..65a9738 100755
--- a/activemq-client/src/main/java/org/apache/activemq/util/Callback.java
+++ b/activemq-client/src/main/java/org/apache/activemq/util/Callback.java
@@ -17,12 +17,8 @@
package org.apache.activemq.util;
/**
- * A simple callback object used by the
- * {@link org.apache.activemq.util.TransactionTemplate}
- * and {@link org.apache.activemq.util.ExceptionTemplate}
- objects to provide automatic transactional or exception handling blocks.
- *
- *
+ * A simple callback object used by objects to provide automatic
+ * transactional or exception handling blocks.
*/
public interface Callback {
@@ -30,6 +26,7 @@ public interface Callback {
* Executes some piece of code within a transaction
* performing a commit if there is no exception thrown
* else a rollback is performed
+ *
* @throws Exception TODO
*/
void execute() throws Exception;
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/util/StopWatch.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/util/StopWatch.java b/activemq-client/src/main/java/org/apache/activemq/util/StopWatch.java
index e330992..81d3a6c 100644
--- a/activemq-client/src/main/java/org/apache/activemq/util/StopWatch.java
+++ b/activemq-client/src/main/java/org/apache/activemq/util/StopWatch.java
@@ -20,8 +20,6 @@ package org.apache.activemq.util;
* A very simple stop watch.
* <p/>
* This implementation is not thread safe and can only time one task at any given time.
- *
- * @version
*/
public final class StopWatch {
@@ -57,7 +55,7 @@ public final class StopWatch {
/**
* Stops the stop watch
*
- * @return the time taken in millis.
+ * @return the time taken in milliseconds.
*/
public long stop() {
stop = System.currentTimeMillis();
@@ -65,9 +63,9 @@ public final class StopWatch {
}
/**
- * Returns the time taken in millis.
+ * Returns the time taken in milliseconds.
*
- * @return time in millis
+ * @return time in milliseconds
*/
public long taken() {
if (start > 0 && stop > 0) {
http://git-wip-us.apache.org/repos/asf/activemq/blob/61b2f6b4/activemq-client/src/main/java/org/apache/activemq/util/TimeUtils.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/util/TimeUtils.java b/activemq-client/src/main/java/org/apache/activemq/util/TimeUtils.java
index 41b18e3..0c0f706 100644
--- a/activemq-client/src/main/java/org/apache/activemq/util/TimeUtils.java
+++ b/activemq-client/src/main/java/org/apache/activemq/util/TimeUtils.java
@@ -22,9 +22,7 @@ import java.text.NumberFormat;
import java.util.Locale;
/**
- * Time utils.
- *
- * @version
+ * Time utilities.
*/
public final class TimeUtils {
@@ -34,7 +32,8 @@ public final class TimeUtils {
/**
* Prints the duration in a human readable format as X days Y hours Z minutes etc.
*
- * @param uptime the uptime in millis
+ * @param uptime the up-time in milliseconds
+ *
* @return the time used for displaying on screen or in logs
*/
public static String printDuration(double uptime) {
@@ -71,7 +70,7 @@ public final class TimeUtils {
if (hours != 0) {
s += " " + fmtI.format(hours) + (hours > 1 ? " hours" : " hour");
}
+
return s;
}
-
}