本文整理了Java中org.h2.server.web.WebServer.setAllowOthers()
方法的一些代码示例,展示了WebServer.setAllowOthers()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebServer.setAllowOthers()
方法的具体详情如下:
包路径:org.h2.server.web.WebServer
类名称:WebServer
方法名:setAllowOthers
暂无
代码示例来源:origin: com.h2database/h2
private String adminSave() {
try {
Properties prop = new SortedProperties();
int port = Integer.decode((String) attributes.get("port"));
prop.setProperty("webPort", String.valueOf(port));
server.setPort(port);
boolean allowOthers = Utils.parseBoolean((String) attributes.get("allowOthers"), false, false);
prop.setProperty("webAllowOthers", String.valueOf(allowOthers));
server.setAllowOthers(allowOthers);
boolean ssl = Utils.parseBoolean((String) attributes.get("ssl"), false, false);
prop.setProperty("webSSL", String.valueOf(ssl));
server.setSSL(ssl);
server.saveProperties(prop);
} catch (Exception e) {
trace(e.toString());
}
return admin();
}
代码示例来源:origin: com.h2database/com.springsource.org.h2
private String adminSave() {
try {
server.setPort(MathUtils.decodeInt((String) attributes.get("port")));
server.setAllowOthers(Boolean.valueOf((String) attributes.get("allowOthers")).booleanValue());
server.setSSL(Boolean.valueOf((String) attributes.get("ssl")).booleanValue());
server.saveSettings();
} catch (Exception e) {
server.trace(e.toString());
}
return admin();
}
代码示例来源:origin: com.eventsourcing/h2
private String adminSave() {
try {
Properties prop = new SortedProperties();
int port = Integer.decode((String) attributes.get("port"));
prop.setProperty("webPort", String.valueOf(port));
server.setPort(port);
boolean allowOthers = Boolean.parseBoolean(
(String) attributes.get("allowOthers"));
prop.setProperty("webAllowOthers", String.valueOf(allowOthers));
server.setAllowOthers(allowOthers);
boolean ssl = Boolean.parseBoolean(
(String) attributes.get("ssl"));
prop.setProperty("webSSL", String.valueOf(ssl));
server.setSSL(ssl);
server.saveProperties(prop);
} catch (Exception e) {
trace(e.toString());
}
return admin();
}
代码示例来源:origin: com.atlassian.support/achoo-database-console-common
public HackedWebServer(String[] args, HackedWebServlet servlet)
{
//without this response won't be written back
super.setAllowChunked(false);
super.setAllowOthers(true);
super.init(args);
//if there was ever h2 installation then servlet will try to init defaults again
super.setAllowChunked(false);
super.setAllowOthers(true);
this.servlet = servlet;
//create single session which will be maintained through plugin lifecycle
this.session = this.createNewSession("local");
}
代码示例来源:origin: org.wowtools/h2
private String adminSave() {
try {
Properties prop = new SortedProperties();
int port = Integer.decode((String) attributes.get("port"));
prop.setProperty("webPort", String.valueOf(port));
server.setPort(port);
boolean allowOthers = Boolean.parseBoolean(
(String) attributes.get("allowOthers"));
prop.setProperty("webAllowOthers", String.valueOf(allowOthers));
server.setAllowOthers(allowOthers);
boolean ssl = Boolean.parseBoolean(
(String) attributes.get("ssl"));
prop.setProperty("webSSL", String.valueOf(ssl));
server.setSSL(ssl);
server.saveProperties(prop);
} catch (Exception e) {
trace(e.toString());
}
return admin();
}
内容来源于网络,如有侵权,请联系作者删除!