org.h2.server.web.WebServer.getAllowOthers()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中org.h2.server.web.WebServer.getAllowOthers()方法的一些代码示例,展示了WebServer.getAllowOthers()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebServer.getAllowOthers()方法的具体详情如下:
包路径:org.h2.server.web.WebServer
类名称:WebServer
方法名:getAllowOthers

WebServer.getAllowOthers介绍

暂无

代码示例

代码示例来源:origin: com.h2database/h2

private boolean allow(HttpServletRequest req) {
  if (server.getAllowOthers()) {
    return true;
  }
  String addr = req.getRemoteAddr();
  try {
    InetAddress address = InetAddress.getByName(addr);
    return address.isLoopbackAddress();
  } catch (UnknownHostException e) {
    return false;
  } catch (NoClassDefFoundError e) {
    // Google App Engine does not allow java.net.InetAddress
    return false;
  }
}

代码示例来源:origin: com.h2database/h2

private boolean allow() {
  if (server.getAllowOthers()) {
    return true;
  }
  try {
    return NetUtils.isLocalAddress(socket);
  } catch (UnknownHostException e) {
    server.traceError(e);
    return false;
  }
}

代码示例来源:origin: com.h2database/h2

private String admin() {
  session.put("port", "" + server.getPort());
  session.put("allowOthers", "" + server.getAllowOthers());
  session.put("ssl", String.valueOf(server.getSSL()));
  session.put("sessions", server.getSessions());
  return "admin.jsp";
}

代码示例来源:origin: com.h2database/com.springsource.org.h2

private boolean allow(HttpServletRequest req) {
  if (server.getAllowOthers()) {
    return true;
  }
  String addr = req.getRemoteAddr();
  InetAddress address;
  try {
    address = InetAddress.getByName(addr);
  } catch (UnknownHostException e) {
    return false;
  }
  return address.isLoopbackAddress();
}

代码示例来源:origin: org.leapframework/jmms-engine

private boolean allow(HttpServletRequest req) {
  if (server.getAllowOthers()) {
    return true;
  }
  String addr = req.getRemoteAddr();
  try {
    InetAddress address = InetAddress.getByName(addr);
    return address.isLoopbackAddress();
  } catch (UnknownHostException e) {
    return false;
  } catch (NoClassDefFoundError e) {
    // Google App Engine does not allow java.net.InetAddress
    return false;
  }
}

代码示例来源:origin: org.wowtools/h2

private boolean allow(HttpServletRequest req) {
  if (server.getAllowOthers()) {
    return true;
  }
  String addr = req.getRemoteAddr();
  try {
    InetAddress address = InetAddress.getByName(addr);
    return address.isLoopbackAddress();
  } catch (UnknownHostException e) {
    return false;
  } catch (NoClassDefFoundError e) {
    // Google App Engine does not allow java.net.InetAddress
    return false;
  }
}

代码示例来源:origin: com.eventsourcing/h2

private boolean allow(HttpServletRequest req) {
  if (server.getAllowOthers()) {
    return true;
  }
  String addr = req.getRemoteAddr();
  try {
    InetAddress address = InetAddress.getByName(addr);
    return address.isLoopbackAddress();
  } catch (UnknownHostException e) {
    return false;
  } catch (NoClassDefFoundError e) {
    // Google App Engine does not allow java.net.InetAddress
    return false;
  }
}

代码示例来源:origin: com.h2database/com.springsource.org.h2

boolean allow() {
  if (server.getAllowOthers()) {
    return true;
  }
  return NetUtils.isLoopbackAddress(socket);
}

代码示例来源:origin: org.wowtools/h2

private boolean allow() {
  if (server.getAllowOthers()) {
    return true;
  }
  try {
    return NetUtils.isLocalAddress(socket);
  } catch (UnknownHostException e) {
    server.traceError(e);
    return false;
  }
}

代码示例来源:origin: com.eventsourcing/h2

private boolean allow() {
  if (server.getAllowOthers()) {
    return true;
  }
  try {
    return NetUtils.isLocalAddress(socket);
  } catch (UnknownHostException e) {
    server.traceError(e);
    return false;
  }
}

代码示例来源:origin: com.h2database/com.springsource.org.h2

private String admin() {
  session.put("port", "" + server.getPort());
  session.put("allowOthers", "" + server.getAllowOthers());
  session.put("ssl", String.valueOf(server.getSSL()));
  session.put("sessions", server.getSessions());
  return "admin.jsp";
}

代码示例来源:origin: org.wowtools/h2

private String admin() {
  session.put("port", "" + server.getPort());
  session.put("allowOthers", "" + server.getAllowOthers());
  session.put("ssl", String.valueOf(server.getSSL()));
  session.put("sessions", server.getSessions());
  return "admin.jsp";
}

代码示例来源:origin: com.eventsourcing/h2

private String admin() {
  session.put("port", "" + server.getPort());
  session.put("allowOthers", "" + server.getAllowOthers());
  session.put("ssl", String.valueOf(server.getSSL()));
  session.put("sessions", server.getSessions());
  return "admin.jsp";
}

相关文章