本文整理汇总了Java中org.apache.hadoop.http.HttpServer2.Builder类的典型用法代码示例。如果您正苦于以下问题:Java Builder类的具体用法?Java Builder怎么用?Java Builder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Builder类属于org.apache.hadoop.http.HttpServer2包,在下文中一共展示了Builder类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createServer
import org.apache.hadoop.http.HttpServer2.Builder; //导入依赖的package包/类
/**
* Create an HttpServer instance on the given address for the given webapp
* @param host to bind
* @param port to bind
* @return the server
* @throws IOException if it could not be created
*/
public static HttpServer2 createServer(String host, int port)
throws IOException {
prepareTestWebapp();
return new HttpServer2.Builder().setName(TEST)
.addEndpoint(URI.create("http://" + host + ":" + port))
.setFindPort(true).build();
}
示例2: localServerBuilder
import org.apache.hadoop.http.HttpServer2.Builder; //导入依赖的package包/类
private static Builder localServerBuilder(String webapp) {
return new HttpServer2.Builder().setName(webapp).addEndpoint(
URI.create("http://localhost:0"));
}
示例3: trustStore
import org.apache.hadoop.http.HttpServer2.Builder; //导入依赖的package包/类
@Override
public Builder trustStore(String location, String password, String type) {
truststorePassword = password;
return super.trustStore(location, password, type);
}
示例4: keyStore
import org.apache.hadoop.http.HttpServer2.Builder; //导入依赖的package包/类
@Override
public Builder keyStore(String location, String password, String type) {
keystorePassword = password;
return super.keyStore(location, password, type);
}
示例5: keyPassword
import org.apache.hadoop.http.HttpServer2.Builder; //导入依赖的package包/类
@Override
public Builder keyPassword(String password) {
keypass = password;
return super.keyPassword(password);
}