Package org.glassfish.jersey.server
Class ResourceConfig.State
java.lang.Object
org.glassfish.jersey.model.internal.CommonConfig
org.glassfish.jersey.server.ResourceConfig.State
- All Implemented Interfaces:
javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>
,javax.ws.rs.core.Configuration
,javax.ws.rs.core.FeatureContext
,ExtendedConfig
,ServerConfig
- Direct Known Subclasses:
ResourceConfig.ImmutableState
- Enclosing class:
ResourceConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private ClassLoader
private final Set
<ResourceFinder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
Get resource and provider class loader.protected Inflector
<ContractProvider.Builder, ContractProvider> getModelEnhancer
(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.Get the registered resource finders.Get programmatically modeled resources.loadFrom
(javax.ws.rs.core.Configuration config) Load the internal configuration state from an externally provided configuration state.void
registerFinder
(ResourceFinder resourceFinder) void
registerResources
(Set<Resource> resources) void
setApplicationName
(String applicationName) void
setClassLoader
(ClassLoader classLoader) Methods inherited from class org.glassfish.jersey.model.internal.CommonConfig
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, setProperties
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.ws.rs.core.Configuration
getClasses, getContracts, getInstances, getProperties, getProperty, getPropertyNames, getRuntimeType, isEnabled, isEnabled, isRegistered, isRegistered
Methods inherited from interface org.glassfish.jersey.ExtendedConfig
isProperty
-
Field Details
-
resourceFinders
-
resources
-
resourcesView
-
applicationName
-
classLoader
-
-
Constructor Details
-
State
public State() -
State
-
-
Method Details
-
setClassLoader
-
setApplicationName
-
registerResources
-
registerFinder
-
getModelEnhancer
protected Inflector<ContractProvider.Builder,ContractProvider> getModelEnhancer(Class<?> componentClass) Description copied from class:CommonConfig
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. Default implementation return an enhancer just builds the model.Derived 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.
- Overrides:
getModelEnhancer
in classCommonConfig
- Parameters:
componentClass
- class of the component being registered.- Returns:
- filter for the contracts that being registered for a given component class.
-
loadFrom
Description copied from class:CommonConfig
Load the internal configuration state from an externally provided configuration state. Calling this method effectively replaces existing configuration state of the instance with the state represented by the externally provided configuration. If the features, auto-discoverables of given config has been already configured then this method will make sure to not configure them for the second time.- Overrides:
loadFrom
in classCommonConfig
- Parameters:
config
- external configuration state to replace the configuration of this configurable instance.- Returns:
- the updated common configuration instance.
-
getResources
Description copied from interface:ServerConfig
Get programmatically modeled resources.- Specified by:
getResources
in interfaceServerConfig
- Returns:
- programmatically modeled resources.
-
getConfiguration
- Specified by:
getConfiguration
in interfacejavax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>
- Overrides:
getConfiguration
in classCommonConfig
-
getResourceFinders
Get the registered resource finders.- Returns:
- registered resource finders.
-
getClassLoader
Get resource and provider class loader.- Returns:
- class loader to be used when looking up the resource classes and providers.
-
getApplicationName
-