Repository: deltaspike Updated Branches: refs/heads/master 06c3b1445 -> bb5ee1e69
improve JavaDoc for ConfigProvider Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/b7a37792 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/b7a37792 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/b7a37792 Branch: refs/heads/master Commit: b7a37792c09ebc2e85e0d9e5213cac9685b8208c Parents: 06c3b14 Author: Mark Struberg <strub...@apache.org> Authored: Tue Jun 5 12:57:29 2018 +0200 Committer: Mark Struberg <strub...@apache.org> Committed: Tue Jun 5 12:57:29 2018 +0200 ---------------------------------------------------------------------- .../core/api/config/ConfigResolver.java | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/b7a37792/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java ---------------------------------------------------------------------- diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java index bd087fc..86a1674 100644 --- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java +++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java @@ -639,12 +639,36 @@ public final class ConfigResolver } + /** + * Provide access to the underlying {@link Config} instance. + * + */ public interface ConfigProvider { + /** + * Return either an existing Config associated with the current TCCL or a + * new Config and associate it with the TCCL. + * + * @return the Config associated with the current ThreadContextClassLoader + */ Config getConfig(); + /** + * Return either an existing Config associated with the given ClassLoader or a + * new Config and associate it with the given ClassLoader. + * + * @return the Config associated with the given ClassLoader + */ Config getConfig(ClassLoader cl); + /** + * Release the Config associated with the given ClassLoader. + * This will also properly close all the ConfigSources, Converters, etc + * managed by this Config. + * + * ATTENTION: Usually this method doesn't need to be invoked manually! + * It will automatically get invoked in BeforeShutdown via our ConfigExtension internally. + */ void releaseConfig(ClassLoader cl); }