private static class ResourceConfig.State extends CommonConfig implements ServerConfig
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
applicationName |
private java.lang.ClassLoader |
classLoader |
private java.util.Set<ResourceFinder> |
resourceFinders |
private java.util.Set<Resource> |
resources |
private java.util.Set<Resource> |
resourcesView |
| Constructor and Description |
|---|
State() |
State(ResourceConfig.State original) |
| Modifier and Type | Method and Description |
|---|---|
private java.lang.String |
getApplicationName() |
java.lang.ClassLoader |
getClassLoader()
Get resource and provider class loader.
|
ServerConfig |
getConfiguration() |
protected Inflector<ContractProvider.Builder,ContractProvider> |
getModelEnhancer(java.lang.Class<?> componentClass)
An extension point that provides a way how to define a custom enhancement/update
operation of a contract provider model registration being produced for a given
component class.
|
java.util.Set<ResourceFinder> |
getResourceFinders()
Get the registered resource finders.
|
java.util.Set<Resource> |
getResources()
Get programmatically modeled resources.
|
ResourceConfig.State |
loadFrom(javax.ws.rs.core.Configuration config)
Load the internal configuration state from an externally provided configuration state.
|
void |
registerFinder(ResourceFinder resourceFinder) |
void |
registerResources(java.util.Set<Resource> resources) |
void |
setApplicationName(java.lang.String applicationName) |
void |
setClassLoader(java.lang.ClassLoader classLoader) |
addProperties, configureAutoDiscoverableProviders, configureMetaProviders, equals, getClasses, getComponentBag, getContracts, getInstances, getProperties, getProperty, getPropertyNames, getRuntimeType, hashCode, isEnabled, isEnabled, isProperty, isRegistered, isRegistered, property, register, register, register, register, register, register, register, register, setPropertiesclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisPropertyprivate final java.util.Set<ResourceFinder> resourceFinders
private final java.util.Set<Resource> resources
private final java.util.Set<Resource> resourcesView
private volatile java.lang.String applicationName
private volatile java.lang.ClassLoader classLoader
public State()
public State(ResourceConfig.State original)
public void setClassLoader(java.lang.ClassLoader classLoader)
public void setApplicationName(java.lang.String applicationName)
public void registerResources(java.util.Set<Resource> resources)
public void registerFinder(ResourceFinder resourceFinder)
protected Inflector<ContractProvider.Builder,ContractProvider> getModelEnhancer(java.lang.Class<?> componentClass)
CommonConfigDerived implementations may use this method to e.g. filter out all contracts not applicable in the given configuration context or change the model scope. The returned set of filtered contracts is then used for the actual provider registration.
getModelEnhancer in class CommonConfigcomponentClass - class of the component being registered.public ResourceConfig.State loadFrom(javax.ws.rs.core.Configuration config)
CommonConfigloadFrom in class CommonConfigconfig - external configuration state to replace the configuration of this configurable instance.public final java.util.Set<Resource> getResources()
ServerConfiggetResources in interface ServerConfigpublic ServerConfig getConfiguration()
getConfiguration in interface javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>getConfiguration in class CommonConfigpublic java.util.Set<ResourceFinder> getResourceFinders()
public java.lang.ClassLoader getClassLoader()
private java.lang.String getApplicationName()