Class MultiBackgroundInitializer.MultiBackgroundInitializerResults

    • Field Detail

      • initializers

        private final java.util.Map<java.lang.String,​BackgroundInitializer<?>> initializers
        A map with the child initializers.
      • resultObjects

        private final java.util.Map<java.lang.String,​java.lang.Object> resultObjects
        A map with the result objects.
      • exceptions

        private final java.util.Map<java.lang.String,​ConcurrentException> exceptions
        A map with the exceptions.
    • Method Detail

      • checkName

        private BackgroundInitializer<?> checkName​(java.lang.String name)
        Checks whether an initializer with the given name exists. If not, throws an exception. If it exists, the associated child initializer is returned.
        Parameters:
        name - the name to check
        Returns:
        the initializer with this name
        Throws:
        java.util.NoSuchElementException - if the name is unknown
      • getException

        public ConcurrentException getException​(java.lang.String name)
        Returns the ConcurrentException object that was thrown by the BackgroundInitializer with the given name. If this initializer did not throw an exception, the return value is null. If the name cannot be resolved, an exception is thrown.
        Parameters:
        name - the name of the BackgroundInitializer
        Returns:
        the exception thrown by this initializer
        Throws:
        java.util.NoSuchElementException - if the name cannot be resolved
      • getResultObject

        public java.lang.Object getResultObject​(java.lang.String name)
        Returns the result object produced by the BackgroundInitializer with the given name. This is the object returned by the initializer's initialize() method. If this BackgroundInitializer caused an exception, null is returned. If the name cannot be resolved, an exception is thrown.
        Parameters:
        name - the name of the BackgroundInitializer
        Returns:
        the result object produced by this BackgroundInitializer
        Throws:
        java.util.NoSuchElementException - if the name cannot be resolved
      • initializerNames

        public java.util.Set<java.lang.String> initializerNames()
        Returns a set with the names of all BackgroundInitializer objects managed by the MultiBackgroundInitializer.
        Returns:
        an (unmodifiable) set with the names of the managed BackgroundInitializer objects
      • isException

        public boolean isException​(java.lang.String name)
        Returns a flag whether the BackgroundInitializer with the given name caused an exception.
        Parameters:
        name - the name of the BackgroundInitializer
        Returns:
        a flag whether this initializer caused an exception
        Throws:
        java.util.NoSuchElementException - if the name cannot be resolved
      • isSuccessful

        public boolean isSuccessful()
        Returns a flag whether the whole initialization was successful. This is the case if no child initializer has thrown an exception.
        Returns:
        a flag whether the initialization was successful