Package com.google.wave.api

Examples of com.google.wave.api.WaveService$HttpResponse


  private String rpcServerUrl;

  public WaveExport(String serverUrl, String exportDir) {
    this.serverUrl = serverUrl;
    fileNames = new FileNames(exportDir);
    api = new WaveService();
    api.setFetchFimeout(WaveService.FETCH_INFINITE_TIMEOUT);
  }
View Full Code Here


  }

  private WaveImport(String serverUrl, String exportDir) {
    this.serverUrl = serverUrl;
    fileNames = new FileNames(exportDir);
    api = new WaveService();
    api.setFetchFimeout(WaveService.FETCH_INFINITE_TIMEOUT);
  }
View Full Code Here

        this.handler.takeRequest(req);

        final long now = System.currentTimeMillis();
        System.out.printf("%tH:%tM:%tS - %s %s%n", now, now, now, this.senderId, req.getRequestURL());

        final HttpResponse rsp = new HttpResponse();
        rsp.setContent("Hello, world!\n");
        rsp.setStatus(HttpStatus.OK);
        // rsp.setStatus(HttpStatus.BadRequest.code, "Nice Try");
        rsp.setHeader("Cache-Control", "public");
        rsp.setHeader("X-Handler-App", "TestApp");
        rsp.setHeader("X-Sender-Id", this.senderId);
        rsp.setDateHeader("Last-Updated", System.currentTimeMillis());

        this.handler.sendResponse(rsp, req);

      } catch (final IOException x) {
        x.printStackTrace();
View Full Code Here

      public void run() {

        while (handler.isActive()) {
          try {
            final HttpRequest req = new HttpRequest();
            final HttpResponse rsp = new HttpResponse();
            handler.takeRequest(req);
            rsp.setContent("Hello, world!\n");
            rsp.setStatus(HttpStatus.OK);
            handler.sendResponse(rsp, req);
          } catch (final IOException x) {
            Assert.fail(x.toString());
          }
        } // while
View Full Code Here

TOP

Related Classes of com.google.wave.api.WaveService$HttpResponse

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.