public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { ServletRequestContext.setRequestInfo(request); chain.doFilter(request, response); }
public String getScheme(){ return Objects.firstNonNull(ServletRequestContext.getScheme(), "http"); }
public static String getFullAuthority() { String retVal = fullAuthority.get(); if (retVal == null) { retVal = System.getProperty("fullAuthority"); if (retVal == null) { retVal = getDefaultFullAuthority(); } } return retVal; }
private static String getDefaultAuthority() { String retVal = System.getProperty("defaultAuthority"); if (retVal == null) { retVal = getServerHostname() + ":" + getServerPort(); System.setProperty("defaultAuthority", retVal); } return retVal; }
private String getServerHostname() { return Objects.firstNonNull(ServletRequestContext.getHost(), Objects.firstNonNull(System.getProperty(JETTY_HOST), "localhost")); } }
private String getServerPort() { return Objects.firstNonNull(ServletRequestContext.getPort(), Objects.firstNonNull(System.getProperty(JETTY_PORT), "8080")); }
private String getReqVal(String container, String key) { String val = config.getString(container, key); if (val == null) { throw new RuntimeException("Missing required container config param, key: " + key + ", container: " + container); } val = val.replace("%host%", ServletRequestContext.getAuthority()); return val; }
public static String getAuthority() { String retVal = authority.get(); if (retVal == null) { retVal = System.getProperty("authority"); if (retVal == null) { retVal = getDefaultAuthority(); } } return retVal; }
private String getServerHostname() { return Objects.firstNonNull(ServletRequestContext.getHost(), Objects.firstNonNull(System.getProperty(JETTY_HOST), "localhost")); } }
private String getServerPort() { return Objects.firstNonNull(ServletRequestContext.getPort(), Objects.firstNonNull(System.getProperty(JETTY_PORT), "8080")); }
private static String getDefaultFullAuthority() { String retVal = System.getProperty("defaultFullAuthority"); if (retVal != null) { retVal = "http://" + getServerHostname() + ":" + getServerPort(); System.setProperty("defaultFullAuthority", retVal); } return retVal; }
private String getReqVal(String container, String key) { String val = config.getString(container, key); if (val == null) { throw new RuntimeException( "Missing required config '" + key + "' for container: " + container); } val = val.replace("%host%", ServletRequestContext.getAuthority()); return val; }
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { ServletRequestContext.setRequestInfo(request); chain.doFilter(request, response); }
private String getServerHostname() { return Objects.firstNonNull(ServletRequestContext.getHost(), Objects.firstNonNull(System.getProperty(JETTY_HOST), "localhost")); } }
public String getScheme(){ return Objects.firstNonNull(ServletRequestContext.getScheme(), "http"); }
private String getServerPort() { return Objects.firstNonNull(ServletRequestContext.getPort(), Objects.firstNonNull(System.getProperty(JETTY_PORT), "8080")); }
private String getReqConfig(String container, String key) { String val = config.getString(container, key); if (val == null) { throw new RuntimeException("Missing required container config key: " + key + " for " + "container: " + container); } val = val.replace("%host%", ServletRequestContext.getAuthority()); return val; } }
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { ServletRequestContext.setRequestInfo(request); chain.doFilter(request, response); }
public String getScheme(){ return Objects.firstNonNull(ServletRequestContext.getScheme(), "http"); }
private String getReqConfig(String container, String key) { String ret = config.getString(container, key); if (ret == null) { ret = config.getString(ContainerConfig.DEFAULT_CONTAINER, key); if (ret == null) { throw new RuntimeException("Container '" + container + "' missing config for required param: " + key); } } ret = ret.replace("%host%", ServletRequestContext.getAuthority()); return ret; }