org.jboss.errai.marshalling.client.protocols
Class ErraiProtocol
java.lang.Object
org.jboss.errai.marshalling.client.protocols.ErraiProtocol
- Direct Known Subclasses:
- ErraiProtocolServer
public class ErraiProtocol
- extends Object
A simple convenience class for the client and server bus' to use to encode/decode wire messages.
- Author:
- Mike Brock
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ErraiProtocol
public ErraiProtocol()
encodePayload
public static String encodePayload(Map<String,Object> message)
- Encode a standard Errai Protocol payload of the key-value pairs to be sent across the wire.
- Parameters:
message
- A map of the key-value pairs to be encoded.
- Returns:
- The encoded JSON
decodePayload
public static Map<String,Object> decodePayload(EJValue value)
- Decode a standard Errai Protocol payload to a Map of key value pairs.
- Parameters:
value
- The root JSON element to start parsing from.
- Returns:
- The decoded Map.
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.