Added the missing Javadoc Project: http://git-wip-us.apache.org/repos/asf/mina/repo Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/92183f83 Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/92183f83 Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/92183f83
Branch: refs/heads/2.0 Commit: 92183f83855e0e11ddb8009fd0226bb85883a820 Parents: aff52b8 Author: Emmanuel Lécharny <[email protected]> Authored: Tue Nov 4 11:38:30 2014 +0100 Committer: Emmanuel Lécharny <[email protected]> Committed: Tue Nov 4 11:38:30 2014 +0100 ---------------------------------------------------------------------- .../apache/mina/core/future/ConnectFuture.java | 28 +++++++++++++++----- 1 file changed, 22 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina/blob/92183f83/mina-core/src/main/java/org/apache/mina/core/future/ConnectFuture.java ---------------------------------------------------------------------- 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 ad3cd48..0e18626 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 @@ -28,7 +28,7 @@ import org.apache.mina.core.session.IoSession; * <pre> * IoConnector connector = ...; * ConnectFuture future = connector.connect(...); - * future.join(); // Wait until the connection attempt is finished. + * future.await(); // Wait until the connection attempt is finished. * IoSession session = future.getSession(); * session.write(...); * </pre> @@ -39,8 +39,7 @@ public interface ConnectFuture extends IoFuture { /** * Returns {@link IoSession} which is the result of connect operation. * - * @return <tt>null</tt> if the connect operation is not finished yet - * @throws RuntimeException if connection attempt failed by an exception + * @return {@code true} if the connect operation is not finished yet */ IoSession getSession(); @@ -48,17 +47,18 @@ public interface ConnectFuture extends IoFuture { * Returns the cause of the connection failure. * * @return <tt>null</tt> if the connect operation is not finished yet, - * or if the connection attempt is successful. + * or if the connection attempt is successful, otherwise returns + * teh cause of the exception */ Throwable getException(); /** - * Returns <tt>true</tt> if the connect operation is finished successfully. + * @return {@code true} if the connect operation is finished successfully. */ boolean isConnected(); /** - * Returns {@code true} if the connect operation has been canceled by + * @return {@code true} if the connect operation has been canceled by * {@link #cancel()} method. */ boolean isCanceled(); @@ -67,6 +67,8 @@ public interface ConnectFuture extends IoFuture { * Sets the newly connected session and notifies all threads waiting for * this future. This method is invoked by MINA internally. Please do not * call this method directly. + * + * @param session The created session to store in the ConnectFuture insteance */ void setSession(IoSession session); @@ -74,6 +76,8 @@ public interface ConnectFuture extends IoFuture { * Sets the exception caught due to connection failure and notifies all * threads waiting for this future. This method is invoked by MINA * internally. Please do not call this method directly. + * + * @param exception The exception to store in the ConnectFuture instance */ void setException(Throwable exception); @@ -83,11 +87,23 @@ public interface ConnectFuture extends IoFuture { */ void cancel(); + /** + * {@inheritDoc} + */ ConnectFuture await() throws InterruptedException; + /** + * {@inheritDoc} + */ ConnectFuture awaitUninterruptibly(); + /** + * {@inheritDoc} + */ ConnectFuture addListener(IoFutureListener<?> listener); + /** + * {@inheritDoc} + */ ConnectFuture removeListener(IoFutureListener<?> listener); }
