Skip to content

Commit 40534da

Browse files
author
Emmanuel Lécharny
committed
Fixed some javadoc
1 parent b65468d commit 40534da

11 files changed

Lines changed: 59 additions & 15 deletions

File tree

mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* {@link IoSession}s.</strong> Users can cache the reference to the
4343
* session, which might malfunction if any filters are added or removed later.
4444
*
45-
* <h3>The Life Cycle</h3>
45+
* <h2>The Life Cycle</h2>
4646
* {@link IoFilter}s are activated only when they are inside {@link IoFilterChain}.
4747
* <p>
4848
* When you add an {@link IoFilter} to an {@link IoFilterChain}:

mina-core/src/main/java/org/apache/mina/core/future/CloseFuture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* An {@link IoFuture} for asynchronous close requests.
2424
*
25-
* <h3>Example</h3>
25+
* <h2>Example</h2>
2626
* <pre>
2727
* IoSession session = ...;
2828
* CloseFuture future = session.close(true);

mina-core/src/main/java/org/apache/mina/core/future/ConnectFuture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/**
2525
* An {@link IoFuture} for asynchronous connect requests.
2626
*
27-
* <h3>Example</h3>
27+
* <h2>Example</h2>
2828
* <pre>
2929
* IoConnector connector = ...;
3030
* ConnectFuture future = connector.connect(...);

mina-core/src/main/java/org/apache/mina/core/future/ReadFuture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/**
2525
* An {@link IoFuture} for {@link IoSession#read() asynchronous read requests}.
2626
*
27-
* <h3>Example</h3>
27+
* <h2>Example</h2>
2828
* <pre>
2929
* IoSession session = ...;
3030
*

mina-core/src/main/java/org/apache/mina/core/future/WriteFuture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* An {@link IoFuture} for asynchronous write requests.
2424
*
25-
* <h3>Example</h3>
25+
* <h2>Example</h2>
2626
* <pre>
2727
* IoSession session = ...;
2828
* WriteFuture future = session.write(...);

mina-core/src/main/java/org/apache/mina/core/session/IoSession.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@
4646
* It often contains objects that represents the state of a higher-level protocol
4747
* and becomes a way to exchange data between filters and handlers.
4848
* </p>
49-
* <h3>Adjusting Transport Type Specific Properties</h3>
49+
* <h2>Adjusting Transport Type Specific Properties</h2>
5050
* <p>
5151
* You can simply downcast the session to an appropriate subclass.
5252
* </p>
53-
* <h3>Thread Safety</h3>
53+
* <h2>Thread Safety</h2>
5454
* <p>
5555
* {@link IoSession} is thread-safe. But please note that performing
5656
* more than one {@link #write(Object)} calls at the same time will
5757
* cause the {@link IoFilter#filterWrite(IoFilter.NextFilter,IoSession,WriteRequest)}
5858
* to be executed simultaneously, and therefore you have to make sure the
5959
* {@link IoFilter} implementations you're using are thread-safe, too.
6060
* </p>
61-
* <h3>Equality of Sessions</h3>
61+
* <h2>Equality of Sessions</h2>
6262
* TODO : The getId() method is totally wrong. We can't base
6363
* a method which is designed to create a unique ID on the hashCode method.
6464
* {@link Object#equals(Object)} and {@link Object#hashCode()} shall not be overriden

mina-core/src/main/java/org/apache/mina/core/session/IoSessionConfig.java

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
2828
*/
2929
public interface IoSessionConfig {
30-
3130
/**
31+
* Get the read buffer size
32+
*
3233
* @return the size of the read buffer that I/O processor allocates
3334
* per each read. It's unusual to adjust this property because
3435
* it's often adjusted automatically by the I/O processor.
@@ -45,6 +46,8 @@ public interface IoSessionConfig {
4546
void setReadBufferSize(int readBufferSize);
4647

4748
/**
49+
* Get the minimum size of the read buffer
50+
*
4851
* @return the minimum size of the read buffer that I/O processor
4952
* allocates per each read. I/O processor will not decrease the
5053
* read buffer size to the smaller value than this property value.
@@ -61,6 +64,8 @@ public interface IoSessionConfig {
6164
void setMinReadBufferSize(int minReadBufferSize);
6265

6366
/**
67+
* Get the maximum size of the read buffer
68+
*
6469
* @return the maximum size of the read buffer that I/O processor
6570
* allocates per each read. I/O processor will not increase the
6671
* read buffer size to the greater value than this property value.
@@ -77,12 +82,16 @@ public interface IoSessionConfig {
7782
void setMaxReadBufferSize(int maxReadBufferSize);
7883

7984
/**
85+
* Get the throughput interval
86+
*
8087
* @return the interval (seconds) between each throughput calculation.
8188
* The default value is <code>3</code> seconds.
8289
*/
8390
int getThroughputCalculationInterval();
8491

8592
/**
93+
* Get the throughput interval in milliseconds
94+
*
8695
* @return the interval (milliseconds) between each throughput calculation.
8796
* The default value is <code>3</code> seconds.
8897
*/
@@ -97,6 +106,8 @@ public interface IoSessionConfig {
97106
void setThroughputCalculationInterval(int throughputCalculationInterval);
98107

99108
/**
109+
* Get the idle time
110+
*
100111
* @return idle time for the specified type of idleness in seconds.
101112
*
102113
* @param status The status for which we want the idle time (One of READER_IDLE,
@@ -105,6 +116,8 @@ public interface IoSessionConfig {
105116
int getIdleTime(IdleStatus status);
106117

107118
/**
119+
* Get the idle time in milliseconds
120+
*
108121
* @return idle time for the specified type of idleness in milliseconds.
109122
*
110123
* @param status The status for which we want the idle time (One of READER_IDLE,
@@ -121,11 +134,15 @@ public interface IoSessionConfig {
121134
void setIdleTime(IdleStatus status, int idleTime);
122135

123136
/**
137+
* Get the read idle time
138+
*
124139
* @return idle time for {@link IdleStatus#READER_IDLE} in seconds.
125140
*/
126141
int getReaderIdleTime();
127142

128143
/**
144+
* Get the read idle time in milliseconds
145+
*
129146
* @return idle time for {@link IdleStatus#READER_IDLE} in milliseconds.
130147
*/
131148
long getReaderIdleTimeInMillis();
@@ -138,11 +155,15 @@ public interface IoSessionConfig {
138155
void setReaderIdleTime(int idleTime);
139156

140157
/**
158+
* Get the write idle time
159+
*
141160
* @return idle time for {@link IdleStatus#WRITER_IDLE} in seconds.
142161
*/
143162
int getWriterIdleTime();
144163

145164
/**
165+
* Get the write idle time in milliseconds
166+
*
146167
* @return idle time for {@link IdleStatus#WRITER_IDLE} in milliseconds.
147168
*/
148169
long getWriterIdleTimeInMillis();
@@ -155,11 +176,15 @@ public interface IoSessionConfig {
155176
void setWriterIdleTime(int idleTime);
156177

157178
/**
179+
* Get the idle time for reads and writes
180+
*
158181
* @return idle time for {@link IdleStatus#BOTH_IDLE} in seconds.
159182
*/
160183
int getBothIdleTime();
161184

162185
/**
186+
* Get the idle time in milliseconds
187+
*
163188
* @return idle time for {@link IdleStatus#BOTH_IDLE} in milliseconds.
164189
*/
165190
long getBothIdleTimeInMillis();
@@ -172,11 +197,15 @@ public interface IoSessionConfig {
172197
void setBothIdleTime(int idleTime);
173198

174199
/**
200+
* Get the write timeout in seconds.
201+
*
175202
* @return write timeout in seconds.
176203
*/
177204
int getWriteTimeout();
178205

179206
/**
207+
* Get the write timeout in milliseconds.
208+
*
180209
* @return write timeout in milliseconds.
181210
*/
182211
long getWriteTimeoutInMillis();
@@ -189,6 +218,8 @@ public interface IoSessionConfig {
189218
void setWriteTimeout(int writeTimeout);
190219

191220
/**
221+
* Tell if the read operation is enabled
222+
*
192223
* @return <code>true</code> if and only if {@link IoSession#read()} operation
193224
* is enabled. If enabled, all received messages are stored in an internal
194225
* {@link BlockingQueue} so you can read received messages in more

mina-core/src/main/java/org/apache/mina/filter/executor/WriteRequestFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* new WriteRequestFilter(new IoEventQueueThrottle()));
4747
* </pre>
4848
*
49-
* <h3>Known issues</h3>
49+
* <h2>Known issues</h2>
5050
*
5151
* You can run into a dead lock if you run this filter with the blocking
5252
* {@link IoEventQueueHandler} implementation such as {@link IoEventQueueThrottle}

mina-core/src/main/java/org/apache/mina/filter/keepalive/KeepAliveFilter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* <tr>
6161
* <th>Name</th><th>Description</th><th>Implementation</th>
6262
* </tr>
63-
* <tr valign="top">
63+
* <tr>
6464
* <td>Active</td>
6565
* <td>
6666
* You want a keep-alive request is sent when the reader is idle.
@@ -75,7 +75,7 @@
7575
* return a non-<code>null</code>.
7676
* </td>
7777
* </tr>
78-
* <tr valign="top">
78+
* <tr>
7979
* <td>Semi-active</td>
8080
* <td>
8181
* You want a keep-alive request to be sent when the reader is idle.
@@ -92,7 +92,7 @@
9292
* implementation that doesn't affect the session state nor throw an exception.
9393
* </td>
9494
* </tr>
95-
* <tr valign="top">
95+
* <tr>
9696
* <td>Passive</td>
9797
* <td>
9898
* You don't want to send a keep-alive request by yourself, but the
@@ -104,7 +104,7 @@
104104
* must return a non-<code>null</code>.
105105
* </td>
106106
* </tr>
107-
* <tr valign="top">
107+
* <tr>
108108
* <td>Deaf Speaker</td>
109109
* <td>
110110
* You want a keep-alive request to be sent when the reader is idle, but
@@ -118,7 +118,7 @@
118118
* {@link KeepAliveRequestTimeoutHandler#DEAF_SPEAKER}.
119119
* </td>
120120
* </tr>
121-
* <tr valign="top">
121+
* <tr>
122122
* <td>Silent Listener</td>
123123
* <td>
124124
* You don't want to send a keep-alive request by yourself nor send any

mina-core/src/main/java/org/apache/mina/transport/socket/DatagramSessionConfig.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
*/
3232
public interface DatagramSessionConfig extends IoSessionConfig {
3333
/**
34+
* Tell if SO_BROADCAST is enabled
35+
*
3436
* @see DatagramSocket#getBroadcast()
3537
*
3638
* @return <code>true</code> if SO_BROADCAST is enabled.
@@ -45,6 +47,8 @@ public interface DatagramSessionConfig extends IoSessionConfig {
4547
void setBroadcast(boolean broadcast);
4648

4749
/**
50+
* Tells if SO_REUSEADDR is enabled
51+
*
4852
* @see DatagramSocket#getReuseAddress()
4953
*
5054
* @return <code>true</code> if SO_REUSEADDR is enabled.
@@ -59,6 +63,8 @@ public interface DatagramSessionConfig extends IoSessionConfig {
5963
void setReuseAddress(boolean reuseAddress);
6064

6165
/**
66+
* Get the size of the receive buffer
67+
*
6268
* @see DatagramSocket#getReceiveBufferSize()
6369
*
6470
* @return the size of the receive buffer
@@ -73,6 +79,8 @@ public interface DatagramSessionConfig extends IoSessionConfig {
7379
void setReceiveBufferSize(int receiveBufferSize);
7480

7581
/**
82+
* Get the size of the send buffer
83+
*
7684
* @see DatagramSocket#getSendBufferSize()
7785
*
7886
* @return the size of the send buffer
@@ -87,6 +95,8 @@ public interface DatagramSessionConfig extends IoSessionConfig {
8795
void setSendBufferSize(int sendBufferSize);
8896

8997
/**
98+
* Get the traffic class
99+
*
90100
* @see DatagramSocket#getTrafficClass()
91101
*
92102
* @return the traffic class
@@ -102,6 +112,8 @@ public interface DatagramSessionConfig extends IoSessionConfig {
102112
void setTrafficClass(int trafficClass);
103113

104114
/**
115+
* Tells if we should close if the port is unreachable
116+
*
105117
* If method returns true, it means session should be closed when a
106118
* {@link PortUnreachableException} occurs.
107119
*

0 commit comments

Comments
 (0)