Package org.elasticsearch.rest
Interface RestHandler
- All Known Implementing Classes:
AbstractCatAction
,BaseRestHandler
,BaseRestHandler.Wrapper
,DeprecationRestHandler
,RestAddIndexBlockAction
,RestAddVotingConfigExclusionAction
,RestAliasAction
,RestAllocationAction
,RestAnalyzeAction
,RestBulkAction
,RestCancelTasksAction
,RestCatAction
,RestCatRecoveryAction
,RestCleanupRepositoryAction
,RestClearIndicesCacheAction
,RestClearScrollAction
,RestClearVotingConfigExclusionsAction
,RestCloneSnapshotAction
,RestCloseIndexAction
,RestClosePointInTimeAction
,RestClusterAllocationExplainAction
,RestClusterGetSettingsAction
,RestClusterHealthAction
,RestClusterRerouteAction
,RestClusterSearchShardsAction
,RestClusterStateAction
,RestClusterStatsAction
,RestClusterUpdateSettingsAction
,RestCountAction
,RestCountAction
,RestCreateIndexAction
,RestCreateSnapshotAction
,RestDeleteAction
,RestDeleteComponentTemplateAction
,RestDeleteComposableIndexTemplateAction
,RestDeleteDanglingIndexAction
,RestDeleteIndexAction
,RestDeleteIndexTemplateAction
,RestDeletePipelineAction
,RestDeleteRepositoryAction
,RestDeleteSnapshotAction
,RestDeleteStoredScriptAction
,RestExplainAction
,RestFieldCapabilitiesAction
,RestFielddataAction
,RestFlushAction
,RestForceMergeAction
,RestGetAction
,RestGetAliasesAction
,RestGetComponentTemplateAction
,RestGetComposableIndexTemplateAction
,RestGetFieldMappingAction
,RestGetIndexTemplateAction
,RestGetIndicesAction
,RestGetMappingAction
,RestGetPipelineAction
,RestGetRepositoriesAction
,RestGetScriptContextAction
,RestGetScriptLanguageAction
,RestGetSettingsAction
,RestGetSnapshotsAction
,RestGetSourceAction
,RestGetStoredScriptAction
,RestGetTaskAction
,RestHealthAction
,RestImportDanglingIndexAction
,RestIndexAction
,RestIndexAction.AutoIdHandler
,RestIndexAction.CreateHandler
,RestIndexDeleteAliasesAction
,RestIndexPutAliasAction
,RestIndicesAction
,RestIndicesAliasesAction
,RestIndicesSegmentsAction
,RestIndicesShardStoresAction
,RestIndicesStatsAction
,RestListDanglingIndicesAction
,RestListTasksAction
,RestMainAction
,RestMasterAction
,RestMultiGetAction
,RestMultiSearchAction
,RestMultiTermVectorsAction
,RestNodeAttrsAction
,RestNodesAction
,RestNodesHotThreadsAction
,RestNodesInfoAction
,RestNodesStatsAction
,RestNodesUsageAction
,RestOpenIndexAction
,RestOpenPointInTimeAction
,RestPendingClusterTasksAction
,RestPendingClusterTasksAction
,RestPluginsAction
,RestPutComponentTemplateAction
,RestPutComposableIndexTemplateAction
,RestPutIndexTemplateAction
,RestPutMappingAction
,RestPutPipelineAction
,RestPutRepositoryAction
,RestPutStoredScriptAction
,RestRecoveryAction
,RestRefreshAction
,RestReloadSecureSettingsAction
,RestRemoteClusterInfoAction
,RestRepositoriesAction
,RestResetFeatureStateAction
,RestResizeHandler
,RestResizeHandler.RestCloneIndexAction
,RestResizeHandler.RestShrinkIndexAction
,RestResizeHandler.RestSplitIndexAction
,RestResolveIndexAction
,RestRestoreSnapshotAction
,RestRolloverIndexAction
,RestSearchAction
,RestSearchScrollAction
,RestSegmentsAction
,RestShardsAction
,RestSimulateIndexTemplateAction
,RestSimulatePipelineAction
,RestSimulateTemplateAction
,RestSnapshotAction
,RestSnapshotsStatusAction
,RestSnapshottableFeaturesAction
,RestSyncedFlushAction
,RestTasksAction
,RestTemplatesAction
,RestTermVectorsAction
,RestThreadPoolAction
,RestUpdateAction
,RestUpdateSettingsAction
,RestUpgradeActionDeprecated
,RestUpgradeStatusActionDeprecated
,RestValidateQueryAction
,RestVerifyRepositoryAction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Handler for REST requests
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Indicates if the RestHandler supports working with pooled buffers.default boolean
Controls whether requests handled by this class are allowed to to access system indices by default.default boolean
void
handleRequest(RestRequest request, RestChannel channel, NodeClient client)
Handles a rest request.default List<RestHandler.Route>
routes()
The list ofRestHandler.Route
s that this RestHandler is responsible for handling.default boolean
Indicates if the RestHandler supports content as a stream.
-
Method Details
-
handleRequest
Handles a rest request.- Parameters:
request
- The request to handlechannel
- The channel to write the request response toclient
- A client to use to make internal requests on behalf of the original request- Throws:
Exception
-
canTripCircuitBreaker
default boolean canTripCircuitBreaker() -
supportsContentStream
default boolean supportsContentStream()Indicates if the RestHandler supports content as a stream. A stream would be multiple objects delineated byXContent.streamSeparator()
. If a handler returns true this will affect the types of content that can be sent to this endpoint. -
allowsUnsafeBuffers
default boolean allowsUnsafeBuffers()Indicates if the RestHandler supports working with pooled buffers. If the request handler will not escape the returnRestRequest.content()
or any buffers extracted from it then there is no need to make a copies of any pooled buffers in theRestRequest
instance before passing a request to this handler. If this instance does not support pooled/unsafe buffersRestRequest.ensureSafeBuffers()
should be called on any request before passing it tohandleRequest(org.elasticsearch.rest.RestRequest, org.elasticsearch.rest.RestChannel, org.elasticsearch.client.node.NodeClient)
.- Returns:
- true iff the handler supports requests that make use of pooled buffers
-
routes
The list ofRestHandler.Route
s that this RestHandler is responsible for handling. -
allowSystemIndexAccessByDefault
default boolean allowSystemIndexAccessByDefault()Controls whether requests handled by this class are allowed to to access system indices by default.- Returns:
true
if requests handled by this class should be allowed to access system indices.
-