Package org.elasticsearch.http

Examples of org.elasticsearch.http.HttpServerAdapter


  @Override
  protected void service(final HttpServletRequest req,
      final HttpServletResponse resp) throws ServletException,
      IOException {

    final HttpServerAdapter adapter = getTransport()
        .httpServerAdapter();
    final TomcatHttpServerRestRequest restRequest = new TomcatHttpServerRestRequest(
        req);
    final TomcatHttpServerRestChannel restChannel = new TomcatHttpServerRestChannel(
        restRequest, resp, transport.getSecurityService());

    try {

      adapter.dispatchRequest(restRequest, restChannel);
      restChannel.await();

    } catch (final InterruptedException e) {
      throw new ServletException("failed to dispatch request", e);
    } catch (final Exception e) {
View Full Code Here


        this.logger = null;
        super.doStop();
    }

    public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        HttpServerAdapter adapter = getTransport().httpServerAdapter();
        JettyHttpServerRestRequest restRequest = new JettyHttpServerRestRequest(request);
        JettyHttpServerRestChannel restChannel = new JettyHttpServerRestChannel(restRequest, response);
        try {
            adapter.dispatchRequest(restRequest, restChannel);
            restChannel.await();
        } catch (InterruptedException e) {
            throw new ServletException("failed to dispatch request", e);
        } catch (Exception e) {
            throw new IOException("failed to dispatch request", e);
View Full Code Here

TOP

Related Classes of org.elasticsearch.http.HttpServerAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.