@Override public void start(final BundleContext context) throws Exception { // Tracked resource killbillAPI = new OSGIKillbillAPI(context); logService = new OSGIKillbillLogService(context); dataSource = new OSGIKillbillDataSource(context); dispatcher = new OSGIKillbillEventDispatcher(context); // Registrar for bundle registrar = new OSGIKillbillRegistrar(); // Killbill events final OSGIKillbillEventHandler handler = getOSGIKillbillEventHandler(); if (handler != null) { dispatcher.registerEventHandler(handler); } }
@Override public SubscriptionApi getSubscriptionApi() { return withServiceTracker(killbillTracker, new APICallback<SubscriptionApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public SubscriptionApi executeWithService(final OSGIKillbill service) { return service.getSubscriptionApi(); } }); }
public DataSource getDataSource() { return withServiceTracker(dataSourceTracker, new APICallback<DataSource, DataSource>(DATASOURCE_SERVICE_NAME) { @Override public DataSource executeWithService(final DataSource service) { return dataSourceTracker.getService(); } }); } }
@Override public void log(final int level, final String message) { logInternal(level, message, null); }
@Override public void start(final BundleContext context) throws Exception { // Tracked resource killbillAPI = new OSGIKillbillAPI(context); logService = new OSGIKillbillLogService(context); dataSource = new OSGIKillbillDataSource(context); dispatcher = new OSGIKillbillEventDispatcher(context); // Registrar for bundle registrar = new OSGIKillbillRegistrar(); // Killbill events final OSGIKillbillEventHandler handler = getOSGIKillbillEventHandler(); if (handler != null) { dispatcher.registerEventHandler(handler); } }
@Override public InvoiceUserApi getInvoiceUserApi() { return withServiceTracker(killbillTracker, new APICallback<InvoiceUserApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public InvoiceUserApi executeWithService(final OSGIKillbill service) { return service.getInvoiceUserApi(); } }); }
public DataSource getDataSource() { return withServiceTracker(dataSourceTracker, new APICallback<DataSource, DataSource>(DATASOURCE_SERVICE_NAME) { @Override public DataSource executeWithService(final DataSource service) { return dataSourceTracker.getService(); } }); } }
@Override public SubscriptionApi getSubscriptionApi() { return withServiceTracker(killbillTracker, new APICallback<SubscriptionApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public SubscriptionApi executeWithService(final OSGIKillbill service) { return service.getSubscriptionApi(); } }); }
@Override public CustomFieldUserApi getCustomFieldUserApi() { return withServiceTracker(killbillTracker, new APICallback<CustomFieldUserApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public CustomFieldUserApi executeWithService(final OSGIKillbill service) { return service.getCustomFieldUserApi(); } }); }
@Override public RecordIdApi getRecordIdApi() { return withServiceTracker(killbillTracker, new APICallback<RecordIdApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public RecordIdApi executeWithService(final OSGIKillbill service) { return service.getRecordIdApi(); } }); }
@Override public AuditUserApi getAuditUserApi() { return withServiceTracker(killbillTracker, new APICallback<AuditUserApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public AuditUserApi executeWithService(final OSGIKillbill service) { return service.getAuditUserApi(); } }); }
@Override public PluginConfigServiceApi getPluginConfigServiceApi() { return withServiceTracker(killbillTracker, new APICallback<PluginConfigServiceApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public PluginConfigServiceApi executeWithService(final OSGIKillbill service) { return service.getPluginConfigServiceApi(); } }); } }
@Override public InvoicePaymentApi getInvoicePaymentApi() { return withServiceTracker(killbillTracker, new APICallback<InvoicePaymentApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public InvoicePaymentApi executeWithService(final OSGIKillbill service) { return service.getInvoicePaymentApi(); } }); }
@Override public PaymentApi getPaymentApi() { return withServiceTracker(killbillTracker, new APICallback<PaymentApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public PaymentApi executeWithService(final OSGIKillbill service) { return service.getPaymentApi(); } }); }
@Override public EntitlementApi getEntitlementApi() { return withServiceTracker(killbillTracker, new APICallback<EntitlementApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public EntitlementApi executeWithService(final OSGIKillbill service) { return service.getEntitlementApi(); } }); }
@Override public CatalogUserApi getCatalogUserApi() { return withServiceTracker(killbillTracker, new APICallback<CatalogUserApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public CatalogUserApi executeWithService(final OSGIKillbill service) { return service.getCatalogUserApi(); } }); }
@Override public InvoicePaymentApi getInvoicePaymentApi() { return withServiceTracker(killbillTracker, new APICallback<InvoicePaymentApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public InvoicePaymentApi executeWithService(final OSGIKillbill service) { return service.getInvoicePaymentApi(); } }); }
@Override public AuditUserApi getAuditUserApi() { return withServiceTracker(killbillTracker, new APICallback<AuditUserApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public AuditUserApi executeWithService(final OSGIKillbill service) { return service.getAuditUserApi(); } }); }
@Override public CurrencyConversionApi getCurrencyConversionApi() { return withServiceTracker(killbillTracker, new APICallback<CurrencyConversionApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public CurrencyConversionApi executeWithService(final OSGIKillbill service) { return service.getCurrencyConversionApi(); } }); }
@Override public PluginConfigServiceApi getPluginConfigServiceApi() { return withServiceTracker(killbillTracker, new APICallback<PluginConfigServiceApi, OSGIKillbill>(KILLBILL_SERVICE_NAME) { @Override public PluginConfigServiceApi executeWithService(final OSGIKillbill service) { return service.getPluginConfigServiceApi(); } }); } }