Search in sources :

Example 1 with APIThrottleDataServiceImpl

use of org.wso2.carbon.apimgt.gateway.service.APIThrottleDataServiceImpl in project carbon-apimgt by wso2.

the class ServerStartupListener method completedServerStartup.

@Override
public void completedServerStartup() {
    // This prevents errors in an All in one setup caused by the ThrottleDataPublisher trying to connect to the
    // event receiver, before the event receiver has been started on completion of server startup.
    ServiceReferenceHolder.getInstance().setThrottleDataPublisher(new ThrottleDataPublisher());
    ThrottleDataHolder throttleDataHolder = new ThrottleDataHolder();
    APIThrottleDataServiceImpl throttleDataServiceImpl = new APIThrottleDataServiceImpl(throttleDataHolder);
    CacheInvalidationService cacheInvalidationService = new CacheInvalidationServiceImpl();
    // Register APIThrottleDataService so that ThrottleData maps are available to other components.
    ServiceReferenceHolder.getInstance().setCacheInvalidationService(cacheInvalidationService);
    ServiceReferenceHolder.getInstance().setAPIThrottleDataService(throttleDataServiceImpl);
    ServiceReferenceHolder.getInstance().setThrottleDataHolder(throttleDataHolder);
    ServiceReferenceHolder.getInstance().setRevokedTokenService(new RevokedTokenDataImpl());
    SubscriptionsDataService subscriptionsDataService = new SubscriptionsDataServiceImpl();
    ServiceReferenceHolder.getInstance().setSubscriptionsDataService(subscriptionsDataService);
    log.debug("APIThrottleDataService Registered...");
}
Also used : CacheInvalidationServiceImpl(org.wso2.carbon.apimgt.impl.caching.CacheInvalidationServiceImpl) RevokedTokenDataImpl(org.wso2.carbon.apimgt.gateway.service.RevokedTokenDataImpl) ThrottleDataHolder(org.wso2.carbon.apimgt.gateway.throttling.ThrottleDataHolder) APIThrottleDataServiceImpl(org.wso2.carbon.apimgt.gateway.service.APIThrottleDataServiceImpl) ThrottleDataPublisher(org.wso2.carbon.apimgt.gateway.throttling.publisher.ThrottleDataPublisher) SubscriptionsDataService(org.wso2.carbon.apimgt.impl.webhooks.SubscriptionsDataService) SubscriptionsDataServiceImpl(org.wso2.carbon.apimgt.gateway.webhooks.SubscriptionsDataServiceImpl) CacheInvalidationService(org.wso2.carbon.apimgt.impl.caching.CacheInvalidationService)

Aggregations

APIThrottleDataServiceImpl (org.wso2.carbon.apimgt.gateway.service.APIThrottleDataServiceImpl)1 RevokedTokenDataImpl (org.wso2.carbon.apimgt.gateway.service.RevokedTokenDataImpl)1 ThrottleDataHolder (org.wso2.carbon.apimgt.gateway.throttling.ThrottleDataHolder)1 ThrottleDataPublisher (org.wso2.carbon.apimgt.gateway.throttling.publisher.ThrottleDataPublisher)1 SubscriptionsDataServiceImpl (org.wso2.carbon.apimgt.gateway.webhooks.SubscriptionsDataServiceImpl)1 CacheInvalidationService (org.wso2.carbon.apimgt.impl.caching.CacheInvalidationService)1 CacheInvalidationServiceImpl (org.wso2.carbon.apimgt.impl.caching.CacheInvalidationServiceImpl)1 SubscriptionsDataService (org.wso2.carbon.apimgt.impl.webhooks.SubscriptionsDataService)1