Use the clearer parameter names that indicate the address is for Internet connections

This commit is contained in:
Trustin Lee 2013-01-30 20:14:59 +09:00
parent 788d7e9b8b
commit 64e6c4021d
2 changed files with 10 additions and 10 deletions

View File

@ -105,22 +105,22 @@ public abstract class AbstractBootstrap<B extends AbstractBootstrap<?>> {
/** /**
* @see {@link #localAddress(SocketAddress)} * @see {@link #localAddress(SocketAddress)}
*/ */
public B localAddress(int port) { public B localAddress(int inetPort) {
return localAddress(new InetSocketAddress(port)); return localAddress(new InetSocketAddress(inetPort));
} }
/** /**
* @see {@link #localAddress(SocketAddress)} * @see {@link #localAddress(SocketAddress)}
*/ */
public B localAddress(String host, int port) { public B localAddress(String inetHost, int inetPort) {
return localAddress(new InetSocketAddress(host, port)); return localAddress(new InetSocketAddress(inetHost, inetPort));
} }
/** /**
* @see {@link #localAddress(SocketAddress)} * @see {@link #localAddress(SocketAddress)}
*/ */
public B localAddress(InetAddress host, int port) { public B localAddress(InetAddress inetHost, int inetPort) {
return localAddress(new InetSocketAddress(host, port)); return localAddress(new InetSocketAddress(inetHost, inetPort));
} }
/** /**

View File

@ -51,16 +51,16 @@ public class Bootstrap extends AbstractBootstrap<Bootstrap> {
/** /**
* @see {@link #remoteAddress(SocketAddress)} * @see {@link #remoteAddress(SocketAddress)}
*/ */
public Bootstrap remoteAddress(String host, int port) { public Bootstrap remoteAddress(String inetHost, int inetPort) {
remoteAddress = new InetSocketAddress(host, port); remoteAddress = new InetSocketAddress(inetHost, inetPort);
return this; return this;
} }
/** /**
* @see {@link #remoteAddress(SocketAddress)} * @see {@link #remoteAddress(SocketAddress)}
*/ */
public Bootstrap remoteAddress(InetAddress host, int port) { public Bootstrap remoteAddress(InetAddress inetHost, int inetPort) {
remoteAddress = new InetSocketAddress(host, port); remoteAddress = new InetSocketAddress(inetHost, inetPort);
return this; return this;
} }