Package org.vertx.java.core.http

Examples of org.vertx.java.core.http.HttpServerRequest.response()


      if (transport != null && transport.isOpen()) {
        transport.onForcedDisconnect();
      } else {
        // this.store.publish('disconnect-force:' + data.id);
      }
      request.response().setStatusCode(200);
      request.response().end();
      request.response().close();
      return;
    }
View Full Code Here


        transport.onForcedDisconnect();
      } else {
        // this.store.publish('disconnect-force:' + data.id);
      }
      request.response().setStatusCode(200);
      request.response().end();
      request.response().close();
      return;
    }

    if (!settings.getTransports().contains(clientData.getTransport())) {
View Full Code Here

      } else {
        // this.store.publish('disconnect-force:' + data.id);
      }
      request.response().setStatusCode(200);
      request.response().end();
      request.response().close();
      return;
    }

    if (!settings.getTransports().contains(clientData.getTransport())) {
      String message = "unknown transport: '" + clientData.getTransport() + '"';
View Full Code Here

        ServerWebSocket socket = clientData.getSocket();
        if(socket != null) {
          socket.close();
        }
        if(request != null) {
          request.response().setStatusCode(200);
          request.response().end();
          request.response().close();
        }
        return;
      }
View Full Code Here

        if(socket != null) {
          socket.close();
        }
        if(request != null) {
          request.response().setStatusCode(200);
          request.response().end();
          request.response().close();
        }
        return;
      }
    }
View Full Code Here

          socket.close();
        }
        if(request != null) {
          request.response().setStatusCode(200);
          request.response().end();
          request.response().close();
        }
        return;
      }
    }
View Full Code Here

    Transport transport = manager.newTransport(clientData);
    HandshakeData handshakeData = manager.handshakeData(clientData.getId());
    if (transport.isDisconnected()) {
      // failed during transport setup
      request.response().end();
      request.response().close();
      return;
    }

    if (handshakeData == null) {
View Full Code Here

    Transport transport = manager.newTransport(clientData);
    HandshakeData handshakeData = manager.handshakeData(clientData.getId());
    if (transport.isDisconnected()) {
      // failed during transport setup
      request.response().end();
      request.response().close();
      return;
    }

    if (handshakeData == null) {
      if (transport.isOpen()) {
View Full Code Here

    this.manager = manager;
  }

  public void handle(ClientData clientData) {
    HttpServerRequest req = clientData.getRequest();
    HttpServerResponse res = req.response();
    String requestedFileName = clientData.getPath();
    String resourceRootDir = getRootDir();

    File rootDir = new File(requestedFileName);
    if(!rootDir.exists()) {
View Full Code Here

    final HttpServerRequest request = clientData.getRequest();
    final Settings settings = manager.getSettings();

    log.trace("In handshake handler");
    MultiMap reqHeaders = request.headers();
    final MultiMap resHeaders = request.response().headers();
    String reqOrigin = reqHeaders.get("Origin");
    resHeaders.add("CONTENT_TYPE", "text/plain; charset=UTF-8");

    if (!this.verifyOrigin(reqOrigin)) {
      manager.writeError(request, 403, "handshake bad origin");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.