org.elasticsearch.rest
Class RestController
java.lang.Object
org.elasticsearch.common.component.AbstractComponent
org.elasticsearch.common.component.AbstractLifecycleComponent<RestController>
org.elasticsearch.rest.RestController
- All Implemented Interfaces:
- CloseableComponent, LifecycleComponent<RestController>
public class RestController
- extends AbstractLifecycleComponent<RestController>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RestController
@Inject
public RestController(Settings settings)
doStart
protected void doStart()
throws ElasticSearchException
- Specified by:
doStart
in class AbstractLifecycleComponent<RestController>
- Throws:
ElasticSearchException
doStop
protected void doStop()
throws ElasticSearchException
- Specified by:
doStop
in class AbstractLifecycleComponent<RestController>
- Throws:
ElasticSearchException
doClose
protected void doClose()
throws ElasticSearchException
- Specified by:
doClose
in class AbstractLifecycleComponent<RestController>
- Throws:
ElasticSearchException
registerFilter
public void registerFilter(RestFilter preProcessor)
- Registers a pre processor to be executed before the rest request is actually handled.
registerHandler
public void registerHandler(RestRequest.Method method,
String path,
RestHandler handler)
- Registers a rest handler to be execute when the provided method and path match the request.
filterChainOrNull
@Nullable
public RestFilterChain filterChainOrNull(RestFilter executionFilter)
- Returns a filter chain (if needed) to execute. If this method returns null, simply execute
as usual.
filterChain
public RestFilterChain filterChain(RestFilter executionFilter)
- Returns a filter chain with the final filter being the provided filter.
dispatchRequest
public void dispatchRequest(RestRequest request,
RestChannel channel)
Copyright © 2009-2012. All Rights Reserved.