Author: markt
Date: Wed Jan 6 19:43:12 2016
New Revision: 1723406
URL: http://svn.apache.org/viewvc?rev=1723406&view=rev
Log:
Javadoc fixes
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java
tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java?rev=1723406&r1=1723405&r2=1723406&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java Wed Jan 6
19:43:12 2016
@@ -44,7 +44,10 @@ public class Nio2Channel implements Asyn
}
/**
- * Reset the channel
+ * Reset the channel.
+ *
+ * @param channel The new async channel to associate with this NIO2 channel
+ * @param socket The new socket to associate with this NIO2 channel
*
* @throws IOException If a problem was encountered resetting the channel
*/
@@ -123,7 +126,8 @@ public class Nio2Channel implements Asyn
* implementation.
*
* @return Always returns zero
- * @throws IOException
+ *
+ * @throws IOException Never for non-secure channel
*/
public int handshake() throws IOException {
return 0;
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java?rev=1723406&r1=1723405&r2=1723406&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioChannel.java Wed Jan 6
19:43:12 2016
@@ -80,7 +80,8 @@ public class NioChannel implements ByteC
* @param timeout Unused. May be used when overridden
* @return Always returns <code>true</code> since there is no network
buffer
* in the regular channel
- * @throws IOException
+ *
+ * @throws IOException Never for non-secure channel
*/
public boolean flush(boolean block, Selector s, long timeout)
throws IOException {
@@ -181,7 +182,7 @@ public class NioChannel implements ByteC
* @param read Unused in non-secure implementation
* @param write Unused in non-secure implementation
* @return Always returns zero
- * @throws IOException
+ * @throws IOException Never for non-secure channel
*/
public int handshake(boolean read, boolean write) throws IOException {
return 0;
@@ -205,8 +206,11 @@ public class NioChannel implements ByteC
}
/**
- * Return true if the buffer wrote data
- * @throws IOException
+ * Return true if the buffer wrote data. NO-OP for non-secure channel.
+ *
+ * @return Always returns {@code false} for non-secure channel
+ *
+ * @throws IOException Never for non-secure channel
*/
public boolean flushOutbound() throws IOException {
return false;
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java?rev=1723406&r1=1723405&r2=1723406&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java Wed Jan
6 19:43:12 2016
@@ -605,18 +605,17 @@ public abstract class SocketWrapperBase<
public interface CompletionCheck {
/**
- * Return true if enough data has been read or written and the
- * handler should be notified. Return false if the IO is
- * incomplete (data has not been fully written while it should,
- * or more data read is needed for further processing) and should
- * be continued before the completion handler is called.
+ * Determine what call, if any, should be made to the completion
+ * handler.
*
- * @param state of the operation (done or done inline since the
+ * @param state of the operation (done or done in-line since the
* IO call is done)
* @param buffers ByteBuffer[] that has been passed to the
* original IO call
* @param offset that has been passed to the original IO call
* @param length that has been passed to the original IO call
+ *
+ * @return The call, if any, to make to the completion handler
*/
public CompletionHandlerCall callHandler(CompletionState state,
ByteBuffer[] buffers, int offset, int length);
}
@@ -653,6 +652,8 @@ public abstract class SocketWrapperBase<
/**
* Allows using NIO2 style read/write only for connectors that can
* efficiently support it.
+ *
+ * @return This default implementation always returns {@code false}
*/
public boolean hasAsyncIO() {
return false;
@@ -672,9 +673,10 @@ public abstract class SocketWrapperBase<
* ReadPendingException will be thrown; false to
* not block but any pending read operation will cause
* a ReadPendingException
- * @param timeout
- * @param unit
- * @param attachment
+ * @param timeout timeout duration for the read
+ * @param unit units for the timeout duration
+ * @param attachment an object to attach to the I/O operation that will be
+ * used when calling the completion handler
* @param check for the IO operation completion
* @param handler to call when the IO is complete
* @param dsts buffers
@@ -706,9 +708,10 @@ public abstract class SocketWrapperBase<
* ReadPendingException will be thrown; false to
* not block but any pending read operation will cause
* a ReadPendingException
- * @param timeout
- * @param unit
- * @param attachment
+ * @param timeout timeout duration for the read
+ * @param unit units for the timeout duration
+ * @param attachment an object to attach to the I/O operation that will be
+ * used when calling the completion handler
* @param check for the IO operation completion
* @param handler to call when the IO is complete
* @return the completion state (done, done inline, or still pending)
@@ -732,9 +735,10 @@ public abstract class SocketWrapperBase<
* WritePendingException will be thrown; false to
* not block but any pending write operation will cause
* a WritePendingException
- * @param timeout
- * @param unit
- * @param attachment
+ * @param timeout timeout duration for the write
+ * @param unit units for the timeout duration
+ * @param attachment an object to attach to the I/O operation that will be
+ * used when calling the completion handler
* @param check for the IO operation completion
* @param handler to call when the IO is complete
* @param srcs buffers
@@ -767,9 +771,10 @@ public abstract class SocketWrapperBase<
* WritePendingException will be thrown; false to
* not block but any pending write operation will cause
* a WritePendingException
- * @param timeout
- * @param unit
- * @param attachment
+ * @param timeout timeout duration for the write
+ * @param unit units for the timeout duration
+ * @param attachment an object to attach to the I/O operation that will be
+ * used when calling the completion handler
* @param check for the IO operation completion
* @param handler to call when the IO is complete
* @return the completion state (done, done inline, or still pending)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]