Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 459DB18362 for ; Wed, 5 Aug 2015 23:01:59 +0000 (UTC) Received: (qmail 88822 invoked by uid 500); 5 Aug 2015 23:01:59 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 88778 invoked by uid 500); 5 Aug 2015 23:01:59 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 88769 invoked by uid 99); 5 Aug 2015 23:01:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2015 23:01:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F0877E03CD; Wed, 5 Aug 2015 23:01:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tabish@apache.org To: commits@activemq.apache.org Message-Id: <5f44d59cbed74fb3977d20031e879eb8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: activemq git commit: Fix javadoc warnings. Date: Wed, 5 Aug 2015 23:01:58 +0000 (UTC) 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 Authored: Wed Aug 5 19:01:08 2015 -0400 Committer: Timothy Bish 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 timeout timeout ms to get a receipt - * + * wait up to timeout 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 options = new HashMap(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 options = new HashMap(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 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(); } } - }