/** * Runs the binders */ @Override public void configureServlets() { runBinders(); }
/** * urlPatterns - Any Servlet-style patterns. examples: /*, /html/*, *.html, etc. Since: 4.1 * * @param urlPatterns * The url pattern * * @return The key builder */ public ServletKeyBindingBuilder serveSite(Iterable<String> urlPatterns) { return serve(urlPatterns); }
/** * regexes - Any Java-style regular expressions. Since: 4.1 * * @param regexes * The regexes to apply * * @return The key builder */ public ServletKeyBindingBuilder serveSiteRegex(Iterable<String> regexes) { return serveRegex(regexes); }
module.bind(UserAgentStringParser.class) .toInstance(JWebMPSiteBinder.userAgentParser); JWebMPSiteBinder.log.fine("Bound ReadableUserAgent.class"); module.bind(ReadableUserAgent.class) .toProvider(() -> module.bind(AjaxResponse.class) .in(RequestScoped.class); JWebMPSiteBinder.log.fine("Bound AjaxCall.class"); module.bind(AjaxCall.class) .in(RequestScoped.class); module.bind(Map.class) .annotatedWith(Names.named("LocalStorage")) .toProvider(() -> GuiceContext.getInstance(SessionStorageProperties.class) .getLocalStorage()); module.bind(JWebMPSiteBinder.localStorageTypeLiteral) .annotatedWith(Names.named("LocalStorage")) .toProvider(() -> GuiceContext.getInstance(SessionStorageProperties.class) module.bind(Map.class) .annotatedWith(Names.named("SessionStorage")) .toProvider(() -> GuiceContext.getInstance(SessionStorageProperties.class) .getSessionStorage()); module.bind(JWebMPSiteBinder.sessionStorageTypeLiteral) .annotatedWith(Names.named("SessionStorage")) .toProvider(() -> GuiceContext.getInstance(SessionStorageProperties.class) .getSessionStorage()); JWebMPSiteBinder.log.fine("Bound SessionStorageProperties.class");
/** * regexes - Any Java-style regular expressions. Since: 4.1 * * @param regex * The regex to apply oto serve * @param regexes * The regexes to apply * * @return The key builder */ public ServletKeyBindingBuilder serveSiteRegex(String regex, String... regexes) { return serveRegex(regex, regexes); }
/** * urlPatterns - Any Servlet-style patterns. examples: /*, /html/*, *.html, etc. Since: 4.1 * * @param urlPattern * The url pattern * @param morePatterns * any additional patterns * * @return The key builder */ public ServletKeyBindingBuilder serveSite(String urlPattern, String... morePatterns) { return serve(urlPattern, morePatterns); }