Package com.reignite.codec

Examples of com.reignite.codec.MessageSerializer


    if (message != null) {
      nextFilter(context);
    }

    AMFMessage response = context.getResponseMessage();
    MessageSerializer serializer = context.locateSerializer();
    try {
      serializer.writeMessage(response);
    } catch (Exception e) {
      LogWriter.error(getClass(), "Failed to serialize response: " + e, e);

      AMFMessageBody errorBody = new AMFMessageBody();
      ErrorMessage errorMessage = new ErrorMessage("Failed to serialize message: " + e, "", "", null);
      errorBody.setData(errorMessage);
      context.setResponseBody(errorBody);
      response = new AMFMessage();
      response.getBodies().add(errorBody);
      errorBody.setResponseURI(AMFMessageBody.STATUS_METHOD);
      errorBody.setTargetURI(errorBody.getResponseURI());
      try {
        serializer.writeMessage(response);
      } catch (Exception e1) {
        LogWriter.error(getClass(), "Could not serialize error message: " + e1, e1);
        throw new RuntimeException("Could not serialize error message", e1);
      }
    }
View Full Code Here

TOP

Related Classes of com.reignite.codec.MessageSerializer

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.