本文整理汇总了Java中org.wso2.carbon.context.PrivilegedCarbonContext.getOSGiService方法的典型用法代码示例。如果您正苦于以下问题:Java PrivilegedCarbonContext.getOSGiService方法的具体用法?Java PrivilegedCarbonContext.getOSGiService怎么用?Java PrivilegedCarbonContext.getOSGiService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.wso2.carbon.context.PrivilegedCarbonContext
的用法示例。
在下文中一共展示了PrivilegedCarbonContext.getOSGiService方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIntegrationClientService
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static IntegrationClientService getIntegrationClientService() {
if (integrationClientService == null) {
synchronized (DeviceMgtAPIUtils.class) {
if (integrationClientService == null) {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
integrationClientService = (IntegrationClientService) ctx.getOSGiService(IntegrationClientService.class, null);
if (integrationClientService == null) {
String msg = "IntegrationClientService is not initialized";
log.error(msg);
throw new IllegalStateException(msg);
}
}
}
}
return integrationClientService;
}
示例2: getUserStoreCountRetrieverService
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static UserStoreCountRetriever getUserStoreCountRetrieverService()
throws UserStoreCounterException, UserStoreException {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
List<Object> countRetrieverFactories = ctx.getOSGiServices(AbstractCountRetrieverFactory.class, null);
RealmService realmService = (RealmService) ctx.getOSGiService(RealmService.class, null);
RealmConfiguration realmConfiguration = realmService.getBootstrapRealmConfiguration();
String userStoreType;
if(DeviceMgtAPIUtils.getUserStoreManager() instanceof JDBCUserStoreManager) {
userStoreType = JDBCCountRetrieverFactory.JDBC;
} else {
userStoreType = InternalCountRetrieverFactory.INTERNAL;
}
AbstractCountRetrieverFactory countRetrieverFactory = null;
for (Object countRetrieverFactoryObj : countRetrieverFactories) {
countRetrieverFactory = (AbstractCountRetrieverFactory) countRetrieverFactoryObj;
if (userStoreType.equals(countRetrieverFactory.getCounterType())) {
break;
}
}
if (countRetrieverFactory == null) {
return null;
}
return countRetrieverFactory.buildCountRetriever(realmConfiguration);
}
示例3: getAnalyticsDataAPI
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
/**
* @return AnalyticthsDataAPI for the context
*/
public static AnalyticsDataAPI getAnalyticsDataAPI() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
AnalyticsDataAPI analyticsDataAPI =
(AnalyticsDataAPI) ctx.getOSGiService(AnalyticsDataAPI.class, null);
if (analyticsDataAPI == null) {
String msg = "Analytics api service has not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return analyticsDataAPI;
}
示例4: getEventPublisherService
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static EventsPublisherService getEventPublisherService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
EventsPublisherService eventsPublisherService =
(EventsPublisherService) ctx.getOSGiService(EventsPublisherService.class, null);
if (eventsPublisherService == null) {
String msg = "Event Publisher service has not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return eventsPublisherService;
}
示例5: getSCEPManagerService
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static SCEPManager getSCEPManagerService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
SCEPManager scepManagerService = (SCEPManager)
ctx.getOSGiService(SCEPManager.class, null);
if (scepManagerService == null) {
String msg = "SCEPManagerImpl Management service not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return scepManagerService;
}
示例6: getRealmService
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static RealmService getRealmService() throws UserStoreException {
RealmService realmService;
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
realmService = (RealmService) ctx.getOSGiService(RealmService.class, null);
if (realmService == null) {
String msg = "Realm service has not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return realmService;
}
示例7: getSearchManagerService
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static SearchManagerService getSearchManagerService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
SearchManagerService searchManagerService =
(SearchManagerService) ctx.getOSGiService(SearchManagerService.class, null);
if (searchManagerService == null) {
throw new IllegalStateException("DeviceImpl search manager service is not initialized.");
}
return searchManagerService;
}
示例8: getRealmService
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static RealmService getRealmService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
RealmService realmService =
(RealmService) ctx.getOSGiService(RealmService.class, null);
if (realmService == null) {
String msg = "Device Management service has not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return realmService;
}
示例9: getAnalyticsDataAPI
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
private static AnalyticsDataAPI getAnalyticsDataAPI() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
AnalyticsDataAPI analyticsDataAPI =
(AnalyticsDataAPI) ctx.getOSGiService(AnalyticsDataAPI.class, null);
if (analyticsDataAPI == null) {
String msg = "Analytics api service has not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return analyticsDataAPI;
}
示例10: getUserStoreManager
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static UserStoreManager getUserStoreManager() throws UserStoreException {
RealmService realmService;
UserStoreManager userStoreManager;
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
realmService = (RealmService) ctx.getOSGiService(RealmService.class, null);
if (realmService == null) {
String msg = "Realm service has not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
int tenantId = ctx.getTenantId();
userStoreManager = realmService.getTenantUserRealm(tenantId).getUserStoreManager();
return userStoreManager;
}
示例11: getAPIManagementProviderService
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static APIManagementProviderService getAPIManagementProviderService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
APIManagementProviderService apiManagementProviderService =
(APIManagementProviderService) ctx.getOSGiService(APIManagementProviderService.class, null);
if (apiManagementProviderService == null) {
String msg = "API management provider service has not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return apiManagementProviderService;
}
示例12: getAnalyticsDataAPI
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static AnalyticsDataAPI getAnalyticsDataAPI() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
AnalyticsDataAPI analyticsDataAPI =
(AnalyticsDataAPI) ctx.getOSGiService(AnalyticsDataAPI.class, null);
if (analyticsDataAPI == null) {
String msg = "Analytics api service has not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return analyticsDataAPI;
}
示例13: getAppManagementService
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static ApplicationManagementProviderService getAppManagementService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
ApplicationManagementProviderService applicationManagementProviderService =
(ApplicationManagementProviderService) ctx.getOSGiService(ApplicationManagementProviderService.class, null);
if (applicationManagementProviderService == null) {
throw new IllegalStateException("AuthenticationImpl management service has not initialized.");
}
return applicationManagementProviderService;
}
示例14: getDeviceManagementService
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
/**
* @return Device management service of current context
*/
public static DeviceManagementProviderService getDeviceManagementService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
DeviceManagementProviderService deviceManagementProviderService =
(DeviceManagementProviderService) ctx.getOSGiService(DeviceManagementProviderService.class, null);
if (deviceManagementProviderService == null) {
String msg = "Device Management service has not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return deviceManagementProviderService;
}
示例15: getJWTClientManagerService
import org.wso2.carbon.context.PrivilegedCarbonContext; //导入方法依赖的package包/类
public static JWTClientManagerService getJWTClientManagerService() {
JWTClientManagerService jwtClientManagerService;
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
jwtClientManagerService = (JWTClientManagerService) ctx.getOSGiService(JWTClientManagerService.class, null);
if (jwtClientManagerService == null) {
String msg = "jwtClientManagerServicehas not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return jwtClientManagerService;
}