Author: markt
Date: Mon Nov 27 10:33:22 2017
New Revision: 1816418

URL: http://svn.apache.org/viewvc?rev=1816418&view=rev
Log:
Getter and setter should use symmetric names

Modified:
    tomcat/trunk/java/javax/websocket/WebSocketContainer.java
    tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
    tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java

Modified: tomcat/trunk/java/javax/websocket/WebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/WebSocketContainer.java?rev=1816418&r1=1816417&r2=1816418&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/WebSocketContainer.java (original)
+++ tomcat/trunk/java/javax/websocket/WebSocketContainer.java Mon Nov 27 
10:33:22 2017
@@ -33,9 +33,20 @@ public interface WebSocketContainer {
      * Set the default timeout for sending a message asynchronously.
      * @param timeout The new default timeout in milliseconds. A non-positive
      *                value means an infinite timeout.
+     *
+     * @deprecated This will be removed in Tomcat 9.
+     *             Use {@link #setDefaultAsyncSendTimeout(long)}
      */
+    @Deprecated
     void setAsyncSendTimeout(long timeout);
 
+    /**
+     * Set the default timeout for sending a message asynchronously.
+     * @param timeout The new default timeout in milliseconds. A non-positive
+     *                value means an infinite timeout.
+     */
+    void setDefaultAsyncSendTimeout(long timeout);
+
     Session connectToServer(Object endpoint, URI path)
             throws DeploymentException, IOException;
 

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=1816418&r1=1816417&r2=1816418&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Mon 
Nov 27 10:33:22 2017
@@ -986,10 +986,22 @@ public class WsWebSocketContainer implem
      * The default value for this implementation is -1.
      */
     @Override
+    @Deprecated
     public void setAsyncSendTimeout(long timeout) {
         this.defaultAsyncTimeout = timeout;
     }
 
+
+    /**
+     * {@inheritDoc}
+     *
+     * The default value for this implementation is -1.
+     */
+    @Override
+    public void setDefaultAsyncSendTimeout(long timeout) {
+        this.defaultAsyncTimeout = timeout;
+    }
+
 
     /**
      * Cleans up the resources still in use by WebSocket sessions created from

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java?rev=1816418&r1=1816417&r2=1816418&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java 
Mon Nov 27 10:33:22 2017
@@ -325,7 +325,7 @@ public class TestWsWebSocketContainer ex
 
         // Set the async timeout
         if (setTimeoutOnContainer) {
-            wsContainer.setAsyncSendTimeout(TIMEOUT_MS);
+            wsContainer.setDefaultAsyncSendTimeout(TIMEOUT_MS);
         }
 
         tomcat.start();
@@ -606,7 +606,7 @@ public class TestWsWebSocketContainer ex
                 sc.addEndpoint(ServerEndpointConfig.Builder.create(
                         ConstantTxEndpoint.class, PATH).build());
                 if (TestWsWebSocketContainer.timeoutOnContainer) {
-                    sc.setAsyncSendTimeout(TIMEOUT_MS);
+                    sc.setDefaultAsyncSendTimeout(TIMEOUT_MS);
                 }
             } catch (DeploymentException e) {
                 throw new IllegalStateException(e);



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

Reply via email to