Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.client.api
Interface TransportError

All Known Implementing Classes:
BusTransportError

public interface TransportError

A class representing the details of a network/transport error on the bus.

Author:
Mike Brock

Method Summary
 String getErrorMessage()
          An error message associated with the error, if applicable.
 Throwable getException()
          Any exception associated with the error.
 com.google.gwt.http.client.Request getRequest()
          The Request associated with the error.
 RetryInfo getRetryInfo()
          Provides the retry information for the failed action that led to this error.
 TransportHandler getSource()
          The TransportHandler where this error came from.
 int getStatusCode()
          Any applicable HTTP status code with the error.
 boolean isHTTP()
          Returns true if the error occurred as the result of an HTTP request.
 boolean isWebSocket()
          Returns true if the error occurred as a result of a problem with a WebSockets channel.
 void stopDefaultErrorHandling()
          Causes the ClientMessageBus to behave as if this error did not happen.
 

Method Detail

getSource

TransportHandler getSource()
The TransportHandler where this error came from. Never null.


getRequest

com.google.gwt.http.client.Request getRequest()
The Request associated with the error.

Returns:

getErrorMessage

String getErrorMessage()
An error message associated with the error, if applicable. Otherwise an empty string is returned.

Returns:

isHTTP

boolean isHTTP()
Returns true if the error occurred as the result of an HTTP request.

Returns:
true if HTTP

isWebSocket

boolean isWebSocket()
Returns true if the error occurred as a result of a problem with a WebSockets channel.

Returns:
true if WebSockets

getStatusCode

int getStatusCode()
Any applicable HTTP status code with the error. Otherwise returns -1.

Returns:
an HTTP status code.

getException

Throwable getException()
Any exception associated with the error. Returns null if there's no relevant exception.

Returns:

stopDefaultErrorHandling

void stopDefaultErrorHandling()
Causes the ClientMessageBus to behave as if this error did not happen. Suppressing default error handling has the following implications:

To recover from this indeterminate state, restart the bus by calling ClientMessageBus.stop(boolean) followed by ClientMessageBus.init() at a later time.


getRetryInfo

RetryInfo getRetryInfo()
Provides the retry information for the failed action that led to this error.

Returns:
A RetryInfo object. Never null.

Errai 3.0.1-SNAPSHOT

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