Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.client.util
Class BusToolsCli

java.lang.Object
  extended by org.jboss.errai.bus.client.util.BusToolsCli

public class BusToolsCli
extends Object


Constructor Summary
BusToolsCli()
           
 
Method Summary
static Message decodeCommandMessage(EJValue value)
           
static List<Message> decodePayload(String jsonString)
           
static boolean decodeToCallback(String jsonString, ClientMessageBus bus)
           
static String encodeMessage(Message message)
           
static String encodeMessages(Collection<Message> messages)
           
static String getApplicationRoot()
          Returns the application root for the remote message bus endpoints.
static QueueSession getClientSession()
           
static ResourceProvider<RequestDispatcher> getRequestDispatcherProvider()
           
static boolean isRemoteCommunicationEnabled()
          Checks whether remote bus communication is enabled.
static void setApplicationRoot(String path)
          Sets the application root for the remote message bus endpoints.
static void setAutoDemarshall(boolean autoDemarshall1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BusToolsCli

public BusToolsCli()
Method Detail

decodeToCallback

public static boolean decodeToCallback(String jsonString,
                                       ClientMessageBus bus)

decodePayload

public static List<Message> decodePayload(String jsonString)

encodeMessage

public static String encodeMessage(Message message)

encodeMessages

public static String encodeMessages(Collection<Message> messages)

decodeCommandMessage

public static Message decodeCommandMessage(EJValue value)

getClientSession

public static QueueSession getClientSession()

getRequestDispatcherProvider

public static ResourceProvider<RequestDispatcher> getRequestDispatcherProvider()

setAutoDemarshall

public static void setAutoDemarshall(boolean autoDemarshall1)

setApplicationRoot

public static void setApplicationRoot(String path)
Sets the application root for the remote message bus endpoints.

Parameters:
path - path to use when sending requests to the JAX-RS endpoint

getApplicationRoot

public static String getApplicationRoot()
Returns the application root for the remote message bus endpoints.

Returns:
path with trailing slash, or empty string if undefined or explicitly set to empty

isRemoteCommunicationEnabled

public static boolean isRemoteCommunicationEnabled()
Checks whether remote bus communication is enabled.

The JavaScript variable erraiBusRemoteCommunicationEnabled can be used to control this value. If the variable is not present in the window object, the default value true is returned.

Returns:
true if remote communication enabled, otherwise false.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.