Author: sebb
Date: Thu Mar 31 18:19:25 2011
New Revision: 1087397

URL: http://svn.apache.org/viewvc?rev=1087397&view=rev
Log:
Some package fields can be private; add getters where necessary

Modified:
    
commons/proper/net/trunk/src/main/java/org/apache/commons/net/SocketClient.java

Modified: 
commons/proper/net/trunk/src/main/java/org/apache/commons/net/SocketClient.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/SocketClient.java?rev=1087397&r1=1087396&r2=1087397&view=diff
==============================================================================
--- 
commons/proper/net/trunk/src/main/java/org/apache/commons/net/SocketClient.java 
(original)
+++ 
commons/proper/net/trunk/src/main/java/org/apache/commons/net/SocketClient.java 
Thu Mar 31 18:19:25 2011
@@ -100,10 +100,10 @@ public abstract class SocketClient
     protected int connectTimeout = DEFAULT_CONNECT_TIMEOUT;
 
     /** Hint for SO_RCVBUF size */
-    int receiveBufferSize = -1;
+    private int receiveBufferSize = -1;
 
     /** Hint for SO_SNDBUF size */
-    int sendBufferSize = -1;
+    private int sendBufferSize = -1;
 
     /**
      * Default constructor for SocketClient.  Initializes
@@ -448,6 +448,14 @@ public abstract class SocketClient
         sendBufferSize = size;
     }
 
+    /**
+     * Get the current sendBuffer size
+     * @return the size, or -1 if not initialised
+     * @since 3.0 
+     */
+    protected int getSendBufferSize(){
+        return sendBufferSize;
+    }
 
     /**
      * Sets the underlying socket receive buffer size.
@@ -460,6 +468,14 @@ public abstract class SocketClient
         receiveBufferSize = size;
     }
 
+    /**
+     * Get the current receivedBuffer size
+     * @return the size, or -1 if not initialised
+     * @since 3.0 
+     */
+    protected int getReceiveBufferSize(){
+        return receiveBufferSize;
+    }
 
     /**
      * Returns the timeout in milliseconds of the currently opened socket.
@@ -729,7 +745,7 @@ public abstract class SocketClient
     /**
      * Create the CommandSupport instance if required
      */
-    protected final void createCommandSupport(){
+    protected void createCommandSupport(){
         __commandSupport = new ProtocolCommandSupport(this);
     }
 


Reply via email to