Package org.jboss.errai.marshalling.server

Examples of org.jboss.errai.marshalling.server.DecodingSession


  public static Message uglyReEncode(String message) {
    if (message == null) return null;
    Map<String, Object> parts =
            ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(message),
                    new DecodingSession(MappingContextSingleton.get()));

    return CommandMessage.createWithParts(parts);
  }
View Full Code Here


    return CommandMessage.createWithParts(parts);
  }

  public static Message decodeAndDemarshall(String json) {
    Map<String, Object> parts = ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(json),
            new DecodingSession(MappingContextSingleton.get()));
    if (parts == null) return CommandMessage.createWithParts(new HashMap());
    return CommandMessage.createWithParts(parts);
  }
View Full Code Here

  public static Message createCommandMessage(QueueSession session, String json) {
    if (json.length() == 0) return null;

    Message msg = createWithParts(MapMarshaller.INSTANCE.demarshall( JSONDecoder.decode(json),
                new DecodingSession(MappingContextSingleton.get())))
            .setResource("Session", session)
            .setResource("SessionID", session.getSessionId());

    msg.setFlag(RoutingFlag.FromRemote);
View Full Code Here



  public static Message createCommandMessage(QueueSession session, HttpServletRequest request) throws IOException {
    Map parts = ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONStreamDecoder.decode(request.getInputStream()),
            new DecodingSession(MappingContextSingleton.get()));
   
    parts.remove(MessageParts.SessionID.name());

    // Expose session and session id
    // CDI ext makes use of it to manage conversation contexts
View Full Code Here

  public static Message uglyReEncode(String message) {
    if (message == null) return null;
    Map<String, Object> parts =
            ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(message),
                    new DecodingSession(MappingContextSingleton.get()));

    return CommandMessage.createWithParts(parts);
  }
View Full Code Here

    return CommandMessage.createWithParts(parts);
  }

  public static Message decodeAndDemarshall(String json) {
    Map<String, Object> parts = ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(json),
            new DecodingSession(MappingContextSingleton.get()));
    if (parts == null) return CommandMessage.createWithParts(new HashMap());
    return CommandMessage.createWithParts(parts);
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public static Message createCommandMessage(QueueSession session, String json) {
    if (json.length() == 0) return null;

    Message msg = createWithPartsFromRawMap(ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(json),
        new DecodingSession(MappingContextSingleton.get())))
            .setResource("Session", session)
            .setResource("SessionID", session.getSessionId());

    msg.setFlag(RoutingFlag.FromRemote);
View Full Code Here



  private static Map getParts(EJValue value) {
    return ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(value,
            new DecodingSession(MappingContextSingleton.get()));
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public static Message createCommandMessage(QueueSession session, String json) {
    if (json.length() == 0) return null;

    Message msg = createWithPartsFromRawMap(ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(json),
        new DecodingSession(MappingContextSingleton.get())))
            .setResource("Session", session)
            .setResource("SessionID", session.getSessionId());

    msg.setFlag(RoutingFlag.FromRemote);
View Full Code Here



  private static Map getParts(EJValue value) {
    return ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(value,
            new DecodingSession(MappingContextSingleton.get()));
  }
View Full Code Here

TOP

Related Classes of org.jboss.errai.marshalling.server.DecodingSession

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.