All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.trendyol.kediatr.CommandProvider.kt Maven / Gradle / Ivy

package com.trendyol.kediatr

/**
 * CommandProvider creates a command handler with enabled spring injection.
 *
 * @param  type of handler
 */
internal class CommandProvider>(
  private val dependencyProvider: DependencyProvider,
  private val type: Class
) {
  fun get(): H {
    return dependencyProvider.getSingleInstanceOf(type)
  }
}

/**
 * CommandProvider creates a command handler with enabled spring injection.
 *
 * @since 1.0.16
 * @param  type of handler
 */
internal class CommandWithResultProvider>(
  private val dependencyProvider: DependencyProvider,
  private val type: Class
) {
  fun get(): H {
    return dependencyProvider.getSingleInstanceOf(type)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy