本文整理匯總了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);
}