/** * Create new servlet deployment context initialized with the providers from the specified packages. * <p> * The {@code packages} value will be set as one of the {@link Builder#initParam(String, String) initialization parameters} * with <tt>{@value org.glassfish.jersey.server.ServerProperties#PROVIDER_PACKAGES}</tt> key. * </p> * * @param packages list of application packages containing JAX-RS / Jersey provider and resource classes. * @return new servlet deployment context instance initialized with the providers from the specified packages. * * @throws java.lang.NullPointerException is the specified map is {@code null}. * @see org.glassfish.jersey.server.ServerProperties#PROVIDER_PACKAGES */ public static Builder newInstance(String packages) { return new Builder().initParam(ServerProperties.PROVIDER_PACKAGES, packages); }
/** * Create new servlet deployment context builder bound to a Servlet class. * <p> * Note that the servlet instance will be discarded if one of the {@link Builder#servlet(javax.servlet.http.HttpServlet)}, * {@link Builder#servletClass(Class)}, {@link Builder#filterClass(Class)} or * {@link Builder#filterClass(Class, java.util.Set)} is invoked on the builder. * </p> * * @param servletClass the servlet class to serve the application. * @return new servlet deployment context builder instance bound to a Servlet instance. * * @throws java.lang.NullPointerException is the specified map is {@code null}. */ public static Builder forServlet(Class<? extends HttpServlet> servletClass) { return new Builder().servletClass(servletClass); }
/** * Create new servlet deployment context builder bound to a Servlet instance. * <p> * Note that the servlet instance will be discarded if one of the {@link Builder#servlet(javax.servlet.http.HttpServlet)}, * {@link Builder#servletClass(Class)}, {@link Builder#filterClass(Class)} or * {@link Builder#filterClass(Class, java.util.Set)} is invoked on the builder. * </p> * * @param servlet the servlet instance to serve the application. * @return new servlet deployment context builder instance bound to a Servlet instance. * * @throws java.lang.NullPointerException is the specified map is {@code null}. */ public static Builder forServlet(HttpServlet servlet) { return new Builder().servlet(servlet); }
/** * Create new servlet deployment context builder initialized with the providers from the specified packages. * <p> * The {@code packages} value will be set as one of the {@link Builder#initParam(String, String) initialization parameters} * with <tt>{@value org.glassfish.jersey.server.ServerProperties#PROVIDER_PACKAGES}</tt> key. * </p> * * @param packages list of application packages containing JAX-RS / Jersey provider and resource classes. * @return new servlet deployment context builder instance initialized with the providers from the specified packages. * * @throws java.lang.NullPointerException is the specified map is {@code null}. * @see org.glassfish.jersey.server.ServerProperties#PROVIDER_PACKAGES */ public static Builder forPackages(String packages) { return new Builder().initParam(ServerProperties.PROVIDER_PACKAGES, packages); }
/** * Create a new servlet deployment context for a JAX-RS / Jersey application instance. * <p> * The created servlet deployment context will be configured to use default values. * </p> * * @param applicationClass a JAX-RS / Jersey application to be tested. * @return new servlet deployment context instance associated with the JAX-RS / Jersey application to be tested. * * @throws java.lang.NullPointerException in case the {@code applicationClass} is {@code null}. */ public static ServletDeploymentContext newInstance(final Class<? extends Application> applicationClass) { return new Builder(applicationClass).build(); }
/** * Create a new servlet deployment context for a JAX-RS / Jersey application instance. * <p> * The created servlet deployment context will be configured to use default values. * </p> * * @param application a JAX-RS / Jersey application to be tested. * @return new servlet deployment context instance associated with the JAX-RS / Jersey application to be tested. * * @throws java.lang.NullPointerException in case the {@code application} is {@code null}. */ public static ServletDeploymentContext newInstance(final Application application) { return new Builder(application).build(); }
/** * Create new servlet deployment context builder initialized from the supplied initialization parameters. * * @param initParams a map of initialization parameters. The parameters will be copied. * @return new servlet deployment context builder instance initialized from the supplied initialization parameters. * * @throws java.lang.NullPointerException is the specified map is {@code null}. */ public static Builder builder(final Map<String, String> initParams) { return new Builder().initParams(initParams); }
/** * Create a new servlet deployment context builder for a JAX-RS / Jersey application instance. * * @param application a JAX-RS / Jersey application to be tested. * @return new servlet deployment context builder instance associated with the JAX-RS / Jersey application to be tested. * * @throws java.lang.NullPointerException in case the {@code application} is {@code null}. */ public static Builder builder(final Application application) { return new Builder(application); }
/** * Create a new servlet deployment context builder for a JAX-RS / Jersey application instance. * * @param applicationClass a JAX-RS / Jersey application to be tested. * @return new servlet deployment context builder instance associated with the JAX-RS / Jersey application to be tested. * * @throws java.lang.NullPointerException in case the {@code applicationClass} is {@code null}. */ public static Builder builder(final Class<? extends Application> applicationClass) { return new Builder(applicationClass); }
/** * Create new servlet deployment context builder initialized with the providers from the specified packages. * <p> * The {@code packages} value will be set as one of the {@link Builder#initParam(String, String) initialization parameters} * with <tt>{@value org.glassfish.jersey.server.ServerProperties#PROVIDER_PACKAGES}</tt> key. * </p> * * @param packages list of application packages containing JAX-RS / Jersey provider and resource classes. * @return new servlet deployment context builder instance initialized with the providers from the specified packages. * * @throws java.lang.NullPointerException is the specified map is {@code null}. * @see org.glassfish.jersey.server.ServerProperties#PROVIDER_PACKAGES */ public static Builder forPackages(String packages) { return new Builder().initParam(ServerProperties.PROVIDER_PACKAGES, packages); }
/** * Create new servlet deployment context builder bound to a Servlet class. * <p> * Note that the servlet instance will be discarded if one of the {@link Builder#servlet(javax.servlet.http.HttpServlet)}, * {@link Builder#servletClass(Class)}, {@link Builder#filterClass(Class)} or * {@link Builder#filterClass(Class, java.util.Set)} is invoked on the builder. * </p> * * @param servletClass the servlet class to serve the application. * @return new servlet deployment context builder instance bound to a Servlet instance. * * @throws java.lang.NullPointerException is the specified map is {@code null}. */ public static Builder forServlet(Class<? extends HttpServlet> servletClass) { return new Builder().servletClass(servletClass); }
/** * Create new servlet deployment context builder bound to a Servlet instance. * <p> * Note that the servlet instance will be discarded if one of the {@link Builder#servlet(javax.servlet.http.HttpServlet)}, * {@link Builder#servletClass(Class)}, {@link Builder#filterClass(Class)} or * {@link Builder#filterClass(Class, java.util.Set)} is invoked on the builder. * </p> * * @param servlet the servlet instance to serve the application. * @return new servlet deployment context builder instance bound to a Servlet instance. * * @throws java.lang.NullPointerException is the specified map is {@code null}. */ public static Builder forServlet(HttpServlet servlet) { return new Builder().servlet(servlet); }
/** * Create a new servlet deployment context for a JAX-RS / Jersey application instance. * <p> * The created servlet deployment context will be configured to use default values. * </p> * * @param application a JAX-RS / Jersey application to be tested. * @return new servlet deployment context instance associated with the JAX-RS / Jersey application to be tested. * * @throws java.lang.NullPointerException in case the {@code application} is {@code null}. */ public static ServletDeploymentContext newInstance(final Application application) { return new Builder(application).build(); }
/** * Create new servlet deployment context initialized with the providers from the specified packages. * <p> * The {@code packages} value will be set as one of the {@link Builder#initParam(String, String) initialization parameters} * with <tt>{@value org.glassfish.jersey.server.ServerProperties#PROVIDER_PACKAGES}</tt> key. * </p> * * @param packages list of application packages containing JAX-RS / Jersey provider and resource classes. * @return new servlet deployment context instance initialized with the providers from the specified packages. * * @throws java.lang.NullPointerException is the specified map is {@code null}. * @see org.glassfish.jersey.server.ServerProperties#PROVIDER_PACKAGES */ public static Builder newInstance(String packages) { return new Builder().initParam(ServerProperties.PROVIDER_PACKAGES, packages); }
/** * Create a new servlet deployment context for a JAX-RS / Jersey application instance. * <p> * The created servlet deployment context will be configured to use default values. * </p> * * @param applicationClass a JAX-RS / Jersey application to be tested. * @return new servlet deployment context instance associated with the JAX-RS / Jersey application to be tested. * * @throws java.lang.NullPointerException in case the {@code applicationClass} is {@code null}. */ public static ServletDeploymentContext newInstance(final Class<? extends Application> applicationClass) { return new Builder(applicationClass).build(); }
/** * Create a new servlet deployment context builder for a JAX-RS / Jersey application instance. * * @param applicationClass a JAX-RS / Jersey application to be tested. * @return new servlet deployment context builder instance associated with the JAX-RS / Jersey application to be tested. * * @throws java.lang.NullPointerException in case the {@code applicationClass} is {@code null}. */ public static Builder builder(final Class<? extends Application> applicationClass) { return new Builder(applicationClass); }
/** * Create new servlet deployment context builder initialized from the supplied initialization parameters. * * @param initParams a map of initialization parameters. The parameters will be copied. * @return new servlet deployment context builder instance initialized from the supplied initialization parameters. * * @throws java.lang.NullPointerException is the specified map is {@code null}. */ public static Builder builder(final Map<String, String> initParams) { return new Builder().initParams(initParams); }
/** * Create a new servlet deployment context builder for a JAX-RS / Jersey application instance. * * @param application a JAX-RS / Jersey application to be tested. * @return new servlet deployment context builder instance associated with the JAX-RS / Jersey application to be tested. * * @throws java.lang.NullPointerException in case the {@code application} is {@code null}. */ public static Builder builder(final Application application) { return new Builder(application); }