Errai 3.0.1-SNAPSHOT

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

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

public class ErrorHelper
extends Object

The ErrorHelper class facilitates handling and sending error messages to the correct place


Constructor Summary
ErrorHelper()
           
 
Method Summary
static void disconnectRemoteBus(MessageBus bus, Message message)
          Sends a disconnect command message to the client bus
static void handleMessageDeliveryFailure(MessageBus bus, Message message, String errorMessage, Throwable e, boolean disconnect)
          Handles the failed delivery of a message, and sends the error to the appropriate place
static void sendClientError(MessageBus bus, Message message, String errorMessage, String additionalDetails)
          Sends the error message via conversation to the ClientBusErrors subject
static void sendClientError(MessageBus bus, Message message, String errorMessage, Throwable e)
          Creates the stacktrace for the error message and sends it via conversation to the ClientBusErrors subject
static void sendClientError(MessageBus bus, String queueId, String errorMessage, String additionalDetails)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorHelper

public ErrorHelper()
Method Detail

sendClientError

public static void sendClientError(MessageBus bus,
                                   Message message,
                                   String errorMessage,
                                   Throwable e)
Creates the stacktrace for the error message and sends it via conversation to the ClientBusErrors subject

Parameters:
bus - - the MessageBus that has received the message and errorMessage
message - - the message that has encountered the error
errorMessage - - the error message produced
e - - the exception received

sendClientError

public static void sendClientError(MessageBus bus,
                                   Message message,
                                   String errorMessage,
                                   String additionalDetails)
Sends the error message via conversation to the ClientBusErrors subject

Parameters:
bus - - the MessageBus that has received the message and errorMessage
message - - the message that has encountered the error
errorMessage - - the error message produced
additionalDetails - - the stacktrace represented as a String

sendClientError

public static void sendClientError(MessageBus bus,
                                   String queueId,
                                   String errorMessage,
                                   String additionalDetails)

disconnectRemoteBus

public static void disconnectRemoteBus(MessageBus bus,
                                       Message message)
Sends a disconnect command message to the client bus

Parameters:
bus - - the bus responsible for sending messages for the server
message - - the message that has encountered the error

handleMessageDeliveryFailure

public static void handleMessageDeliveryFailure(MessageBus bus,
                                                Message message,
                                                String errorMessage,
                                                Throwable e,
                                                boolean disconnect)
Handles the failed delivery of a message, and sends the error to the appropriate place

Parameters:
bus - - the MessageBus that has received the message and errorMessage
message - - the message that has encountered the error
errorMessage - - the error message produced
e - - the exception received
disconnect - - true if the bus should be disconnected after the error has been sent

Errai 3.0.1-SNAPSHOT

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