當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。