Package org.syncany.operations.daemon.messages.api

Examples of org.syncany.operations.daemon.messages.api.Request


  private void handleWebSocketRequest(WebSocketChannel clientSocket, String message) {
    logger.log(Level.INFO, "Web socket message received: " + message);

    try {
      Request request = MessageFactory.toRequest(message);

      daemonWebServer.putCacheWebSocketRequest(request.getId(), clientSocket);     
      eventBus.post(request);
    }
    catch (Exception e) {
      logger.log(Level.WARNING, "Invalid request received; cannot serialize to Request.", e);
      eventBus.post(new BadRequestResponse(-1, "Invalid request."));
View Full Code Here


    else
      String message = IOUtils.toString(exchange.getInputStream()); // TODO [high] Read entire file to memory. Dangerous!
      logger.log(Level.INFO, "REST message received: " + message);
 
      try {
        Request request = MessageFactory.toRequest(message);
 
        daemonWebServer.putCacheRestRequest(request.getId(), exchange);       
        eventBus.post(request);
      }
      catch (Exception e) {
        logger.log(Level.WARNING, "Invalid request received; cannot serialize to Request.", e);
        eventBus.post(new BadRequestResponse(-1, "Invalid request."));
View Full Code Here

          .setHostnameVerifier(hostnameVerifier)
          .setDefaultCredentialsProvider(credentialsProvider)
          .build();

      // Build and send request, print response
      Request request = buildFolderRequestFromCommand(command, commandName, commandArgs, config.getLocalDir().getAbsolutePath());
      String serverUri = SERVER_SCHEMA + SERVER_HOSTNAME + ":" + portConfig.getPort() + SERVER_REST_API;

      String xmlMessageString = MessageFactory.toXml(request);
      StringEntity xmlMessageEntity = new StringEntity(xmlMessageString);
View Full Code Here

TOP

Related Classes of org.syncany.operations.daemon.messages.api.Request

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.