Package com.sun.jersey.api.core

Examples of com.sun.jersey.api.core.DefaultResourceConfig


    super.init(config);
  }

  @Override
  protected ResourceConfig getDefaultResourceConfig(Map<String, Object> props, WebConfig webConfig) throws ServletException {
    DefaultResourceConfig cfg = new DefaultResourceConfig();
    if (props.containsKey(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS) == false) {
      props.put(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS, new ArrayList<Object>(Arrays.asList(new HttpMethodFilter(), new UrlSuffixFilter())));
    }
    if (props.containsKey(ResourceConfig.PROPERTY_CONTAINER_RESPONSE_FILTERS) == false) {
      props.put(ResourceConfig.PROPERTY_CONTAINER_RESPONSE_FILTERS, new ArrayList<Object>(Arrays.asList(new NoCachingFilter())));
    }
    cfg.setPropertiesAndFeatures(props);
    return cfg;
  }
View Full Code Here


    public static <A> A createContainer(Class<A> type, Class<?>... resourceClasses)
    throws ContainerException, IllegalArgumentException {
        Set<Class<?>> resourceClassesSet = new HashSet<Class<?>>(
                Arrays.asList(resourceClasses));
       
        return createContainer(type, new DefaultResourceConfig(resourceClassesSet),
                null);
    }
View Full Code Here

     * @throws IllegalArgumentException if no container provider supports the type.
     */
    @SuppressWarnings("unchecked")
    public static <A> A createContainer(Class<A> type, Set<Class<?>> resourceClasses)
    throws ContainerException, IllegalArgumentException {
        return createContainer(type, new DefaultResourceConfig(resourceClasses),
                null);
    }
View Full Code Here

TOP

Related Classes of com.sun.jersey.api.core.DefaultResourceConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.