Package groovyx.remote.transport.http

Examples of groovyx.remote.transport.http.RemoteControlHttpHandler


  protected void doStart() throws Exception {
    InetSocketAddress addr = new InetSocketAddress(port);
    this.server = HttpServer.create(addr, 0);

    Receiver receiver = new ReceiverImpl(uberClassLoader, createContext());
    final RemoteControlHttpHandler handler = new RemoteControlHttpHandler(receiver);

    server.createContext("/", new HttpHandler()
    {
      @Override
      public void handle(final HttpExchange exchange) throws IOException {
        int id = requests.incrementAndGet();
        log.debug("Handling remote request: [{}] {}", id, exchange);

        DC.put(RemoteScript.class, id);

        try {
          handler.handle(exchange);
        }
        catch (Throwable failure) {
          // HACK: Ignore this package-private exception as it seems to happen normally
          if ("sun.net.httpserver.StreamClosedException".equals(failure.getClass().getCanonicalName())) {
            log.trace("Ignoring", failure);
View Full Code Here

TOP

Related Classes of groovyx.remote.transport.http.RemoteControlHttpHandler

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.