Search in sources :

Example 1 with OSGIServiceRegistration

use of org.killbill.billing.osgi.api.OSGIServiceRegistration in project killbill by killbill.

the class PaymentModule method configure.

@Override
protected void configure() {
    final ConfigurationObjectFactory factory = new ConfigurationObjectFactory(skifeConfigSource);
    final PaymentConfig paymentConfig = factory.build(PaymentConfig.class);
    bind(PaymentConfig.class).annotatedWith(Names.named(STATIC_CONFIG)).toInstance(paymentConfig);
    bind(PaymentConfig.class).to(MultiTenantPaymentConfig.class).asEagerSingleton();
    bind(new TypeLiteral<OSGIServiceRegistration<PaymentPluginApi>>() {
    }).toProvider(DefaultPaymentProviderPluginRegistryProvider.class).asEagerSingleton();
    bind(new TypeLiteral<OSGIServiceRegistration<PaymentControlPluginApi>>() {
    }).toProvider(DefaultPaymentControlProviderPluginRegistryProvider.class).asEagerSingleton();
    bind(PaymentPluginServiceRegistration.class).asEagerSingleton();
    bind(PaymentApi.class).to(DefaultPaymentApi.class).asEagerSingleton();
    bind(PaymentGatewayApi.class).to(DefaultPaymentGatewayApi.class).asEagerSingleton();
    bind(AdminPaymentApi.class).to(DefaultAdminPaymentApi.class).asEagerSingleton();
    bind(PaymentBusEventHandler.class).asEagerSingleton();
    bind(PaymentTagHandler.class).asEagerSingleton();
    bind(PaymentService.class).to(DefaultPaymentService.class).asEagerSingleton();
    bind(PaymentExecutors.class).asEagerSingleton();
    installPaymentProviderPlugins(paymentConfig);
    installPaymentDao();
    installProcessors(paymentConfig);
    installStateMachines();
    installAutomatonRunner();
    installRetryEngines();
    installJanitor();
}
Also used : DefaultPaymentGatewayApi(org.killbill.billing.payment.api.DefaultPaymentGatewayApi) OSGIServiceRegistration(org.killbill.billing.osgi.api.OSGIServiceRegistration) ConfigurationObjectFactory(org.skife.config.ConfigurationObjectFactory) DefaultAdminPaymentApi(org.killbill.billing.payment.api.DefaultAdminPaymentApi) MultiTenantPaymentConfig(org.killbill.billing.payment.config.MultiTenantPaymentConfig) PaymentPluginServiceRegistration(org.killbill.billing.payment.core.PaymentPluginServiceRegistration) PaymentBusEventHandler(org.killbill.billing.payment.bus.PaymentBusEventHandler) PaymentTagHandler(org.killbill.billing.payment.invoice.PaymentTagHandler) PaymentExecutors(org.killbill.billing.payment.core.PaymentExecutors) PaymentConfig(org.killbill.billing.util.config.definition.PaymentConfig) MultiTenantPaymentConfig(org.killbill.billing.payment.config.MultiTenantPaymentConfig) DefaultPaymentApi(org.killbill.billing.payment.api.DefaultPaymentApi)

Example 2 with OSGIServiceRegistration

use of org.killbill.billing.osgi.api.OSGIServiceRegistration in project killbill by killbill.

the class CurrencyModule method configure.

@Override
protected void configure() {
    final ConfigurationObjectFactory factory = new ConfigurationObjectFactory(skifeConfigSource);
    final CurrencyConfig currencyConfig = factory.build(CurrencyConfig.class);
    bind(CurrencyConfig.class).toInstance(currencyConfig);
    bind(new TypeLiteral<OSGIServiceRegistration<CurrencyPluginApi>>() {
    }).toProvider(DefaultCurrencyProviderPluginRegistryProvider.class).asEagerSingleton();
    bind(CurrencyConversionApi.class).to(DefaultCurrencyConversionApi.class).asEagerSingleton();
    bind(CurrencyService.class).to(DefaultCurrencyService.class).asEagerSingleton();
}
Also used : DefaultCurrencyService(org.killbill.billing.currency.DefaultCurrencyService) OSGIServiceRegistration(org.killbill.billing.osgi.api.OSGIServiceRegistration) DefaultCurrencyConversionApi(org.killbill.billing.currency.api.DefaultCurrencyConversionApi) ConfigurationObjectFactory(org.skife.config.ConfigurationObjectFactory) CurrencyConfig(org.killbill.billing.util.config.definition.CurrencyConfig)

Aggregations

OSGIServiceRegistration (org.killbill.billing.osgi.api.OSGIServiceRegistration)2 ConfigurationObjectFactory (org.skife.config.ConfigurationObjectFactory)2 DefaultCurrencyService (org.killbill.billing.currency.DefaultCurrencyService)1 DefaultCurrencyConversionApi (org.killbill.billing.currency.api.DefaultCurrencyConversionApi)1 DefaultAdminPaymentApi (org.killbill.billing.payment.api.DefaultAdminPaymentApi)1 DefaultPaymentApi (org.killbill.billing.payment.api.DefaultPaymentApi)1 DefaultPaymentGatewayApi (org.killbill.billing.payment.api.DefaultPaymentGatewayApi)1 PaymentBusEventHandler (org.killbill.billing.payment.bus.PaymentBusEventHandler)1 MultiTenantPaymentConfig (org.killbill.billing.payment.config.MultiTenantPaymentConfig)1 PaymentExecutors (org.killbill.billing.payment.core.PaymentExecutors)1 PaymentPluginServiceRegistration (org.killbill.billing.payment.core.PaymentPluginServiceRegistration)1 PaymentTagHandler (org.killbill.billing.payment.invoice.PaymentTagHandler)1 CurrencyConfig (org.killbill.billing.util.config.definition.CurrencyConfig)1 PaymentConfig (org.killbill.billing.util.config.definition.PaymentConfig)1