Package org.glassfish.jersey.spi
Interface ExternalConfigurationModel<CONFIG>
-
- Type Parameters:
CONFIG
- type of an external config
- All Superinterfaces:
Configuration
,ExtendedConfig
public interface ExternalConfigurationModel<CONFIG> extends ExtendedConfig
Model of configuration for external properties. Requires certain utilities methods to be implemented
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
as(String name, Class<T> clazz)
Get value of a property as a definite type property shall exist in order for this method to be used.CONFIG
getConfig()
Obtain config object<T> Optional<T>
getOptionalProperty(String name, Class<T> clazz)
Get value of a property as a definite type property may not exist, an empty Optional object is returned in case of an empty propertyExternalConfigurationModel
mergeProperties(Map<String,Object> inputProperties)
Merge properties from other (found) external configuration.-
Methods inherited from interface jakarta.ws.rs.core.Configuration
getClasses, getContracts, getInstances, getProperties, getProperty, getPropertyNames, getRuntimeType, hasProperty, isEnabled, isEnabled, isRegistered, isRegistered
-
Methods inherited from interface org.glassfish.jersey.ExtendedConfig
isProperty
-
-
-
-
Method Detail
-
as
<T> T as(String name, Class<T> clazz)
Get value of a property as a definite type property shall exist in order for this method to be used. Otherwise exception is thrown- Type Parameters:
T
- type of an expected value- Parameters:
name
- property nameclazz
- class type of an expected value- Returns:
- value of an expected type
-
getOptionalProperty
<T> Optional<T> getOptionalProperty(String name, Class<T> clazz)
Get value of a property as a definite type property may not exist, an empty Optional object is returned in case of an empty property- Type Parameters:
T
- type of an expected value- Parameters:
name
- property nameclazz
- class type of an expected value- Returns:
- Optional object filled by a value of an expected type or by the NULL value (
-
mergeProperties
ExternalConfigurationModel mergeProperties(Map<String,Object> inputProperties)
Merge properties from other (found) external configuration.- Parameters:
inputProperties
- those properties will be merged into ours- Returns:
- current instance of the model
-
getConfig
CONFIG getConfig()
Obtain config object- Returns:
- external config provider
-
-