Class BatchSPIManager


  • public final class BatchSPIManager
    extends Object
    • Method Detail

      • getInstance

        public static BatchSPIManager getInstance()
        Returns:
        singleton instance
      • getBatchJobUtil

        public BatchJobUtil getBatchJobUtil()
        Returns:
        The most recently set BatchJobUtil
      • getBatchSecurityHelper

        public BatchSecurityHelper getBatchSecurityHelper()
        Returns:
        The most recently set BatchSecurityHelper
      • getPlatformMode

        public BatchSPIManager.PlatformMode getPlatformMode()
        Returns the EEMode set via this SPI, if one has been set. A value of TRUE signifes EE mode while a value of FALSE signifies SE mode. Here null is a significant value since we don't default at this level of config. I.e., a null value here means that the mode will be set by some other level of config (possibly defaulting at that level).
        Returns:
        the EEMode set via this SPI, or 'null' if one has not been set.
      • getExecutorServiceProvider

        public ExecutorServiceProvider getExecutorServiceProvider()
        Returns:
        The most recently set ExecutorServiceProvider
      • getBatchContainerOverrideProperties

        public Properties getBatchContainerOverrideProperties()
      • registerBatchJobUtil

        public void registerBatchJobUtil​(BatchJobUtil helper)
        May be called at any point and will be immediately reflected in the singleton, i.e. getBatchJobUtil() will return this.
        Parameters:
        helper - impl
      • registerBatchSecurityHelper

        public void registerBatchSecurityHelper​(BatchSecurityHelper helper)
        May be called at any point and will be immediately reflected in the singleton, i.e. getBatchSecurityHelper() will return this.
        Parameters:
        helper - impl
      • registerPlatformMode

        public void registerPlatformMode​(BatchSPIManager.PlatformMode mode)
        Override properties-file based config with programmatic setting of SE or EE platform mode. Note that by not calling this method, we do not get a given default behavior, we simply defer to looking at other config mechanisms (properties files, etc.)
        Parameters:
        mode - - Configures the batch runtime in EE mode or SE mode.
      • registerExecutorServiceProvider

        public void registerExecutorServiceProvider​(ExecutorServiceProvider provider)
        May be called at any point and will be immediately reflected in the singleton, i.e. getExecutorServiceProvider() will return this.
        Parameters:
        provider - impl
      • registerBatchContainerOverrideProperties

        public void registerBatchContainerOverrideProperties​(Properties properties)
        Override container properties read from META-INF
        Parameters:
        properties - The Properties to use as overrides.
      • getDataBaseConfigurationBean

        public DatabaseConfigurationBean getDataBaseConfigurationBean()
        This is not the method that the jbatch implementation will call to get the final configuration, and lock off further updates. This is just a normal getter which is more use while the configuration is still being set, before it is hardened.
        Returns:
        the last-set DatabaseConfigurationBean
        See Also:
        getFinalDatabaseConfiguration()
      • registerDatabaseConfigurationBean

        public void registerDatabaseConfigurationBean​(DatabaseConfigurationBean bean)
                                               throws DatabaseAlreadyInitializedException
        This only will have an impact if the batch container has not already hardened its persistent store database configuration. There is no ability to dynamically update the configuration, so if this call comes in after the lazy initialization, it is too late.
        Parameters:
        bean - The batch runtime database configuration to use.
        Throws:
        DatabaseAlreadyInitializedException - If configuration has already been queried by the batch runtime.
      • getFinalDatabaseConfiguration

        public DatabaseConfigurationBean getFinalDatabaseConfiguration()
        Called by the core batch runtime at the point when it is ready to harden the database configuration.
        Returns:
        The batch runtime database configuration, if set, or null if not set.