activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: Fix javadoc warnings.
Date Wed, 05 Aug 2015 23:01:58 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 61b2f6b40 -> d8c0ff141


Fix javadoc warnings. 

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/d8c0ff14
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/d8c0ff14
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/d8c0ff14

Branch: refs/heads/master
Commit: d8c0ff14177358fffa6c102a803af74044d5bc47
Parents: 61b2f6b
Author: Timothy Bish <tabish121@gmail.com>
Authored: Wed Aug 5 19:01:08 2015 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Wed Aug 5 19:01:08 2015 -0400

----------------------------------------------------------------------
 .../transport/discovery/DiscoveryTransport.java |  4 +--
 .../transport/mock/MockTransportFactory.java    |  6 +++--
 .../activemq/transport/tcp/ResponseHolder.java  | 15 +++++------
 .../transport/tcp/SslTransportFactory.java      | 10 +++++--
 .../transport/tcp/TcpTransportFactory.java      | 28 ++++++++++++--------
 .../transport/tcp/TcpTransportServer.java       |  4 ++-
 .../transport/udp/DefaultBufferPool.java        |  9 ++++---
 7 files changed, 45 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/d8c0ff14/activemq-client/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java
b/activemq-client/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java
index a10fb33..a79fc3e 100755
--- a/activemq-client/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java
@@ -32,10 +32,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * A {@link ReliableTransportChannel} which uses a {@link DiscoveryAgent} to
+ * A {@link TransportFilter} which uses a {@link DiscoveryAgent} to
  * discover remote broker instances and dynamically connect to them.
- *
- *
  */
 public class DiscoveryTransport extends TransportFilter implements DiscoveryListener {
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/d8c0ff14/activemq-client/src/main/java/org/apache/activemq/transport/mock/MockTransportFactory.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/mock/MockTransportFactory.java
b/activemq-client/src/main/java/org/apache/activemq/transport/mock/MockTransportFactory.java
index 7d8eb4f..3e147d0 100755
--- a/activemq-client/src/main/java/org/apache/activemq/transport/mock/MockTransportFactory.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/mock/MockTransportFactory.java
@@ -31,6 +31,7 @@ import org.apache.activemq.util.URISupport.CompositeData;
 
 public class MockTransportFactory extends TransportFactory {
 
+    @Override
     public Transport doConnect(URI location) throws URISyntaxException, Exception {
         Transport transport = createTransport(URISupport.parseComposite(location));
         transport = new MutexTransport(transport);
@@ -38,13 +39,14 @@ public class MockTransportFactory extends TransportFactory {
         return transport;
     }
 
+    @Override
     public Transport doCompositeConnect(URI location) throws URISyntaxException, Exception
{
         return createTransport(URISupport.parseComposite(location));
     }
 
     /**
      * @param location
-     * @return
+     * @return a new Transport instance.
      * @throws Exception
      */
     public Transport createTransport(CompositeData compositData) throws Exception {
@@ -53,8 +55,8 @@ public class MockTransportFactory extends TransportFactory {
         return transport;
     }
 
+    @Override
     public TransportServer doBind(URI location) throws IOException {
         throw new IOException("This protocol does not support being bound.");
     }
-
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/d8c0ff14/activemq-client/src/main/java/org/apache/activemq/transport/tcp/ResponseHolder.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/ResponseHolder.java
b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/ResponseHolder.java
index 6418a68..7745826 100755
--- a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/ResponseHolder.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/ResponseHolder.java
@@ -20,8 +20,6 @@ import org.apache.activemq.command.Response;
 
 /**
  * ResponseHolder utility
- * 
- * 
  */
 public class ResponseHolder {
     protected Response response;
@@ -36,8 +34,9 @@ public class ResponseHolder {
 
     /**
      * Set the Response for this holder
-     * 
-     * @param r
+     *
+     * @param response
+     *      the response returned from the remote peer.
      */
     public void setResponse(Response r) {
         synchronized (lock) {
@@ -49,7 +48,7 @@ public class ResponseHolder {
 
     /**
      * Get the Response
-     * 
+     *
      * @return the Response or null if it is closed
      */
     public Response getResponse() {
@@ -57,10 +56,10 @@ public class ResponseHolder {
     }
 
     /**
-     * wait upto <Code>timeout</Code> timeout ms to get a receipt
-     * 
+     * wait up to <Code>timeout</Code> timeout milliseconds to get a receipt
+     *
      * @param timeout
-     * @return
+     * @return the Response that was set or null if none set yet.
      */
     public Response getResponse(int timeout) {
         synchronized (lock) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/d8c0ff14/activemq-client/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
index ec27b7b..e695fa8 100644
--- a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
@@ -45,11 +45,13 @@ import org.slf4j.LoggerFactory;
  * factory will have their needClientAuth option set to false.
  */
 public class SslTransportFactory extends TcpTransportFactory {
+
     private static final Logger LOG = LoggerFactory.getLogger(SslTransportFactory.class);
 
     /**
      * Overriding to use SslTransportServer and allow for proper reflection.
      */
+    @Override
     public TransportServer doBind(final URI location) throws IOException {
         try {
             Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
@@ -74,7 +76,7 @@ public class SslTransportFactory extends TcpTransportFactory {
      *
      * @param location
      * @param serverSocketFactory
-     * @return
+     * @return a new SslTransportServer initialized from the given location and socket factory.
      * @throws IOException
      * @throws URISyntaxException
      */
@@ -86,9 +88,10 @@ public class SslTransportFactory extends TcpTransportFactory {
      * Overriding to allow for proper configuration through reflection but delegate to get
common
      * configuration
      */
+    @Override
     @SuppressWarnings("rawtypes")
     public Transport compositeConfigure(Transport transport, WireFormat format, Map options)
{
-        SslTransport sslTransport = (SslTransport)transport.narrow(SslTransport.class);
+        SslTransport sslTransport = transport.narrow(SslTransport.class);
         IntrospectionSupport.setProperties(sslTransport, options);
 
         return super.compositeConfigure(transport, format, options);
@@ -97,6 +100,7 @@ public class SslTransportFactory extends TcpTransportFactory {
     /**
      * Overriding to use SslTransports.
      */
+    @Override
     protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException,
IOException {
         URI localLocation = null;
         String path = location.getPath();
@@ -122,6 +126,7 @@ public class SslTransportFactory extends TcpTransportFactory {
      * @return Newly created (Ssl)ServerSocketFactory.
      * @throws IOException
      */
+    @Override
     protected ServerSocketFactory createServerSocketFactory() throws IOException {
         if( SslContext.getCurrentSslContext()!=null ) {
             SslContext ctx = SslContext.getCurrentSslContext();
@@ -142,6 +147,7 @@ public class SslTransportFactory extends TcpTransportFactory {
      * @return Newly created (Ssl)SocketFactory.
      * @throws IOException
      */
+    @Override
     protected SocketFactory createSocketFactory() throws IOException {
         if( SslContext.getCurrentSslContext()!=null ) {
             SslContext ctx = SslContext.getCurrentSslContext();

http://git-wip-us.apache.org/repos/asf/activemq/blob/d8c0ff14/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
index 9dc50f9..3d2fa44 100755
--- a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
@@ -28,7 +28,11 @@ import javax.net.SocketFactory;
 
 import org.apache.activemq.TransportLoggerSupport;
 import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.*;
+import org.apache.activemq.transport.InactivityMonitor;
+import org.apache.activemq.transport.Transport;
+import org.apache.activemq.transport.TransportFactory;
+import org.apache.activemq.transport.TransportServer;
+import org.apache.activemq.transport.WireFormatNegotiator;
 import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.activemq.util.IntrospectionSupport;
 import org.apache.activemq.util.URISupport;
@@ -36,13 +40,11 @@ import org.apache.activemq.wireformat.WireFormat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement
modifications)
- *
- */
 public class TcpTransportFactory extends TransportFactory {
+
     private static final Logger LOG = LoggerFactory.getLogger(TcpTransportFactory.class);
 
+    @Override
     public TransportServer doBind(final URI location) throws IOException {
         try {
             Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
@@ -67,7 +69,7 @@ public class TcpTransportFactory extends TransportFactory {
      *
      * @param location
      * @param serverSocketFactory
-     * @return
+     * @return a new TcpTransportServer instance.
      * @throws IOException
      * @throws URISyntaxException
      */
@@ -75,10 +77,11 @@ public class TcpTransportFactory extends TransportFactory {
         return new TcpTransportServer(this, location, serverSocketFactory);
     }
 
+    @Override
     @SuppressWarnings("rawtypes")
     public Transport compositeConfigure(Transport transport, WireFormat format, Map options)
{
 
-        TcpTransport tcpTransport = (TcpTransport)transport.narrow(TcpTransport.class);
+        TcpTransport tcpTransport = transport.narrow(TcpTransport.class);
         IntrospectionSupport.setProperties(tcpTransport, options);
 
         Map<String, Object> socketOptions = IntrospectionSupport.extractProperties(options,
"socket.");
@@ -108,12 +111,13 @@ public class TcpTransportFactory extends TransportFactory {
 
 
     /**
-     * Returns true if the inactivity monitor should be used on the transport
+     * @return true if the inactivity monitor should be used on the transport
      */
     protected boolean isUseInactivityMonitor(Transport transport) {
         return true;
     }
 
+    @Override
     protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException,
IOException {
         URI localLocation = null;
         String path = location.getPath();
@@ -137,13 +141,15 @@ public class TcpTransportFactory extends TransportFactory {
 
     /**
      * Allows subclasses of TcpTransportFactory to provide a create custom
-     * TcpTransport intances.
+     * TcpTransport instances.
      *
-     * @param location
      * @param wf
      * @param socketFactory
+     * @param location
      * @param localLocation
-     * @return
+     *
+     * @return a new TcpTransport instance connected to the given location.
+     *
      * @throws UnknownHostException
      * @throws IOException
      */

http://git-wip-us.apache.org/repos/asf/activemq/blob/d8c0ff14/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
index b44a462..a0778cd 100755
--- a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
@@ -378,7 +378,9 @@ public class TcpTransportServer extends TransportServerThreadSupport implements
      *
      * @param socket
      * @param format
-     * @return
+     *
+     * @return a new Transport instance.
+     *
      * @throws IOException
      */
     protected Transport createTransport(Socket socket, WireFormat format) throws IOException
{

http://git-wip-us.apache.org/repos/asf/activemq/blob/d8c0ff14/activemq-client/src/main/java/org/apache/activemq/transport/udp/DefaultBufferPool.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/udp/DefaultBufferPool.java
b/activemq-client/src/main/java/org/apache/activemq/transport/udp/DefaultBufferPool.java
index 4713535..f4f6864 100644
--- a/activemq-client/src/main/java/org/apache/activemq/transport/udp/DefaultBufferPool.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/udp/DefaultBufferPool.java
@@ -21,10 +21,8 @@ import java.util.ArrayList;
 import java.util.List;
 
 /**
- * A default implementation of {@link BufferPool} which keeps a pool of direct
+ * A default implementation of {@link SimpleBufferPool} which keeps a pool of direct
  * byte buffers.
- * 
- * 
  */
 public class DefaultBufferPool extends SimpleBufferPool implements ByteBufferPool {
 
@@ -39,6 +37,7 @@ public class DefaultBufferPool extends SimpleBufferPool implements ByteBufferPoo
         super(useDirect);
     }
 
+    @Override
     public synchronized ByteBuffer borrowBuffer() {
         synchronized (lock) {
             int size = buffers.size();
@@ -49,15 +48,18 @@ public class DefaultBufferPool extends SimpleBufferPool implements ByteBufferPoo
         return createBuffer();
     }
 
+    @Override
     public void returnBuffer(ByteBuffer buffer) {
         synchronized (lock) {
             buffers.add(buffer);
         }
     }
 
+    @Override
     public void start() throws Exception {
     }
 
+    @Override
     public void stop() throws Exception {
         synchronized (lock) {
             /*
@@ -67,5 +69,4 @@ public class DefaultBufferPool extends SimpleBufferPool implements ByteBufferPoo
             buffers.clear();
         }
     }
-
 }


Mime
View raw message