/** * Configure a newly created binder. * * @param b * the newly created binder. * @return binder for the caller, potentially after adding one or more * filters into the pipeline. */ protected ServletBinder register(ServletBinder b) { return filter.register(b); } }
/** * Configure a newly created binder. * * @param b * the newly created binder. * @return binder for the caller, potentially after adding one or more * filters into the pipeline. */ protected ServletBinder register(ServletBinder b) { return filter.register(b); } }
/** * Construct a binding for a regular expression. * * @param expression * the regular expression to pattern match the URL against. * @return binder for the passed expression. */ public ServletBinder serveRegex(String expression) { return register(new RegexPipeline.Binder(expression)); }
/** * Construct a binding for a regular expression. * * @param pattern * the regular expression to pattern match the URL against. * @return binder for the passed expression. */ public ServletBinder serveRegex(Pattern pattern) { return register(new RegexPipeline.Binder(pattern)); }
private ServletBinder register(ServletBinderImpl b) { synchronized (bindings) { if (pipelines != null) throw new IllegalStateException( HttpServerText.get().servletAlreadyInitialized); bindings.add(b); } return register((ServletBinder) b); }
/** * Construct a binding for a regular expression. * * @param pattern * the regular expression to pattern match the URL against. * @return binder for the passed expression. */ public ServletBinder serveRegex(Pattern pattern) { return register(new RegexPipeline.Binder(pattern)); }
/** * Construct a binding for a regular expression. * * @param expression * the regular expression to pattern match the URL against. * @return binder for the passed expression. */ public ServletBinder serveRegex(String expression) { return register(new RegexPipeline.Binder(expression)); }
private ServletBinder register(ServletBinderImpl b) { synchronized (bindings) { if (pipelines != null) throw new IllegalStateException( HttpServerText.get().servletAlreadyInitialized); bindings.add(b); } return register((ServletBinder) b); }
/** * Construct a binding for a specific path. * * @param path * pattern to match. * @return binder for the passed path. */ public ServletBinder serve(String path) { if (path.startsWith("*")) return register(new SuffixPipeline.Binder(path.substring(1))); throw new IllegalArgumentException(MessageFormat.format(HttpServerText .get().pathNotSupported, path)); }
/** * Construct a binding for a specific path. * * @param path * pattern to match. * @return binder for the passed path. */ public ServletBinder serve(String path) { if (path.startsWith("*")) return register(new SuffixPipeline.Binder(path.substring(1))); throw new IllegalArgumentException(MessageFormat.format(HttpServerText .get().pathNotSupported, path)); }