com.sun.jersey.api.core
Class ClasspathResourceConfig

java.lang.Object
  extended by javax.ws.rs.core.Application
      extended by com.sun.jersey.api.core.ResourceConfig
          extended by com.sun.jersey.api.core.DefaultResourceConfig
              extended by com.sun.jersey.api.core.ClasspathResourceConfig
All Implemented Interfaces:
FeaturesAndProperties

public class ClasspathResourceConfig
extends DefaultResourceConfig

A mutable implementation of DefaultResourceConfig that dynamically searches for root resource and provider classes in the files and directories declared by the property PROPERTY_CLASSPATH. That property MUST be included in the map of initial properties passed to the constructor.

Author:
Frank D. Martinez. [email protected]

Field Summary
static java.lang.String PROPERTY_CLASSPATH
          The property value MUST be an instance String or String[].
 
Fields inherited from class com.sun.jersey.api.core.ResourceConfig
FEATURE_CANONICALIZE_URI_PATH, FEATURE_DISABLE_WADL, FEATURE_IMPLICIT_VIEWABLES, FEATURE_MATCH_MATRIX_PARAMS, FEATURE_NORMALIZE_URI, FEATURE_REDIRECT, PROPERTY_CONTAINER_NOTIFIER, PROPERTY_CONTAINER_REQUEST_FILTERS, PROPERTY_CONTAINER_RESPONSE_FILTERS, PROPERTY_DEFAULT_RESOURCE_COMPONENT_PROVIDER_FACTORY_CLASS, PROPERTY_RESOURCE_FILTER_FACTORIES, PROPERTY_WADL_GENERATOR_CONFIG
 
Fields inherited from interface com.sun.jersey.core.util.FeaturesAndProperties
FEATURE_DISABLE_XML_SECURITY
 
Constructor Summary
ClasspathResourceConfig()
           
ClasspathResourceConfig(java.util.Map<java.lang.String,java.lang.Object> props)
           
ClasspathResourceConfig(java.lang.String[] paths)
           
 
Method Summary
 void reload()
          Perform a new search for resource classes and provider classes.
 
Methods inherited from class com.sun.jersey.api.core.DefaultResourceConfig
getClasses, getElements, getExplicitRootResources, getFeature, getFeatures, getLanguageMappings, getMediaTypeMappings, getProperties, getProperty, getSingletons
 
Methods inherited from class com.sun.jersey.api.core.ResourceConfig
getProviderClasses, getProviderSingletons, getRootResourceClasses, getRootResourceSingletons, isProviderClass, isRootResourceClass, setPropertiesAndFeatures, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_CLASSPATH

public static final java.lang.String PROPERTY_CLASSPATH
The property value MUST be an instance String or String[]. Each String instance represents one or more paths that MUST be separated by ';'. Each path MUST be an absolute or relative directory, or a Jar file. The contents of a directory, including Java class files, jars files and sub-directories (recusively) are scanned. The Java class files of a jar file are scanned.

Root resource clases MUST be present in the Java class path.

See Also:
Constant Field Values
Constructor Detail

ClasspathResourceConfig

public ClasspathResourceConfig()

ClasspathResourceConfig

public ClasspathResourceConfig(java.util.Map<java.lang.String,java.lang.Object> props)
Parameters:
props - the property bag that contains the property PROPERTY_CLASSPATH.

ClasspathResourceConfig

public ClasspathResourceConfig(java.lang.String[] paths)
Parameters:
paths - the array paths consisting of either jar files or directories containing jar files for class files.
Method Detail

reload

public void reload()
Perform a new search for resource classes and provider classes.



Copyright © 2009 Sun Microsystems, Inc. All Rights Reserved.