37
37
38
38
/**
39
39
* This class acts as Synchronous Event De-multiplexer and Initiation Dispatcher of Reactor pattern.
40
- * Multiple handles i.e. {@link AbstractNioChannel}s can be registered to the reactor and it blocks
40
+ * Multiple handles i.e. {@link AbstractNioChannel}s can be registered to the reactor, and it blocks
41
41
* for events from all these handles. Whenever an event occurs on any of the registered handles, it
42
42
* synchronously de-multiplexes the event which can be any of read, write or accept, and dispatches
43
43
* the event to the appropriate {@link ChannelHandler} using the {@link Dispatcher}.
46
46
* #start()} method. {@link NioReactor} uses {@link Selector} for realizing Synchronous Event
47
47
* De-multiplexing.
48
48
*
49
- * <p>NOTE: This is one of the ways to implement NIO reactor and it does not take care of all
49
+ * <p>NOTE: This is one of the ways to implement NIO reactor, and it does not take care of all
50
50
* possible edge cases which are required in a real application. This implementation is meant to
51
51
* demonstrate the fundamental concepts that lie behind Reactor pattern.
52
52
*/
@@ -212,7 +212,7 @@ private void onChannelAcceptable(SelectionKey key) throws IOException {
212
212
213
213
/**
214
214
* Queues the change of operations request of a channel, which will change the interested
215
- * operations of the channel sometime in future.
215
+ * operations of the channel sometime in the future.
216
216
*
217
217
* <p>This is a non-blocking method and does not guarantee that the operations have changed when
218
218
* this method returns.
@@ -228,7 +228,7 @@ public void changeOps(SelectionKey key, int interestedOps) {
228
228
/**
229
229
* A command that changes the interested operations of the key provided.
230
230
*/
231
- class ChangeKeyOpsCommand implements Runnable {
231
+ static class ChangeKeyOpsCommand implements Runnable {
232
232
private final SelectionKey key ;
233
233
private final int interestedOps ;
234
234
0 commit comments