org.elasticsearch.rest
Class RestController

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.common.component.AbstractLifecycleComponent<RestController>
          extended by org.elasticsearch.rest.RestController
All Implemented Interfaces:
CloseableComponent, LifecycleComponent<RestController>

public class RestController
extends AbstractLifecycleComponent<RestController>


Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
RestController(Settings settings)
           
 
Method Summary
 void dispatchRequest(RestRequest request, RestChannel channel)
           
protected  void doClose()
           
protected  void doStart()
           
protected  void doStop()
           
 RestFilterChain filterChain(RestFilter executionFilter)
          Returns a filter chain with the final filter being the provided filter.
 RestFilterChain filterChainOrNull(RestFilter executionFilter)
          Returns a filter chain (if needed) to execute.
 void registerFilter(RestFilter preProcessor)
          Registers a pre processor to be executed before the rest request is actually handled.
 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.
 
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestController

@Inject
public RestController(Settings settings)
Method Detail

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.