Package org.persvr.remote.Client

Examples of org.persvr.remote.Client.IndividualRequest.serialize()


      if (target == Scriptable.NOT_FOUND || target == Undefined.instance){
        innerResponse.setStatus(204);
        output ="";
      }
      else
        output = request.serialize(target);
      innerResponse.setHeader("Last-Modified", "" + new Date()); // TODO: This should come from the transaction
      innerResponse.getOutputStream().print(output);
      String message = innerResponse.asString();
      response.getOutputStream().print(message);
      response.getOutputStream().flush();
View Full Code Here


        response.setHeader("Event", call.getMethod());
        response.setHeader("Content-Location", prefix + pathInfo);
        IndividualRequest request = connection.getIndividualRequest(null, response);
        request.setRequestedPath(pathInfo, Identification.idForString(pathInfo));
//      target = PersevereServlet.handleRange(range, target, since,response);
      String output = request.serialize(call.getContent());
      response.setHeader("Last-Modified", "" + new Date()); // TODO: This should come from the transaction
        response.getOutputStream().print(output);
        response.getOutputStream().flush();
        return 0;
    }
View Full Code Here

    public void propertyChange(List<ObservedCall> evt) {
      for(ObservedCall call : evt){
        if ("MESSAGE".equalsIgnoreCase(call.getMethod())){
          try {
              IndividualRequest request = new Client(null).getIndividualRequest(null, null);
            ((RestChannelsBayeux)bayeux).internalPublish("/" + call.getSourceId(), new JSON.Literal(request.serialize(call.getContent())));
          } catch (IOException e) {
            throw new RuntimeException(e);
          }
        }
      }
View Full Code Here

   * @param returnValue The object to output
   * @return JSPON string representation
   */
  public String outputReturnObject(Object returnValue)  {
        IndividualRequest requestHandler = Client.getCurrentObjectResponse();
      return requestHandler.serialize(returnValue);
        //requestHandler.outputWaitingData();
       
  }
  public String outputWaitingResponse() throws IOException {
        IndividualRequest requestHandler = Client.getCurrentObjectResponse();
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.