Package org.jgroups.protocols

Examples of org.jgroups.protocols.SWIFT_PING$HttpResponse


        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 org.jgroups.protocols.SWIFT_PING$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.