Package org.eclipse.rap.rwt.internal.protocol

Examples of org.eclipse.rap.rwt.internal.protocol.ProtocolMessageWriter


  private void writeInvalidVersion( String serverVersion, String clientVersion ) {
    String errorMsg = "Incompatible Tabris Versions:\nClient " + clientVersion + " vs. Server " + serverVersion;
    HttpServletResponse response = RWT.getResponse();
    response.setStatus( SC_PRECONDITION_FAILED );
    ProtocolMessageWriter writer = new ProtocolMessageWriter();
    writer.appendHead( "error", JsonValue.valueOf( errorMsg ) );
    try {
      writer.createMessage().writeTo( response.getWriter() );
    } catch( IOException exception ) {
      throw new IllegalStateException( exception );
    }
  }
View Full Code Here


  }

  private void writeInvalidVersion( String errorMsg ) {
    HttpServletResponse response = RWT.getResponse();
    response.setStatus( SC_PRECONDITION_FAILED );
    ProtocolMessageWriter writer = new ProtocolMessageWriter();
    writer.appendHead( "error", JsonValue.valueOf( errorMsg ) );
    try {
      writer.createMessage().toJson().writeTo( response.getWriter() );
    } catch( IOException exception ) {
      throw new IllegalStateException( exception );
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.rap.rwt.internal.protocol.ProtocolMessageWriter

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.