本文整理汇总了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();
}
}
示例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));
}
示例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));
}
示例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));
}
示例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());
}
示例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));
}
示例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));
}
示例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;
}
示例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));
}
示例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);
}
示例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));
}
示例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));
}
示例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
);
}
示例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;
}
示例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);
}