Javadoc & null check

This commit is contained in:
Trustin Lee 2009-07-16 11:20:01 +00:00
parent 3d0ed106fc
commit c74fe22de3

View File

@ -84,19 +84,38 @@ public final class HttpTunnelingSocketChannelConfig implements SocketChannelConf
this.channel = channel; this.channel = channel;
} }
/**
* Returns the host name of the HTTP server. If {@code null}, the
* {@code "Host"} header is not sent by the HTTP tunneling client.
*/
public String getServerName() { public String getServerName() {
return serverName; return serverName;
} }
/**
* Sets the host name of the HTTP server. If {@code null}, the
* {@code "Host"} header is not sent by the HTTP tunneling client.
*/
public void setServerName(String serverName) { public void setServerName(String serverName) {
this.serverName = serverName; this.serverName = serverName;
} }
/**
* Returns the path where the {@link HttpTunnelingServlet} is mapped to.
* The default value is {@code "/netty-tunnel"}.
*/
public String getServerPath() { public String getServerPath() {
return serverPath; return serverPath;
} }
/**
* Sets the path where the {@link HttpTunnelingServlet} is mapped to.
* The default value is {@code "/netty-tunnel"}.
*/
public void setServerPath(String serverPath) { public void setServerPath(String serverPath) {
if (serverPath == null) {
throw new NullPointerException("serverPath");
}
this.serverPath = serverPath; this.serverPath = serverPath;
} }