Class PropertyFileServiceImpl
java.lang.Object
org.glassfish.hk2.configuration.persistence.properties.internal.PropertyFileServiceImpl
- All Implemented Interfaces:
PropertyFileService
-
Field Summary
FieldsFields inherited from interface org.glassfish.hk2.configuration.persistence.properties.PropertyFileService
DEFAULT_INSTANCE_NAME, DEFAULT_TYPE_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyFileBean
(PropertyFileBean propertyFileBean) This is a utility method that will add the givenPropertyFileBean
to the Hub for use in configuring this serviceCreates a PropertyFileHandle for reading an HK2 property file.createPropertyHandleOfAnyType
(String defaultTypeName, String defaultInstanceName) Creates a PropertyFileHandle for reading an HK2 property file.createPropertyHandleOfSpecificType
(String specificTypeName) Creates a PropertyFileHandle for reading an HK2 property file that has a specific type name.createPropertyHandleOfSpecificType
(String specificTypeName, String defaultInstanceName) Creates a PropertyFileHandle for reading an HK2 property file that has a specific type name.void
This is a utility method that will remove thePropertyFileBean
from the Hub if it is present
-
Field Details
-
MAX_TRIES
private static final int MAX_TRIES- See Also:
-
hub
-
-
Constructor Details
-
PropertyFileServiceImpl
public PropertyFileServiceImpl()
-
-
Method Details
-
createPropertyHandleOfSpecificType
public PropertyFileHandle createPropertyHandleOfSpecificType(String specificTypeName, String defaultInstanceName) Description copied from interface:PropertyFileService
Creates a PropertyFileHandle for reading an HK2 property file that has a specific type name. This is generally used for property files that provide a specific set of instances for a single type. The default instance name will be set to the defaultInstanceName given- Specified by:
createPropertyHandleOfSpecificType
in interfacePropertyFileService
- Parameters:
specificTypeName
- The non-null, non-empty string specific type name. All instances created or modified with this PropertyFileHandle will be in this typedefaultInstanceName
- The default name to give to instances of this type if the instance name cannot be determined. If null or the empty string then the default default instance of DEFAULT will be used- Returns:
- A non-null PropertyFileHandle that can be used to read the property file
-
createPropertyHandleOfSpecificType
Description copied from interface:PropertyFileService
Creates a PropertyFileHandle for reading an HK2 property file that has a specific type name. This is generally used for property files that provide a specific set of instances for a single type- Specified by:
createPropertyHandleOfSpecificType
in interfacePropertyFileService
- Parameters:
specificTypeName
- The non-null, non-empty string specific type name. All instances created or modified with this PropertyFileHandle will be in this type- Returns:
- A non-null PropertyFileHandle that can be used to read the property file
-
createPropertyHandleOfAnyType
public PropertyFileHandle createPropertyHandleOfAnyType(String defaultTypeName, String defaultInstanceName) Description copied from interface:PropertyFileService
Creates a PropertyFileHandle for reading an HK2 property file. This is used for property files that provide instances of multiple types within the same property file- Specified by:
createPropertyHandleOfAnyType
in interfacePropertyFileService
- Parameters:
defaultTypeName
- The default type name that will be used if a type name could not be determined. If null or empty the default type name of DEFAULT_TYPE will be useddefaultInstanceName
- The default name to give to instances of this type if the instance name cannot be determined. If null or the empty string then the default default instance of DEFAULT will be used- Returns:
- A non-null PropertyFileHandle that can be used to read the property file
-
createPropertyHandleOfAnyType
Description copied from interface:PropertyFileService
Creates a PropertyFileHandle for reading an HK2 property file. This is used for property files that provide instances of multiple types within the same property file. Will use the default type name of DEFAULT_TYPE for types that cannot be determined and the default instance name of DEFAULT for instance names that cannot be determined- Specified by:
createPropertyHandleOfAnyType
in interfacePropertyFileService
- Returns:
- A non-null PropertyFileHandle that can be used to read the property file
-
addPropertyFileBean
Description copied from interface:PropertyFileService
This is a utility method that will add the givenPropertyFileBean
to the Hub for use in configuring this service- Specified by:
addPropertyFileBean
in interfacePropertyFileService
- Parameters:
propertyFileBean
- The non-null property file bean that should either be added to the Hub or be used to modify the existing bean in the hub
-
removePropertyFileBean
public void removePropertyFileBean()Description copied from interface:PropertyFileService
This is a utility method that will remove thePropertyFileBean
from the Hub if it is present- Specified by:
removePropertyFileBean
in interfacePropertyFileService
-