|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.ws.rs.core.Application
org.glassfish.jersey.server.ResourceConfig
public class ResourceConfig
The resource configuration for configuring a web application.
| Constructor Summary | |
|---|---|
ResourceConfig()
|
|
ResourceConfig(javax.ws.rs.core.Application application)
|
|
ResourceConfig(Class<?>... classes)
|
|
ResourceConfig(Class<? extends javax.ws.rs.core.Application> applicationClass)
|
|
ResourceConfig(ResourceConfig that)
|
|
ResourceConfig(Set<Class<?>> classes)
|
|
| Method Summary | |
|---|---|
ResourceConfig |
addClasses(Class<?>... classes)
Add classes to ResourceConfig. |
ResourceConfig |
addClasses(Set<Class<?>> classes)
Add classes to ResourceConfig. |
ResourceConfig |
addFinder(ResourceFinder resourceFinder)
Add a ResourceFinder to ResourceConfig. |
ResourceConfig |
addModules(org.glassfish.hk2.Module... modules)
Add HK2 modules to ResourceConfig. |
ResourceConfig |
addModules(Set<org.glassfish.hk2.Module> modules)
Add HK2 modules to ResourceConfig. |
ResourceConfig |
addProperties(Map<String,Object> properties)
Add properties to ResourceConfig. |
ResourceConfig |
addResources(ResourceClass... resources)
|
ResourceConfig |
addResources(Set<ResourceClass> resources)
|
ResourceConfig |
addSingletons(Object... singletons)
Add singletons to ResourceConfig. |
ResourceConfig |
addSingletons(Set<Object> singletons)
Add singletons to ResourceConfig. |
ResourceConfig |
files(String... files)
Adds array of file names to scan for providers. |
Set<Class<?>> |
getClasses()
Set of current resource and provider classes. |
ClassLoader |
getClassLoader()
Get resource and provider class loader. |
static String[] |
getElements(String[] elements)
Get a canonical array of String elements from a String array where each entry may contain zero or more elements separated by ';'. |
static String[] |
getElements(String[] elements,
String delimiters)
Get a canonical array of String elements from a String array where each entry may contain zero or more elements separated by characters in delimiters string. |
static String[] |
getElements(String elements,
String delimiters)
Get a canonical array of String elements from a String that may contain zero or more elements separated by characters in delimiters string. |
Map<String,Object> |
getProperties()
|
Object |
getProperty(String name)
|
Set<ResourceClass> |
getResources()
Get programmatically modeled resources. |
Set<Object> |
getSingletons()
Set of singletons. |
boolean |
isProperty(String name)
|
ResourceConfig |
packages(String... packages)
Adds array of package names which will be used to scan for providers. |
static ResourceBuilder |
resourceBuilder()
|
ResourceConfig |
setClassLoader(ClassLoader classLoader)
Set ClassLoader which will be used for resource discovery. |
ResourceConfig |
setProperty(String name,
Object value)
Set a ResourceConfig property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceConfig()
public ResourceConfig(javax.ws.rs.core.Application application)
public ResourceConfig(Class<? extends javax.ws.rs.core.Application> applicationClass)
public ResourceConfig(Set<Class<?>> classes)
public ResourceConfig(Class<?>... classes)
public ResourceConfig(ResourceConfig that)
| Method Detail |
|---|
public static ResourceBuilder resourceBuilder()
public ResourceConfig addClasses(Set<Class<?>> classes)
ResourceConfig.
classes - list of classes to add.
public final ResourceConfig addClasses(Class<?>... classes)
ResourceConfig.
classes - Set of classes to add.
public ResourceConfig addSingletons(Set<Object> singletons)
ResourceConfig.
singletons - Set of instances to add.
public final ResourceConfig addSingletons(Object... singletons)
ResourceConfig.
singletons - list of instances to add.
public final ResourceConfig addResources(ResourceClass... resources)
public ResourceConfig addResources(Set<ResourceClass> resources)
public ResourceConfig setProperty(String name,
Object value)
ResourceConfig property.
name - property name.value - property value.
public ResourceConfig addProperties(Map<String,Object> properties)
ResourceConfig.
If any of the added properties exists already, he values of the existing
properties will be replaced with new values.
properties - properties to add.
public ResourceConfig addFinder(ResourceFinder resourceFinder)
ResourceFinder to ResourceConfig.
resourceFinder - ResourceFinder
public ResourceConfig addModules(Set<org.glassfish.hk2.Module> modules)
HK2 modules to ResourceConfig.
These modules will be added when creating Services instance.
modules - custom modules.
public final ResourceConfig addModules(org.glassfish.hk2.Module... modules)
HK2 modules to ResourceConfig.
These modules will be added when creating Services instance.
modules - custom modules.
public ResourceConfig setClassLoader(ClassLoader classLoader)
ClassLoader which will be used for resource discovery.
classLoader - provided ClassLoader.
public final ResourceConfig packages(String... packages)
packages - array of package names
public final ResourceConfig files(String... files)
files - array of file names.
public final Set<Class<?>> getClasses()
Set of current resource and provider classes.
Any modification to this list won't be reflected anywhere.
set.
getClasses in class javax.ws.rs.core.ApplicationSet of resource and provider classes.public final Set<Object> getSingletons()
Set of singletons.
Any modification to this list won't be reflected anywhere.
set.
getSingletons in class javax.ws.rs.core.ApplicationSet of singletons.public final Set<ResourceClass> getResources()
public final ClassLoader getClassLoader()
public final Map<String,Object> getProperties()
getProperties in interface FeaturesAndPropertiespublic final Object getProperty(String name)
getProperty in interface FeaturesAndPropertiespublic final boolean isProperty(String name)
isProperty in interface FeaturesAndPropertiespublic static String[] getElements(String[] elements)
elements - an array where each String entry may contain zero or more
ServerProperties.COMMON_DELIMITERS separated elements.
public static String[] getElements(String[] elements,
String delimiters)
elements - an array where each String entry may contain zero or more
delimiters separated elements.delimiters - string with delimiters, every character represents one
delimiter.
public static String[] getElements(String elements,
String delimiters)
elements - a String that may contain zero or more
delimiters separated elements.delimiters - string with delimiters, every character represents one
delimiter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||