Fixed grammar, typo, and brevity in Javadoc comments

This commit is contained in:
Trustin Lee 2008-09-24 09:48:32 +00:00
parent ec06cbf57a
commit 6a759f0c63
25 changed files with 144 additions and 129 deletions

View File

@ -48,7 +48,7 @@ import org.jboss.netty.channel.ExceptionEvent;
import org.jboss.netty.channel.SimpleChannelHandler;
/**
* A helper class which creates a new server-side {@link Channel} and accept
* A helper class which creates a new server-side {@link Channel} and accepts
* incoming connections.
*
* <h3>Parent channel and its children</h3>
@ -175,7 +175,7 @@ public class ServerBootstrap extends Bootstrap {
}
/**
* Creates a new channel which is bound to the local address which were
* Creates a new channel which is bound to the local address which was
* specified in the current {@code "localAddress"} option. This method is
* similar to the following code:
*

View File

@ -538,7 +538,7 @@ public abstract class AbstractChannelBuffer implements ChannelBuffer {
}
/**
* Throws an {@link IndexOutOfBoundsException} is the current
* Throws an {@link IndexOutOfBoundsException} if the current
* {@linkplain #readableBytes() readable bytes} of this buffer is less
* than the specified value.
*/

View File

@ -419,7 +419,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
byte getByte(int index);
/**
* Gets a unsigned byte at the specified absolute {@code index} in this
* Gets an unsigned byte at the specified absolute {@code index} in this
* buffer.
*
* @throws IndexOutOfBoundsException
@ -439,7 +439,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
short getShort(int index);
/**
* Gets a unsigned 16-bit short integer at the specified absolute
* Gets an unsigned 16-bit short integer at the specified absolute
* {@code index} in this buffer.
*
* @throws IndexOutOfBoundsException
@ -459,7 +459,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
int getMedium(int index);
/**
* Gets a unsigned 24-bit medium integer at the specified absolute
* Gets an unsigned 24-bit medium integer at the specified absolute
* {@code index} in this buffer.
*
* @throws IndexOutOfBoundsException
@ -479,7 +479,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
int getInt(int index);
/**
* Gets a unsigned 32-bit integer at the specified absolute {@code index}
* Gets an unsigned 32-bit integer at the specified absolute {@code index}
* in this buffer.
*
* @throws IndexOutOfBoundsException
@ -501,7 +501,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
/**
* Transfers this buffer's data to the specified destination starting at
* the specified absolute {@code index} until the destination becomes
* unwritable. This method is basically same with
* non-writable. This method is basically same with
* {@link #getBytes(int, ChannelBuffer, int, int)}, except that this
* method increases the {@code writerIndex} of the destination by the
* number of the transferred bytes while
@ -580,7 +580,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
/**
* Transfers this buffer's data to the specified destination starting at
* the specified absolute {@code index} until the destination's position
* reaches to its limit.
* reaches its limit.
*
* @throws IndexOutOfBoundsException
* if the specified {@code index} is less than {@code 0} or
@ -750,7 +750,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
/**
* Transfers the specified source buffer's data to this buffer starting at
* the specified absolute {@code index} until the source buffer's position
* reaches to its limit.
* reaches its limit.
*
* @throws IndexOutOfBoundsException
* if the specified {@code index} is less than {@code 0} or
@ -815,7 +815,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
byte readByte();
/**
* Gets a unsigned byte at the current {@code readerIndex} and increases
* Gets an unsigned byte at the current {@code readerIndex} and increases
* the {@code readerIndex} by {@code 1} in this buffer.
*
* @throws IndexOutOfBoundsException
@ -833,7 +833,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
short readShort();
/**
* Gets a unsigned 16-bit short integer at the current {@code readerIndex}
* Gets an unsigned 16-bit short integer at the current {@code readerIndex}
* and increases the {@code readerIndex} by {@code 2} in this buffer.
*
* @throws IndexOutOfBoundsException
@ -851,7 +851,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
int readMedium();
/**
* Gets a unsigned 24-bit medium integer at the current {@code readerIndex}
* Gets an unsigned 24-bit medium integer at the current {@code readerIndex}
* and increases the {@code readerIndex} by {@code 3} in this buffer.
*
* @throws IndexOutOfBoundsException
@ -869,7 +869,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
int readInt();
/**
* Gets a unsigned 32-bit integer at the current {@code readerIndex}
* Gets an unsigned 32-bit integer at the current {@code readerIndex}
* and increases the {@code readerIndex} by {@code 4} in this buffer.
*
* @throws IndexOutOfBoundsException
@ -950,7 +950,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
/**
* Transfers this buffer's data to the specified destination starting at
* the current {@code readerIndex} until the destination becomes
* unwritable, and increases the {@code readerIndex} by the number of the
* non-writable, and increases the {@code readerIndex} by the number of the
* transferred bytes. This method is basically same with
* {@link #readBytes(ChannelBuffer, int, int)}, except that this method
* increases the {@code writerIndex} of the destination by the number of
@ -1022,7 +1022,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
/**
* Transfers this buffer's data to the specified destination starting at
* the current {@code readerIndex} until the destination's position
* reaches to its limit, and increases the {@code readerIndex} by the
* reaches its limit, and increases the {@code readerIndex} by the
* number of the transferred bytes.
*
* @throws IndexOutOfBoundsException
@ -1206,7 +1206,7 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
/**
* Transfers the specified source buffer's data to this buffer starting at
* the current {@code writerIndex} until the source buffer's position
* reaches to its limit, and increases the {@code writerIndex} by the
* reaches its limit, and increases the {@code writerIndex} by the
* number of the transferred bytes.
*
* @throws IndexOutOfBoundsException

View File

@ -98,7 +98,7 @@ public abstract class AbstractChannel implements Channel, Comparable<Channel> {
}
/**
* Returns the {@link FailedChannelFuture} whose cause is a
* Returns the {@link FailedChannelFuture} whose cause is an
* {@link UnsupportedOperationException}.
*/
protected ChannelFuture getUnsupportedOperationFuture() {
@ -115,8 +115,8 @@ public abstract class AbstractChannel implements Channel, Comparable<Channel> {
}
/**
* Returns if and only if the specified object is identical with this
* channel (i.e. {@code this == o}).
* Returns {@code true} if and only if the specified object is identical
* with this channel (i.e: {@code this == o}).
*/
@Override
public final boolean equals(Object o) {
@ -124,7 +124,7 @@ public abstract class AbstractChannel implements Channel, Comparable<Channel> {
}
/**
* Compares the {@linkplain #getId() ID} of the two channel.
* Compares the {@linkplain #getId() ID} of the two channels.
*/
public final int compareTo(Channel o) {
return getId().compareTo(o.getId());

View File

@ -42,7 +42,8 @@ public abstract class AbstractChannelSink implements ChannelSink {
}
/**
* Fires an {@link ExceptionEvent} upstream with the specified {@code cause}.
* Sends an {@link ExceptionEvent} upstream with the specified
* {@code cause}.
*
* @param event the {@link ChannelEvent} which caused a
* {@link ChannelHandler} to raise an exception

View File

@ -91,9 +91,10 @@ public interface ChannelConfig {
/**
* Returns the write timeout of the channel in milliseconds. If a write
* operation is not done within the write timeout, an {@link IOException}
* will be raised. If the {@link Channel} doesn't support write operation,
* this property is not used at all, and therefore will be ignored.
* operation is not completed within the write timeout, an
* {@link IOException} will be raised. If the {@link Channel} doesn't
* support write operation, this property is not used at all, and therefore
* will be ignored.
*
* @return the write timeout in milliseconds. {@code 0} if disabled.
*/
@ -101,9 +102,10 @@ public interface ChannelConfig {
/**
* Sets the write timeout of the channel in milliseconds. If a write
* operation is not done within the write timeout, an {@link IOException}
* will be raised. If the {@link Channel} doesn't support write operation,
* this property is not used at all, and therefore will be ignored.
* operation is not completed within the write timeout, an
* {@link IOException} will be raised. If the {@link Channel} doesn't
* support write operation, this property is not used at all, and therefore
* will be ignored.
*
* @param writeTimeoutMillis the write timeout in milliseconds.
* {@code 0} to disable.

View File

@ -26,7 +26,7 @@ import java.net.SocketAddress;
/**
* Handles or intercepts a downstream {@link ChannelEvent}, and fires a
* Handles or intercepts a downstream {@link ChannelEvent}, and sends a
* {@link ChannelEvent} to the previous or next handler in a
* {@link ChannelPipeline}.
*
@ -93,9 +93,9 @@ import java.net.SocketAddress;
* <h3>Firing an event to the previous or next handler</h3>
* <p>
* You can forward the received event downstream or upstream. In most cases,
* {@link ChannelDownstreamHandler} will fire the event to the previous handler
* (downstream) although it is absolutely normal to fire the event to the next
* handler (upstream):
* {@link ChannelDownstreamHandler} will pass the event to the previous
* handler (downstream) although it is absolutely normal to pass the event
* to the next handler (upstream):
*
* <pre>
* // Sending the event forward (downstream)
@ -113,10 +113,10 @@ import java.net.SocketAddress;
* }
* </pre>
*
* <h4>Using the helper class to fire an event</h4>
* <h4>Using the helper class to send an event</h4>
* <p>
* You will also find various helper methods in {@link Channels} to be useful
* to generate and fire an artificial or manipulated event.
* to generate and send an artificial or manipulated event.
*
* <h3>Thread safety</h3>
* <p>

View File

@ -42,25 +42,26 @@ import java.util.concurrent.TimeUnit;
public interface ChannelFuture {
/**
* Returns a channel where the I/O operation associated with this future
* takes place.
* Returns a channel where the I/O operation associated with this
* {@link ChannelFuture} takes place.
*/
Channel getChannel();
/**
* Returns {@code true} if and only if this future is complete, regardless
* the operation was successful, failed, or canceled.
* Returns {@code true} if and only if this {@link ChannelFuture} is
* complete, regardless of whether the operation was successful, failed,
* or canceled.
*/
boolean isDone();
/**
* Returns {@code true} if and only if this future was canceled by
* a {@link #cancel()} method.
* Returns {@code true} if and only if this {@link ChannelFuture} was
* canceled by a {@link #cancel()} method.
*/
boolean isCancelled();
/**
* Returns {@code true} if and only if the I/O operation was done
* Returns {@code true} if and only if the I/O operation was completed
* successfully.
*/
boolean isSuccess();
@ -70,46 +71,52 @@ public interface ChannelFuture {
* failed.
*
* @return the cause of the failure.
* {@code null} if succeeded or this future is not done yet.
* {@code null} if succeeded or this {@link ChannelFuture} is not
* completed yet.
*/
Throwable getCause();
/**
* Cancels the I/O operation associated with this future and notifies all
* listeners if canceled successfully.
* Cancels the I/O operation associated with this {@link ChannelFuture}
* and notifies all listeners if canceled successfully.
*
* @return {@code true} if and only if the operation has been canceled.
* {@code false} if the operation can't be canceled or is already done.
* {@code false} if the operation can't be canceled or is already
* completed.
*/
boolean cancel();
/**
* Marks this future as a success and notifies all listeners.
* Marks this {@link ChannelFuture} as a success and notifies all
* listeners.
*/
void setSuccess();
/**
* Marks this future as a failure and notifies all listeners.
* Marks this {@link ChannelFuture} as a failure and notifies all
* listeners.
*/
void setFailure(Throwable cause);
/**
* Adds the specified listener to this future. The specified listener is
* notified when this future is {@linkplain #isDone() done}. If this
* future is already done, the specified listener is notified immediately.
* Adds the specified listener to this {@link ChannelFuture}. The
* specified listener is notified when this {@link ChannelFuture} is
* {@linkplain #isDone() done}. If this {@link ChannelFuture} is already
* completed, the specified listener is notified immediately.
*/
void addListener(ChannelFutureListener listener);
/**
* Removes the specified listener from this future. The specified
* listener is no longer notified when this future is
* {@linkplain #isDone() done}. If this future is already done, this
* method has no effect and returns silently.
* Removes the specified listener from this {@link ChannelFuture}.
* The specified listener is no longer notified when this
* {@link ChannelFuture} is {@linkplain #isDone() done}. If this
* {@link ChannelFuture} is already completed, this method has no effect
* and returns silently.
*/
void removeListener(ChannelFutureListener listener);
/**
* Waits for this future to be done.
* Waits for this {@link ChannelFuture} to be completed.
*
* @throws InterruptedException
* if the current thread was interrupted
@ -117,15 +124,17 @@ public interface ChannelFuture {
ChannelFuture await() throws InterruptedException;
/**
* Waits for this future to be done uninterruptibly. This method catches
* an {@link InterruptedException} and discards it silently.
* Waits for this {@link ChannelFuture} to be completed without
* interruption. This method catches an {@link InterruptedException} and
* discards it silently.
*/
ChannelFuture awaitUninterruptibly();
/**
* Waits for this future to be done with the specified time limit.
* Waits for this {@link ChannelFuture} to be completed within the
* specified time limit.
*
* @return {@code true} if and only if the future was done within
* @return {@code true} if and only if the future was completed within
* the specified time limit
*
* @throws InterruptedException
@ -134,9 +143,10 @@ public interface ChannelFuture {
boolean await(long timeout, TimeUnit unit) throws InterruptedException;
/**
* Waits for this future to be done with the specified time limit.
* Waits for this {@link ChannelFuture} to be completed within the
* specified time limit.
*
* @return {@code true} if and only if the future was done within
* @return {@code true} if and only if the future was completed within
* the specified time limit
*
* @throws InterruptedException
@ -145,19 +155,21 @@ public interface ChannelFuture {
boolean await(long timeoutMillis) throws InterruptedException;
/**
* Waits for this future to be done with the specified time limit. This
* method catches an {@link InterruptedException} and discards it silently.
* Waits for this {@link ChannelFuture} to be completed within the
* specified time limit without interruption. This method catches an
* {@link InterruptedException} and discards it silently.
*
* @return {@code true} if and only if the future was done within
* @return {@code true} if and only if the future was completed within
* the specified time limit
*/
boolean awaitUninterruptibly(long timeout, TimeUnit unit);
/**
* Waits for this future to be done with the specified time limit. This
* method catches an {@link InterruptedException} and discards it silently.
* Waits for this {@link ChannelFuture} to be completed within the
* specified time limit without interruption. This method catches an
* {@link InterruptedException} and discards it silently.
*
* @return {@code true} if and only if the future was done within
* @return {@code true} if and only if the future was completed within
* the specified time limit
*/
boolean awaitUninterruptibly(long timeoutMillis);

View File

@ -37,7 +37,7 @@ import java.util.EventListener;
public interface ChannelFutureListener extends EventListener {
/**
* An {@link ChannelFutureListener} that closes the {@link Channel} which is
* A {@link ChannelFutureListener} that closes the {@link Channel} which is
* associated with the specified {@link ChannelFuture}.
*/
static ChannelFutureListener CLOSE = new ChannelFutureListener() {

View File

@ -23,7 +23,7 @@
package org.jboss.netty.channel;
/**
* Handles or intercepts a {@link ChannelEvent}, and fires a
* Handles or intercepts a {@link ChannelEvent}, and sends a
* {@link ChannelEvent} to the next or previous handler in a
* {@link ChannelPipeline}.
*
@ -46,7 +46,7 @@ package org.jboss.netty.channel;
* A {@link ChannelHandler} is provided with a {@link ChannelHandlerContext}
* object. The {@link ChannelHandler} is supposed to interact with the
* {@link ChannelPipeline} it belongs to via the context object. Using the
* context object, the {@link ChannelHandler} can fire events to the next
* context object, the {@link ChannelHandler} can pass events to the next
* or previous handler or modify the behavior of the pipeline by adding or
* removing a handler for example.
*

View File

@ -375,7 +375,7 @@ public interface ChannelPipeline {
/**
* Fires the specified {@link ChannelEvent} to the first
* Sends the specified {@link ChannelEvent} to the first
* {@link ChannelUpstreamHandler} in this pipeline.
*
* @throws NullPointerException
@ -384,7 +384,7 @@ public interface ChannelPipeline {
void sendUpstream(ChannelEvent e);
/**
* Fires the specified {@link ChannelEvent} to the last
* Sends the specified {@link ChannelEvent} to the last
* {@link ChannelDownstreamHandler} in this pipeline.
*
* @throws NullPointerException

View File

@ -61,7 +61,7 @@ import java.lang.annotation.Target;
* ChannelBuffer header = ChannelBuffers.buffer(4);
* header.writeInt(body.readableBytes());
*
* // Create a message prepended with the header and fire a new event.
* // Create a message prepended with the header and send a new event.
* ChannelBuffer message = ChannelBuffers.wrappedBuffer(header, body);
* Channels.fireMessageReceived(ctx, message, e.getRemoteAddress());
* }
@ -94,7 +94,7 @@ import java.lang.annotation.Target;
* // Update the stateful property.
* messageId ++;
*
* // Create a message prepended with the header and fire a new event.
* // Create a message prepended with the header and send a new event.
* ChannelBuffer message = ChannelBuffers.wrappedBuffer(header, body);
* Channels.fireMessageReceived(ctx, message, e.getRemoteAddress());
* }

View File

@ -32,7 +32,7 @@ import org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor;
/**
* Handles or intercepts a upstream {@link ChannelEvent}, and fires a
* Handles or intercepts an upstream {@link ChannelEvent}, and sends a
* {@link ChannelEvent} to the next or previous handler in a
* {@link ChannelPipeline}.
*
@ -40,7 +40,7 @@ import org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor;
* <p>
* A upstream event is an event which is supposed to be processed from the
* first handler to the last handler in the {@link ChannelPipeline}.
* For example, all events fired by an I/O thread are upstream events, and
* For example, all events initiated by an I/O thread are upstream events, and
* they have the following meaning:
* <p>
* <table border="1" cellspacing="0" cellpadding="6">
@ -132,8 +132,8 @@ import org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor;
* <h3>Firing an event to the next or previous handler</h3>
* <p>
* You can forward the received event upstream or downstream. In most cases,
* {@link ChannelUpstreamHandler} will fire the event to the next handler
* (upstream) although it is absolutely normal to fire the event to the
* {@link ChannelUpstreamHandler} will sent the event to the next handler
* (upstream) although it is absolutely normal to sent the event to the
* previous handler (downstream):
*
* <pre>
@ -152,10 +152,10 @@ import org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor;
* }
* </pre>
*
* <h4>Using the helper class to fire an event</h4>
* <h4>Using the helper class to send an event</h4>
* <p>
* You will also find various helper methods in {@link Channels} to be useful
* to generate and fire an artificial or manipulated event.
* to generate and send an artificial or manipulated event.
*
* <h3>Thread safety</h3>
* <p>

View File

@ -102,7 +102,7 @@ public class Channels {
// future factory methods
/**
* Creates a new uncancellable {@link ChannelFuture} for the specified
* Creates a new non-cancellable {@link ChannelFuture} for the specified
* {@link Channel}.
*/
public static ChannelFuture future(Channel channel) {
@ -132,7 +132,7 @@ public class Channels {
}
/**
* Creates a new {@link ChannelFuture} which is already failed for the
* Creates a new {@link ChannelFuture} which has failed already for the
* specified {@link Channel}.
*
* @param cause the cause of the failure
@ -177,10 +177,10 @@ public class Channels {
// event emission methods
/**
* Fires a {@code "channelOpen"} event to the first
* Sends a {@code "channelOpen"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
* the specified {@link Channel}. If the specified channel has a parent,
* a {@code "childChannelOpen"} event will be fired, too.
* a {@code "childChannelOpen"} event will be sent, too.
*/
public static void fireChannelOpen(Channel channel) {
if (channel.getParent() != null) {
@ -193,10 +193,10 @@ public class Channels {
}
/**
* Fires a {@code "channelOpen"} event to the next
* Sends a {@code "channelOpen"} event to the next
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} where
* the specified {@link ChannelHandlerContext} belongs. Please note that
* this method doesn't fire a {@code "childChannelOpen"} event unlike
* this method doesn't send a {@code "childChannelOpen"} event unlike
* {@link #fireChannelOpen(Channel)} method.
*/
public static void fireChannelOpen(
@ -208,7 +208,7 @@ public class Channels {
}
/**
* Fires a {@code "channelBound"} event to the first
* Sends a {@code "channelBound"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
* the specified {@link Channel}.
*
@ -223,7 +223,7 @@ public class Channels {
}
/**
* Fires a {@code "channelBound"} event to the next
* Sends a {@code "channelBound"} event to the next
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} where
* the specified {@link ChannelHandlerContext} belongs.
*
@ -239,7 +239,7 @@ public class Channels {
}
/**
* Fires a {@code "channelConnected"} event to the first
* Sends a {@code "channelConnected"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
* the specified {@link Channel}.
*
@ -254,7 +254,7 @@ public class Channels {
}
/**
* Fires a {@code "channelConnected"} event to the next
* Sends a {@code "channelConnected"} event to the next
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} where
* the specified {@link ChannelHandlerContext} belongs.
*
@ -270,7 +270,7 @@ public class Channels {
}
/**
* Fires a {@code "messageReceived"} event to the first
* Sends a {@code "messageReceived"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
* the specified {@link Channel}.
*
@ -281,7 +281,7 @@ public class Channels {
}
/**
* Fires a {@code "messageReceived"} event to the first
* Sends a {@code "messageReceived"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
* the specified {@link Channel} belongs.
*
@ -297,7 +297,7 @@ public class Channels {
}
/**
* Fires a {@code "messageReceived"} event to the next
* Sends a {@code "messageReceived"} event to the next
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} where
* the specified {@link ChannelHandlerContext} belongs.
*
@ -310,7 +310,7 @@ public class Channels {
}
/**
* Fires a {@code "messageReceived"} event to the next
* Sends a {@code "messageReceived"} event to the next
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} where
* the specified {@link ChannelHandlerContext} belongs.
*
@ -326,7 +326,7 @@ public class Channels {
}
/**
* Fires a {@code "channelInterestChanged"} event to the first
* Sends a {@code "channelInterestChanged"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
* the specified {@link Channel}.
*
@ -341,7 +341,7 @@ public class Channels {
}
/**
* Fires a {@code "channelInterestChanged"} event to the next
* Sends a {@code "channelInterestChanged"} event to the next
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} where
* the specified {@link ChannelHandlerContext} belongs.
*
@ -358,7 +358,7 @@ public class Channels {
}
/**
* Fires a {@code "channelDisconnected"} event to the first
* Sends a {@code "channelDisconnected"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
* the specified {@link Channel}.
*/
@ -370,7 +370,7 @@ public class Channels {
}
/**
* Fires a {@code "channelDisconnected"} event to the next
* Sends a {@code "channelDisconnected"} event to the next
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} where
* the specified {@link ChannelHandlerContext} belongs.
*/
@ -382,7 +382,7 @@ public class Channels {
}
/**
* Fires a {@code "channelUnbound"} event to the first
* Sends a {@code "channelUnbound"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
* the specified {@link Channel}.
*/
@ -392,7 +392,7 @@ public class Channels {
}
/**
* Fires a {@code "channelUnbound"} event to the next
* Sends a {@code "channelUnbound"} event to the next
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} where
* the specified {@link ChannelHandlerContext} belongs.
*/
@ -404,7 +404,7 @@ public class Channels {
}
/**
* Fires a {@code "channelClosed"} event to the first
* Sends a {@code "channelClosed"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
* the specified {@link Channel}.
*/
@ -419,7 +419,7 @@ public class Channels {
}
/**
* Fires a {@code "channelClosed"} event to the next
* Sends a {@code "channelClosed"} event to the next
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} where
* the specified {@link ChannelHandlerContext} belongs.
*/
@ -432,7 +432,7 @@ public class Channels {
}
/**
* Fires a {@code "exceptionCaught"} event to the first
* Sends a {@code "exceptionCaught"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
* the specified {@link Channel}.
*/
@ -443,7 +443,7 @@ public class Channels {
}
/**
* Fires a {@code "exceptionCaught"} event to the next
* Sends a {@code "exceptionCaught"} event to the next
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} where
* the specified {@link ChannelHandlerContext} belongs.
*/

View File

@ -28,8 +28,8 @@ import org.jboss.netty.logging.InternalLogger;
import org.jboss.netty.logging.InternalLoggerFactory;
/**
* A skeletal {@link ChannelFuture} implementation which represents a future
* which is complete (done) already.
* A skeletal {@link ChannelFuture} implementation which represents a
* {@link ChannelFuture} which has been completed already.
*
* @author The Netty Project (netty-dev@lists.jboss.org)
* @author Trustin Lee (tlee@redhat.com)

View File

@ -125,7 +125,7 @@ public class SimpleChannelHandler implements ChannelUpstreamHandler {
}
/**
* Invoked when a message object (e.g. {@link ChannelBuffer}) was received
* Invoked when a message object (e.g: {@link ChannelBuffer}) was received
* from a remote peer.
*/
public void messageReceived(

View File

@ -78,7 +78,7 @@ public interface NioSocketChannelConfig extends SocketChannelConfig {
/**
* Returns {@code true} if and only if an I/O thread should do its effort
* to balance the ratio of read operations and write operations. Assuring
* to balance the ratio of read and write operations. Assuring
* the read-write fairness is sometimes necessary in a high speed network
* because a certain channel can spend too much time on flushing the
* large number of write requests not giving enough time for other channels
@ -87,12 +87,12 @@ public interface NioSocketChannelConfig extends SocketChannelConfig {
boolean isReadWriteFair();
/**
* Sets if an I/O thread should do its effort to balance the ratio of read
* operations and write operations. Assuring the read-write fairness is
* sometimes necessary in a high speed network because a certain channel
* can spend too much time on flushing the large number of write requests
* not giving enough time for other channels to perform I/O. The default
* value is {@code false}.
* Sets if an I/O thread should balance the ratio of read and write
* operations. Assuring the read-write fairness is sometimes necessary
* in a high speed network because a certain channel can spend too much
* time on flushing the large number of write requests not giving enough
* time for other channels to perform I/O. The default value is
* {@code false}.
*/
void setReadWriteFair(boolean fair);
}

View File

@ -54,7 +54,7 @@ public interface ReceiveBufferSizePredictor {
int nextReceiveBufferSize();
/**
* Updates this predictor by telling the actual number of read bytes
* Updates this predictor by specifying the actual number of read bytes
* in the previous read operation.
*
* @param previousReceiveBufferSize

View File

@ -23,6 +23,6 @@
/**
* <a href="http://en.wikipedia.org/wiki/New_I/O">NIO</a>-based socket channel
* API implementation - recommended for large number of connections (&gt;= 1000).
* API implementation - recommended for a large number of connections (&gt;= 1000).
*/
package org.jboss.netty.channel.socket.nio;

View File

@ -23,6 +23,6 @@
/**
* Old blocking I/O based socket channel API implementation - recommended for
* small number of connections (&lt; 1000).
* a small number of connections (&lt; 1000).
*/
package org.jboss.netty.channel.socket.oio;

View File

@ -192,7 +192,7 @@ public abstract class ReplayingDecoder<T extends Enum<T>> extends SimpleChannelH
private volatile int checkpoint;
/**
* Creates a new instance with no initial state (i.e. {@code null}).
* Creates a new instance with no initial state (i.e: {@code null}).
*/
protected ReplayingDecoder() {
this(null);

View File

@ -24,8 +24,8 @@ package org.jboss.netty.handler.codec.replay;
/**
* A placeholder {@link Enum} which could be specified as a type parameter of
* {@link ReplayingDecoder} when a user wants to manage the decoder state by
* oneself or there's no state to manage.
* {@link ReplayingDecoder} when a user wants to manage the decoder state or
* there's no state to manage.
*
* @author The Netty Project (netty-dev@lists.jboss.org)
* @author Trustin Lee (tlee@redhat.com)

View File

@ -23,7 +23,7 @@
package org.jboss.netty.handler.execution;
/**
* Estimates the size of an object in byte unit.
* Estimates the size of an object in bytes.
*
* @author The Netty Project (netty-dev@lists.jboss.org)
* @author Trustin Lee (tlee@redhat.com)
@ -34,7 +34,7 @@ package org.jboss.netty.handler.execution;
public interface ObjectSizeEstimator {
/**
* Returns the estimated size of the specified object in byte unit.
* Returns the estimated size of the specified object in bytes.
* This method must be implemented to return the same value for the same
* object. {@link MemoryAwareThreadPoolExecutor} and
* {@link OrderedMemoryAwareThreadPoolExecutor} will malfunction otherwise.

View File

@ -92,11 +92,11 @@ public class SslBufferPool {
}
/**
* Returns the number of bytes which were allocated but not acquired yet.
* You can estimate how optimal the specified maximum pool size is from
* this value. If it keeps returning {@code 0}, it means the pool is
* getting exhausted. If it keeps returns a unnecessarily big value, it
* means the pool is wasting the heap space.
* Returns the number of bytes which were allocated but have not been
* acquired yet. You can estimate how optimal the specified maximum pool
* size is from this value. If it keeps returning {@code 0}, it means the
* pool is getting exhausted. If it keeps returns a unnecessarily big
* value, it means the pool is wasting the heap space.
*/
public synchronized int getUnacquiredPoolSize() {
return index * MAX_PACKET_SIZE;

View File

@ -257,7 +257,7 @@ public class SslHandler extends FrameDecoder implements ChannelDownstreamHandler
}
/**
* Starts SSL / TLS handshake for the specified channel.
* Starts an SSL / TLS handshake for the specified channel.
*
* @return a {@link ChannelFuture} which is notified when the handshake
* succeeds or fails.
@ -280,7 +280,7 @@ public class SslHandler extends FrameDecoder implements ChannelDownstreamHandler
}
/**
* Sends a SSL {@code close_notify} message to the specified channel and
* Sends an SSL {@code close_notify} message to the specified channel and
* destroys the underlying {@link SSLEngine}.
*/
public ChannelFuture close(Channel channel) throws SSLException {