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 Stringprivate ClassLoaderprivate final Set<ResourceFinder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringGet 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.voidregisterFinder(ResourceFinder resourceFinder) voidregisterResources(Set<Resource> resources) voidsetApplicationName(String applicationName) voidsetClassLoader(ClassLoader classLoader) Methods inherited from class 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, setPropertiesMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.ws.rs.core.Configuration
getClasses, getContracts, getInstances, getProperties, getProperty, getPropertyNames, getRuntimeType, isEnabled, isEnabled, isRegistered, isRegisteredMethods inherited from interface 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:CommonConfigAn 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:
getModelEnhancerin 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:CommonConfigLoad 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:
loadFromin 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:ServerConfigGet programmatically modeled resources.- Specified by:
getResourcesin interfaceServerConfig- Returns:
- programmatically modeled resources.
-
getConfiguration
- Specified by:
getConfigurationin interfacejavax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>- Overrides:
getConfigurationin 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
-