org.jboss.errai.bus.server.io
Class MessageFactory
java.lang.Object
org.jboss.errai.bus.server.io.MessageFactory
public class MessageFactory
- extends Object
The MessageFactory facilitates the building of a command message using a JSON string
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageFactory
public MessageFactory()
decodeToMap
public static Map<String,Object> decodeToMap(String in)
- Decodes a JSON string to a map (string name -> object)
- Parameters:
in
- - JSON string
- Returns:
- map representing the string
createCommandMessage
public static Message createCommandMessage(QueueSession session,
javax.servlet.http.HttpServletRequest request,
String json)
- Creates the command message from the given JSON string and session. The message is constructed in
parts depending on the string
- Parameters:
session
- - the queue session in which the message existsrequest
- -json
- - the string representing the parts of the message
- Returns:
- the message array constructed using the JSON string
createCommandMessage
public static Message createCommandMessage(QueueSession session,
String json)
createCommandMessage
public static List<Message> createCommandMessage(QueueSession session,
javax.servlet.http.HttpServletRequest request)
throws IOException
- Throws:
IOException
createCommandMessage
public static List<Message> createCommandMessage(QueueSession session,
InputStream inputStream)
throws IOException
- Throws:
IOException
createCommandMessage
public static List<Message> createCommandMessage(QueueSession session,
EJValue value)
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.