qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject [2/2] qpid-jms git commit: QPIDJMS-191: rename handler creation method and update the level of some log messages
Date Fri, 15 Jul 2016 17:16:41 GMT
QPIDJMS-191: rename handler creation method and update the level of some log messages


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/7596c7b7
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/7596c7b7
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/7596c7b7

Branch: refs/heads/master
Commit: 7596c7b7ffd78c41bdca45821a4c2cac0ee32eee
Parents: 0155e41
Author: Robert Gemmell <robbie@apache.org>
Authored: Fri Jul 15 18:11:27 2016 +0100
Committer: Robert Gemmell <robbie@apache.org>
Committed: Fri Jul 15 18:11:27 2016 +0100

----------------------------------------------------------------------
 .../apache/qpid/jms/transports/netty/NettyTcpTransport.java | 4 ++--
 .../apache/qpid/jms/transports/netty/NettyWsTransport.java  | 9 +++++----
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/7596c7b7/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyTcpTransport.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyTcpTransport.java
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyTcpTransport.java
index d93fdb5..43f44e8 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyTcpTransport.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyTcpTransport.java
@@ -274,7 +274,7 @@ public class NettyTcpTransport implements Transport {
 
     }
 
-    protected ChannelInboundHandlerAdapter getChannelHandler() {
+    protected ChannelInboundHandlerAdapter createChannelHandler() {
         return new NettyTcpTransportHandler();
     }
 
@@ -388,7 +388,7 @@ public class NettyTcpTransport implements Transport {
 
         addAdditionalHandlers(channel.pipeline());
 
-        channel.pipeline().addLast(getChannelHandler());
+        channel.pipeline().addLast(createChannelHandler());
     }
 
     //----- Handle connection errors -----------------------------------------//

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/7596c7b7/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyWsTransport.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyWsTransport.java
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyWsTransport.java
index 8e7a7c5..5de56e1 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyWsTransport.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyWsTransport.java
@@ -49,6 +49,7 @@ import io.netty.handler.codec.http.websocketx.WebSocketVersion;
 public class NettyWsTransport extends NettyTcpTransport {
 
     private static final Logger LOG = LoggerFactory.getLogger(NettyWsTransport.class);
+    private static final String AMQP_SUB_PROTOCOL = "amqp";
 
     /**
      * Create a new transport instance
@@ -90,7 +91,7 @@ public class NettyWsTransport extends NettyTcpTransport {
     }
 
     @Override
-    protected ChannelInboundHandlerAdapter getChannelHandler() {
+    protected ChannelInboundHandlerAdapter createChannelHandler() {
         return new NettyWebSocketTransportHandler();
     }
 
@@ -113,7 +114,7 @@ public class NettyWsTransport extends NettyTcpTransport {
 
         public NettyWebSocketTransportHandler() {
             handshaker = WebSocketClientHandshakerFactory.newHandshaker(
-                getRemoteLocation(), WebSocketVersion.V13, "amqp", true, new DefaultHttpHeaders());
+                getRemoteLocation(), WebSocketVersion.V13, AMQP_SUB_PROTOCOL, true, new DefaultHttpHeaders());
         }
 
         @Override
@@ -128,7 +129,7 @@ public class NettyWsTransport extends NettyTcpTransport {
             Channel ch = ctx.channel();
             if (!handshaker.isHandshakeComplete()) {
                 handshaker.finishHandshake(ch, (FullHttpResponse) message);
-                LOG.info("WebSocket Client connected! {}", ctx.channel());
+                LOG.trace("WebSocket Client connected! {}", ctx.channel());
                 // Now trigger super processing as we are really connected.
                 NettyWsTransport.super.handleConnected(ch);
                 return;
@@ -149,7 +150,7 @@ public class NettyWsTransport extends NettyTcpTransport {
                 ctx.fireExceptionCaught(new IOException("Received invalid frame over WebSocket."));
             } else if (frame instanceof BinaryWebSocketFrame) {
                 BinaryWebSocketFrame binaryFrame = (BinaryWebSocketFrame) frame;
-                LOG.info("WebSocket Client received data: {} bytes", binaryFrame.content().readableBytes());
+                LOG.trace("WebSocket Client received data: {} bytes", binaryFrame.content().readableBytes());
                 listener.onData(binaryFrame.content());
             } else if (frame instanceof CloseWebSocketFrame) {
                 LOG.trace("WebSocket Client received closing");


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message