当前位置: 首页>>代码示例>>Java>>正文


Java RestHandler类代码示例

本文整理汇总了Java中org.elasticsearch.rest.RestHandler的典型用法代码示例。如果您正苦于以下问题:Java RestHandler类的具体用法?Java RestHandler怎么用?Java RestHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RestHandler类属于org.elasticsearch.rest包,在下文中一共展示了RestHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: instantiateMngtRestApiHandler

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static Collection<RestHandler> instantiateMngtRestApiHandler(final Settings settings, final Path configPath, final RestController restController,
		final Client localClient, final AdminDNs adminDns, final IndexBaseConfigurationRepository cr, final ClusterService cs, final PrincipalExtractor principalExtractor,
		final PrivilegesEvaluator evaluator, final ThreadPool threadPool, final AuditLog auditlog) {

	if (enterpriseModulesDisabled()) {
		return Collections.emptyList();
	}

	try {
		final Class<?> clazz = Class.forName("com.floragunn.searchguard.dlic.rest.api.SearchGuardRestApiActions");
		final Collection<RestHandler> ret = (Collection<RestHandler>) clazz
				.getDeclaredMethod("getHandler", Settings.class, Path.class, RestController.class, Client.class, AdminDNs.class, IndexBaseConfigurationRepository.class,
						ClusterService.class, PrincipalExtractor.class, PrivilegesEvaluator.class, ThreadPool.class, AuditLog.class)
				.invoke(null, settings, configPath, restController, localClient, adminDns, cr, cs, principalExtractor, evaluator, threadPool, auditlog);
		addLoadedModule(clazz);
		return ret;
	} catch (final Throwable e) {
		log.warn("Unable to enable Rest Management Api Module due to {}", e.toString());
		return Collections.emptyList();
	}
}
 
开发者ID:floragunncom,项目名称:search-guard,代码行数:23,代码来源:ReflectionHelper.java

示例2: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings,
        IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver,
        Supplier<DiscoveryNodes> nodesInCluster) {
    return Arrays.asList(
            new RestSearchTemplateAction(settings, restController),
            new RestMultiSearchTemplateAction(settings, restController),
            new RestGetSearchTemplateAction(settings, restController),
            new RestPutSearchTemplateAction(settings, restController),
            new RestDeleteSearchTemplateAction(settings, restController),
            new RestRenderSearchTemplateAction(settings, restController));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:MustachePlugin.java

示例3: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings,
        IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver,
        Supplier<DiscoveryNodes> nodesInCluster) {
    return Arrays.asList(
            new RestReindexAction(settings, restController),
            new RestUpdateByQueryAction(settings, restController),
            new RestDeleteByQueryAction(settings, restController),
            new RestRethrottleAction(settings, restController, nodesInCluster));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:ReindexPlugin.java

示例4: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings,
        IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver,
        Supplier<DiscoveryNodes> nodesInCluster) {
    return Arrays.asList(
            new RestNoopBulkAction(settings, restController),
            new RestNoopSearchAction(settings, restController));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:NoopPlugin.java

示例5: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings,
                                         RestController restController,
                                         ClusterSettings clusterSettings,
                                         IndexScopedSettings indexScopedSettings,
                                         SettingsFilter settingsFilter,
                                         IndexNameExpressionResolver indexNameExpressionResolver,
                                         Supplier<DiscoveryNodes> nodesInCluster) {

    logger.debug("Registering REST handlers");

    handlers.forEach((key, value) -> restController.registerHandler(GET, key, value));
    return new ArrayList<>(handlers.values());
}
 
开发者ID:jsuchenia,项目名称:elasticsearch-prometheus-metrics,代码行数:15,代码来源:PrometheusExporterPlugin.java

示例6: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings,
                                         RestController restController, ClusterSettings clusterSettings,
                                         IndexScopedSettings indexScopedSettings,
                                         SettingsFilter settingsFilter,
                                         IndexNameExpressionResolver indexNameExpressionResolver,
                                         Supplier<DiscoveryNodes> nodesInCluster) {
    return Arrays.asList(new ReportGenerateRestAction(settings, restController));
}
 
开发者ID:malike,项目名称:elasticsearch-report-engine,代码行数:10,代码来源:ElasticReportPlugin.java

示例7: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(final Settings settings, final RestController restController,
        final ClusterSettings clusterSettings, final IndexScopedSettings indexScopedSettings, final SettingsFilter settingsFilter,
        final IndexNameExpressionResolver indexNameExpressionResolver, final Supplier<DiscoveryNodes> nodesInCluster) {
    return Arrays.asList(new RestIndexingProxyProcessAction(settings, restController, pluginComponent),
            new RestIndexingProxyRequestAction(settings, restController, pluginComponent));
}
 
开发者ID:codelibs,项目名称:elasticsearch-indexing-proxy,代码行数:8,代码来源:IndexingProxyPlugin.java

示例8: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<Class<? extends RestHandler>> getRestHandlers() {
    List<Class<? extends RestHandler>> restHandlers = new ArrayList<>(1);
    restHandlers.add(RestSqlAction.class);

    return restHandlers;
}
 
开发者ID:mazhou,项目名称:es-sql,代码行数:8,代码来源:SqlPlug.java

示例9: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings,
		IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver,
		Supplier<DiscoveryNodes> nodesInCluster) {
	log(1, "---> getRestHandlers");

	return Arrays.asList(new RestConsoleAction(settings, restController, clusterSettings, settingsFilter));

}
 
开发者ID:psfu,项目名称:es-sp-console,代码行数:10,代码来源:SpToolsPlugin.java

示例10: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings, RestController restController,
                                         ClusterSettings clusterSettings, IndexScopedSettings indexScopedSettings,
                                         SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver,
                                         Supplier<DiscoveryNodes> nodesInCluster) {
    List<RestHandler> list = new ArrayList<>();
    RestSimpleFeatureStore.register(list, settings, restController);
    list.add(new RestFeatureStoreCaches(settings, restController));
    list.add(new RestCreateModelFromSet(settings, restController));
    list.add(new RestAddFeatureToSet(settings, restController));
    return unmodifiableList(list);
}
 
开发者ID:o19s,项目名称:elasticsearch-learning-to-rank,代码行数:13,代码来源:LtrQueryParserPlugin.java

示例11: register

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
public static void register(List<RestHandler> list, Settings settings, RestController restController) {
    for (String type : SUPPORTED_TYPES) {
        list.add(new RestAddOrUpdateFeature(settings, restController, type));
        list.add(new RestSearchStoreElements(settings, restController, type));
    }
    list.add(new RestStoreManager(settings, restController));
}
 
开发者ID:o19s,项目名称:elasticsearch-learning-to-rank,代码行数:8,代码来源:RestSimpleFeatureStore.java

示例12: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings,
		IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver,
		Supplier<DiscoveryNodes> nodesInCluster) {
	log(1, "---> getRestHandlers");

	return Arrays.asList(new RestSpToolsAction(settings, restController), new RestConsoleAction(settings, restController, clusterSettings, settingsFilter));

}
 
开发者ID:psfu,项目名称:es-sp-tools,代码行数:10,代码来源:SpToolsPlugin.java

示例13: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<Class<? extends RestHandler>> getRestHandlers() {
    return Arrays.asList(
            RestAllTermsAction.class,
            RestPrepareSpecAction.class,
            RestStoreModelAction.class,
            RestTrainModelAction.class
    );
}
 
开发者ID:brwe,项目名称:es-token-plugin,代码行数:10,代码来源:TokenPlugin.java

示例14: getRestHandlers

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings,
        IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter,
        IndexNameExpressionResolver indexNameExpressionResolver, Supplier<DiscoveryNodes> nodesInCluster) {
    
    final List<RestHandler> handlers = new ArrayList<RestHandler>(1);
    
    if (!client && !tribeNodeClient && !disabled) {
        
        handlers.addAll(super.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter, indexNameExpressionResolver, nodesInCluster));

        handlers.add(new SearchGuardInfoAction(settings, restController, Objects.requireNonNull(evaluator), Objects.requireNonNull(threadPool)));
        handlers.add(new KibanaInfoAction(settings, restController, Objects.requireNonNull(evaluator), Objects.requireNonNull(threadPool)));
        handlers.add(new SearchGuardLicenseAction(settings, restController));
        handlers.add(new SearchGuardHealthAction(settings, restController, Objects.requireNonNull(backendRegistry)));

        Collection<RestHandler> apiHandler = ReflectionHelper
                .instantiateMngtRestApiHandler(settings, configPath, restController, localClient, adminDns, cr, cs, Objects.requireNonNull(principalExtractor),  evaluator, threadPool, Objects.requireNonNull(auditLog));
        handlers.addAll(apiHandler);
        log.debug("Added {} management rest handler(s)", apiHandler.size());
    }
    
    
    final Set<ModuleInfo> sgModules = ReflectionHelper.getModulesLoaded();
    
    log.info("{} Search Guard modules loaded so far: {}", sgModules.size(), sgModules);
    
    return handlers;
}
 
开发者ID:floragunncom,项目名称:search-guard,代码行数:30,代码来源:SearchGuardPlugin.java

示例15: getRestHandlerWrapper

import org.elasticsearch.rest.RestHandler; //导入依赖的package包/类
@Override
public UnaryOperator<RestHandler> getRestHandlerWrapper(final ThreadContext threadContext) {
    
    if(client || disabled) {
        return (rh) -> rh;
    }
    
    return (rh) -> sgRestHandler.wrap(rh);
}
 
开发者ID:floragunncom,项目名称:search-guard,代码行数:10,代码来源:SearchGuardPlugin.java


注:本文中的org.elasticsearch.rest.RestHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。