This is an automated email from the ASF dual-hosted git repository.
elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git
The following commit(s) were added to refs/heads/2.2.X by this push:
new 40534dab2 Fixed some javadoc
40534dab2 is described below
commit 40534dab29064f5f6314f18054a2669de2e056f2
Author: Emmanuel Lécharny <[email protected]>
AuthorDate: Fri Nov 21 10:17:55 2025 +0100
Fixed some javadoc
---
.../org/apache/mina/core/filterchain/IoFilter.java | 2 +-
.../org/apache/mina/core/future/CloseFuture.java | 2 +-
.../org/apache/mina/core/future/ConnectFuture.java | 2 +-
.../org/apache/mina/core/future/ReadFuture.java | 2 +-
.../org/apache/mina/core/future/WriteFuture.java | 2 +-
.../org/apache/mina/core/session/IoSession.java | 6 ++--
.../apache/mina/core/session/IoSessionConfig.java | 33 +++++++++++++++++++++-
.../mina/filter/executor/WriteRequestFilter.java | 2 +-
.../mina/filter/keepalive/KeepAliveFilter.java | 10 +++----
.../transport/socket/DatagramSessionConfig.java | 12 ++++++++
.../mina/transport/socket/nio/NioProcessor.java | 1 +
11 files changed, 59 insertions(+), 15 deletions(-)
diff --git
a/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java
b/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java
index 98486365d..64f6892b9 100644
--- a/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java
+++ b/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java
@@ -42,7 +42,7 @@ import org.apache.mina.filter.util.ReferenceCountingFilter;
* {@link IoSession}s.</strong> Users can cache the reference to the
* session, which might malfunction if any filters are added or removed later.
*
- * <h3>The Life Cycle</h3>
+ * <h2>The Life Cycle</h2>
* {@link IoFilter}s are activated only when they are inside {@link
IoFilterChain}.
* <p>
* When you add an {@link IoFilter} to an {@link IoFilterChain}:
diff --git
a/mina-core/src/main/java/org/apache/mina/core/future/CloseFuture.java
b/mina-core/src/main/java/org/apache/mina/core/future/CloseFuture.java
index 9b5798424..4ba60e538 100644
--- a/mina-core/src/main/java/org/apache/mina/core/future/CloseFuture.java
+++ b/mina-core/src/main/java/org/apache/mina/core/future/CloseFuture.java
@@ -22,7 +22,7 @@ package org.apache.mina.core.future;
/**
* An {@link IoFuture} for asynchronous close requests.
*
- * <h3>Example</h3>
+ * <h2>Example</h2>
* <pre>
* IoSession session = ...;
* CloseFuture future = session.close(true);
diff --git
a/mina-core/src/main/java/org/apache/mina/core/future/ConnectFuture.java
b/mina-core/src/main/java/org/apache/mina/core/future/ConnectFuture.java
index c01799b58..83b2e299c 100644
--- a/mina-core/src/main/java/org/apache/mina/core/future/ConnectFuture.java
+++ b/mina-core/src/main/java/org/apache/mina/core/future/ConnectFuture.java
@@ -24,7 +24,7 @@ import org.apache.mina.core.session.IoSession;
/**
* An {@link IoFuture} for asynchronous connect requests.
*
- * <h3>Example</h3>
+ * <h2>Example</h2>
* <pre>
* IoConnector connector = ...;
* ConnectFuture future = connector.connect(...);
diff --git
a/mina-core/src/main/java/org/apache/mina/core/future/ReadFuture.java
b/mina-core/src/main/java/org/apache/mina/core/future/ReadFuture.java
index 6a6e008eb..b1ededa08 100644
--- a/mina-core/src/main/java/org/apache/mina/core/future/ReadFuture.java
+++ b/mina-core/src/main/java/org/apache/mina/core/future/ReadFuture.java
@@ -24,7 +24,7 @@ import org.apache.mina.core.session.IoSession;
/**
* An {@link IoFuture} for {@link IoSession#read() asynchronous read
requests}.
*
- * <h3>Example</h3>
+ * <h2>Example</h2>
* <pre>
* IoSession session = ...;
*
diff --git
a/mina-core/src/main/java/org/apache/mina/core/future/WriteFuture.java
b/mina-core/src/main/java/org/apache/mina/core/future/WriteFuture.java
index 5ec3b77fe..58777c5b2 100644
--- a/mina-core/src/main/java/org/apache/mina/core/future/WriteFuture.java
+++ b/mina-core/src/main/java/org/apache/mina/core/future/WriteFuture.java
@@ -22,7 +22,7 @@ package org.apache.mina.core.future;
/**
* An {@link IoFuture} for asynchronous write requests.
*
- * <h3>Example</h3>
+ * <h2>Example</h2>
* <pre>
* IoSession session = ...;
* WriteFuture future = session.write(...);
diff --git
a/mina-core/src/main/java/org/apache/mina/core/session/IoSession.java
b/mina-core/src/main/java/org/apache/mina/core/session/IoSession.java
index 0f438e7b8..42c375e57 100644
--- a/mina-core/src/main/java/org/apache/mina/core/session/IoSession.java
+++ b/mina-core/src/main/java/org/apache/mina/core/session/IoSession.java
@@ -46,11 +46,11 @@ import org.apache.mina.core.write.WriteRequestQueue;
* It often contains objects that represents the state of a higher-level
protocol
* and becomes a way to exchange data between filters and handlers.
* </p>
- * <h3>Adjusting Transport Type Specific Properties</h3>
+ * <h2>Adjusting Transport Type Specific Properties</h2>
* <p>
* You can simply downcast the session to an appropriate subclass.
* </p>
- * <h3>Thread Safety</h3>
+ * <h2>Thread Safety</h2>
* <p>
* {@link IoSession} is thread-safe. But please note that performing
* more than one {@link #write(Object)} calls at the same time will
@@ -58,7 +58,7 @@ import org.apache.mina.core.write.WriteRequestQueue;
* to be executed simultaneously, and therefore you have to make sure the
* {@link IoFilter} implementations you're using are thread-safe, too.
* </p>
- * <h3>Equality of Sessions</h3>
+ * <h2>Equality of Sessions</h2>
* TODO : The getId() method is totally wrong. We can't base
* a method which is designed to create a unique ID on the hashCode method.
* {@link Object#equals(Object)} and {@link Object#hashCode()} shall not be
overriden
diff --git
a/mina-core/src/main/java/org/apache/mina/core/session/IoSessionConfig.java
b/mina-core/src/main/java/org/apache/mina/core/session/IoSessionConfig.java
index 4675b7ff6..07e6546d6 100644
--- a/mina-core/src/main/java/org/apache/mina/core/session/IoSessionConfig.java
+++ b/mina-core/src/main/java/org/apache/mina/core/session/IoSessionConfig.java
@@ -27,8 +27,9 @@ import java.util.concurrent.BlockingQueue;
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*/
public interface IoSessionConfig {
-
/**
+ * Get the read buffer size
+ *
* @return the size of the read buffer that I/O processor allocates
* per each read. It's unusual to adjust this property because
* it's often adjusted automatically by the I/O processor.
@@ -45,6 +46,8 @@ public interface IoSessionConfig {
void setReadBufferSize(int readBufferSize);
/**
+ * Get the minimum size of the read buffer
+ *
* @return the minimum size of the read buffer that I/O processor
* allocates per each read. I/O processor will not decrease the
* read buffer size to the smaller value than this property value.
@@ -61,6 +64,8 @@ public interface IoSessionConfig {
void setMinReadBufferSize(int minReadBufferSize);
/**
+ * Get the maximum size of the read buffer
+ *
* @return the maximum size of the read buffer that I/O processor
* allocates per each read. I/O processor will not increase the
* read buffer size to the greater value than this property value.
@@ -77,12 +82,16 @@ public interface IoSessionConfig {
void setMaxReadBufferSize(int maxReadBufferSize);
/**
+ * Get the throughput interval
+ *
* @return the interval (seconds) between each throughput calculation.
* The default value is <code>3</code> seconds.
*/
int getThroughputCalculationInterval();
/**
+ * Get the throughput interval in milliseconds
+ *
* @return the interval (milliseconds) between each throughput calculation.
* The default value is <code>3</code> seconds.
*/
@@ -97,6 +106,8 @@ public interface IoSessionConfig {
void setThroughputCalculationInterval(int throughputCalculationInterval);
/**
+ * Get the idle time
+ *
* @return idle time for the specified type of idleness in seconds.
*
* @param status The status for which we want the idle time (One of
READER_IDLE,
@@ -105,6 +116,8 @@ public interface IoSessionConfig {
int getIdleTime(IdleStatus status);
/**
+ * Get the idle time in milliseconds
+ *
* @return idle time for the specified type of idleness in milliseconds.
*
* @param status The status for which we want the idle time (One of
READER_IDLE,
@@ -121,11 +134,15 @@ public interface IoSessionConfig {
void setIdleTime(IdleStatus status, int idleTime);
/**
+ * Get the read idle time
+ *
* @return idle time for {@link IdleStatus#READER_IDLE} in seconds.
*/
int getReaderIdleTime();
/**
+ * Get the read idle time in milliseconds
+ *
* @return idle time for {@link IdleStatus#READER_IDLE} in milliseconds.
*/
long getReaderIdleTimeInMillis();
@@ -138,11 +155,15 @@ public interface IoSessionConfig {
void setReaderIdleTime(int idleTime);
/**
+ * Get the write idle time
+ *
* @return idle time for {@link IdleStatus#WRITER_IDLE} in seconds.
*/
int getWriterIdleTime();
/**
+ * Get the write idle time in milliseconds
+ *
* @return idle time for {@link IdleStatus#WRITER_IDLE} in milliseconds.
*/
long getWriterIdleTimeInMillis();
@@ -155,11 +176,15 @@ public interface IoSessionConfig {
void setWriterIdleTime(int idleTime);
/**
+ * Get the idle time for reads and writes
+ *
* @return idle time for {@link IdleStatus#BOTH_IDLE} in seconds.
*/
int getBothIdleTime();
/**
+ * Get the idle time in milliseconds
+ *
* @return idle time for {@link IdleStatus#BOTH_IDLE} in milliseconds.
*/
long getBothIdleTimeInMillis();
@@ -172,11 +197,15 @@ public interface IoSessionConfig {
void setBothIdleTime(int idleTime);
/**
+ * Get the write timeout in seconds.
+ *
* @return write timeout in seconds.
*/
int getWriteTimeout();
/**
+ * Get the write timeout in milliseconds.
+ *
* @return write timeout in milliseconds.
*/
long getWriteTimeoutInMillis();
@@ -189,6 +218,8 @@ public interface IoSessionConfig {
void setWriteTimeout(int writeTimeout);
/**
+ * Tell if the read operation is enabled
+ *
* @return <code>true</code> if and only if {@link IoSession#read()}
operation
* is enabled. If enabled, all received messages are stored in an internal
* {@link BlockingQueue} so you can read received messages in more
diff --git
a/mina-core/src/main/java/org/apache/mina/filter/executor/WriteRequestFilter.java
b/mina-core/src/main/java/org/apache/mina/filter/executor/WriteRequestFilter.java
index 2cf3cedc3..df8980245 100644
---
a/mina-core/src/main/java/org/apache/mina/filter/executor/WriteRequestFilter.java
+++
b/mina-core/src/main/java/org/apache/mina/filter/executor/WriteRequestFilter.java
@@ -46,7 +46,7 @@ import org.apache.mina.core.write.WriteRequest;
* new WriteRequestFilter(new IoEventQueueThrottle()));
* </pre>
*
- * <h3>Known issues</h3>
+ * <h2>Known issues</h2>
*
* You can run into a dead lock if you run this filter with the blocking
* {@link IoEventQueueHandler} implementation such as {@link
IoEventQueueThrottle}
diff --git
a/mina-core/src/main/java/org/apache/mina/filter/keepalive/KeepAliveFilter.java
b/mina-core/src/main/java/org/apache/mina/filter/keepalive/KeepAliveFilter.java
index d3d4f9733..647918465 100644
---
a/mina-core/src/main/java/org/apache/mina/filter/keepalive/KeepAliveFilter.java
+++
b/mina-core/src/main/java/org/apache/mina/filter/keepalive/KeepAliveFilter.java
@@ -60,7 +60,7 @@ import org.apache.mina.core.write.WriteRequest;
* <tr>
* <th>Name</th><th>Description</th><th>Implementation</th>
* </tr>
- * <tr valign="top">
+ * <tr>
* <td>Active</td>
* <td>
* You want a keep-alive request is sent when the reader is idle.
@@ -75,7 +75,7 @@ import org.apache.mina.core.write.WriteRequest;
* return a non-<code>null</code>.
* </td>
* </tr>
- * <tr valign="top">
+ * <tr>
* <td>Semi-active</td>
* <td>
* You want a keep-alive request to be sent when the reader is idle.
@@ -92,7 +92,7 @@ import org.apache.mina.core.write.WriteRequest;
* implementation that doesn't affect the session state nor throw an
exception.
* </td>
* </tr>
- * <tr valign="top">
+ * <tr>
* <td>Passive</td>
* <td>
* You don't want to send a keep-alive request by yourself, but the
@@ -104,7 +104,7 @@ import org.apache.mina.core.write.WriteRequest;
* must return a non-<code>null</code>.
* </td>
* </tr>
- * <tr valign="top">
+ * <tr>
* <td>Deaf Speaker</td>
* <td>
* You want a keep-alive request to be sent when the reader is idle, but
@@ -118,7 +118,7 @@ import org.apache.mina.core.write.WriteRequest;
* {@link KeepAliveRequestTimeoutHandler#DEAF_SPEAKER}.
* </td>
* </tr>
- * <tr valign="top">
+ * <tr>
* <td>Silent Listener</td>
* <td>
* You don't want to send a keep-alive request by yourself nor send any
diff --git
a/mina-core/src/main/java/org/apache/mina/transport/socket/DatagramSessionConfig.java
b/mina-core/src/main/java/org/apache/mina/transport/socket/DatagramSessionConfig.java
index 651262353..489264492 100644
---
a/mina-core/src/main/java/org/apache/mina/transport/socket/DatagramSessionConfig.java
+++
b/mina-core/src/main/java/org/apache/mina/transport/socket/DatagramSessionConfig.java
@@ -31,6 +31,8 @@ import org.apache.mina.core.session.IoSessionConfig;
*/
public interface DatagramSessionConfig extends IoSessionConfig {
/**
+ * Tell if SO_BROADCAST is enabled
+ *
* @see DatagramSocket#getBroadcast()
*
* @return <code>true</code> if SO_BROADCAST is enabled.
@@ -45,6 +47,8 @@ public interface DatagramSessionConfig extends
IoSessionConfig {
void setBroadcast(boolean broadcast);
/**
+ * Tells if SO_REUSEADDR is enabled
+ *
* @see DatagramSocket#getReuseAddress()
*
* @return <code>true</code> if SO_REUSEADDR is enabled.
@@ -59,6 +63,8 @@ public interface DatagramSessionConfig extends
IoSessionConfig {
void setReuseAddress(boolean reuseAddress);
/**
+ * Get the size of the receive buffer
+ *
* @see DatagramSocket#getReceiveBufferSize()
*
* @return the size of the receive buffer
@@ -73,6 +79,8 @@ public interface DatagramSessionConfig extends
IoSessionConfig {
void setReceiveBufferSize(int receiveBufferSize);
/**
+ * Get the size of the send buffer
+ *
* @see DatagramSocket#getSendBufferSize()
*
* @return the size of the send buffer
@@ -87,6 +95,8 @@ public interface DatagramSessionConfig extends
IoSessionConfig {
void setSendBufferSize(int sendBufferSize);
/**
+ * Get the traffic class
+ *
* @see DatagramSocket#getTrafficClass()
*
* @return the traffic class
@@ -102,6 +112,8 @@ public interface DatagramSessionConfig extends
IoSessionConfig {
void setTrafficClass(int trafficClass);
/**
+ * Tells if we should close if the port is unreachable
+ *
* If method returns true, it means session should be closed when a
* {@link PortUnreachableException} occurs.
*
diff --git
a/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioProcessor.java
b/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioProcessor.java
index 4678721f2..5baa7efe5 100644
---
a/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioProcessor.java
+++
b/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioProcessor.java
@@ -433,6 +433,7 @@ public class NioProcessor extends
AbstractPollingIoProcessor<NioSession> {
/**
* An encapsulating iterator around the {@link Selector#selectedKeys()} or
* the {@link Selector#keys()} iterator;
+ * @param <NioSession> The IoSession it iterates
*/
protected static class IoSessionIterator<NioSession> implements
Iterator<NioSession> {
private final Iterator<SelectionKey> iterator;