tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1440953 - in /tomcat/trunk/java/org/apache/tomcat/websocket: WsFrameBase.java WsFrameClient.java WsWebSocketContainer.java server/WsFrameServer.java
Date Thu, 31 Jan 2013 13:31:26 GMT
Author: markt
Date: Thu Jan 31 13:31:26 2013
New Revision: 1440953

URL: http://svn.apache.org/viewvc?rev=1440953&view=rev
Log:
More consistent names

Modified:
    tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java
    tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java
    tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
    tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java?rev=1440953&r1=1440952&r2=1440953&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java Thu Jan 31 13:31:26 2013
@@ -77,12 +77,12 @@ public abstract class WsFrameBase {
     private int readPos = 0;
     protected int writePos = 0;
 
-    public WsFrameBase(int binaryBufferSize, int textBufferSize,
+    public WsFrameBase(int binaryMerssageBufferSize, int textMessageBufferSize,
             WsSession wsSession) {
 
-        inputBuffer = new byte[binaryBufferSize];
-        messageBufferBinary = ByteBuffer.allocate(binaryBufferSize);
-        messageBufferText = CharBuffer.allocate(textBufferSize);
+        inputBuffer = new byte[binaryMerssageBufferSize];
+        messageBufferBinary = ByteBuffer.allocate(binaryMerssageBufferSize);
+        messageBufferText = CharBuffer.allocate(textMessageBufferSize);
         this.wsSession = wsSession;
     }
 

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java?rev=1440953&r1=1440952&r2=1440953&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java Thu Jan 31 13:31:26 2013
@@ -31,8 +31,9 @@ public class WsFrameClient extends WsFra
     private final CompletionHandler<Integer,Void> handler;
 
     public WsFrameClient(ByteBuffer response, AsynchronousSocketChannel channel,
-            int binaryBufferSize, int textBufferSize, WsSession wsSession) {
-        super(binaryBufferSize, textBufferSize, wsSession);
+            int binaryMessageBufferSize, int textMessageBufferSize,
+            WsSession wsSession) {
+        super(binaryMessageBufferSize, textMessageBufferSize, wsSession);
         this.response = response;
         this.channel = channel;
         this.handler = new WsFrameClientCompletionHandler();

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1440953&r1=1440952&r2=1440953&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Thu Jan 31 13:31:26
2013
@@ -52,11 +52,11 @@ public class WsWebSocketContainer implem
     private static final Random random = new Random();
     private static final Charset iso88591 = Charset.forName("ISO-8859-1");
     private static final byte[] crlf = new byte[] {13, 10};
-    private static final int defaultBufferSize = 8 * 1024;
+    private static final int DEFAULT_BUFFER_SIZE = 8 * 1024;
 
     private long defaultAsyncTimeout = -1;
-    private int binaryBufferSize = defaultBufferSize;
-    private int textBufferSize = defaultBufferSize;
+    private int maxBinaryMessageBufferSize = DEFAULT_BUFFER_SIZE;
+    private int maxTextMessageBufferSize = DEFAULT_BUFFER_SIZE;
 
     @Override
     public Session connectToServer(Class<?> annotatedEndpointClass, URI path)
@@ -125,7 +125,7 @@ public class WsWebSocketContainer implem
                 toWrite -= thisWrite.intValue();
             }
             // Same size as the WsFrame input buffer
-            response = ByteBuffer.allocate(binaryBufferSize);
+            response = ByteBuffer.allocate(maxBinaryMessageBufferSize);
 
             HandshakeResponse handshakeResponse =
                     processResponse(response, channel);
@@ -154,7 +154,8 @@ public class WsWebSocketContainer implem
         // Object creation will trigger input processing
         @SuppressWarnings("unused")
         WsFrameClient wsFrameClient = new WsFrameClient(response, channel,
-                binaryBufferSize, textBufferSize, wsSession);
+                maxBinaryMessageBufferSize, maxTextMessageBufferSize,
+                wsSession);
 
         return wsSession;
     }
@@ -363,7 +364,7 @@ public class WsWebSocketContainer implem
 
     @Override
     public long getMaxBinaryMessageBufferSize() {
-        return binaryBufferSize;
+        return maxBinaryMessageBufferSize;
     }
 
 
@@ -373,13 +374,13 @@ public class WsWebSocketContainer implem
             throw new IllegalArgumentException(
                     sm.getString("wsWebSocketContainer.maxBuffer"));
         }
-        binaryBufferSize = (int) max;
+        maxBinaryMessageBufferSize = (int) max;
     }
 
 
     @Override
     public long getMaxTextMessageBufferSize() {
-        return textBufferSize;
+        return maxTextMessageBufferSize;
     }
 
 
@@ -389,7 +390,7 @@ public class WsWebSocketContainer implem
             throw new IllegalArgumentException(
                     sm.getString("wsWebSocketContainer.maxBuffer"));
         }
-        textBufferSize = (int) max;
+        maxTextMessageBufferSize = (int) max;
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java?rev=1440953&r1=1440952&r2=1440953&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java Thu Jan 31 13:31:26
2013
@@ -30,9 +30,9 @@ public class WsFrameServer extends WsFra
     private final Object connectionReadLock = new Object();
 
 
-    public WsFrameServer(ServletInputStream sis, int binaryBufferSize,
-            int textBufferSize, WsSession wsSession) {
-        super(binaryBufferSize, textBufferSize, wsSession);
+    public WsFrameServer(ServletInputStream sis, int binaryMessageBufferSize,
+            int textMessageBufferSize, WsSession wsSession) {
+        super(binaryMessageBufferSize, textMessageBufferSize, wsSession);
         this.sis = sis;
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message