Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.client.framework.transports
Class BusTransportError

java.lang.Object
  extended by org.jboss.errai.bus.client.framework.transports.BusTransportError
All Implemented Interfaces:
TransportError

public final class BusTransportError
extends Object
implements TransportError

Author:
Mike Brock

Constructor Summary
BusTransportError(TransportHandler source, com.google.gwt.http.client.Request request, Throwable throwable, int statusCode, RetryInfo retryInfo)
           
 
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 isStopDefaultErrorHandler()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BusTransportError

public BusTransportError(TransportHandler source,
                         com.google.gwt.http.client.Request request,
                         Throwable throwable,
                         int statusCode,
                         RetryInfo retryInfo)
Method Detail

getSource

public TransportHandler getSource()
Description copied from interface: TransportError
The TransportHandler where this error came from. Never null.

Specified by:
getSource in interface TransportError

getRequest

public com.google.gwt.http.client.Request getRequest()
Description copied from interface: TransportError
The Request associated with the error.

Specified by:
getRequest in interface TransportError
Returns:

getErrorMessage

public String getErrorMessage()
Description copied from interface: TransportError
An error message associated with the error, if applicable. Otherwise an empty string is returned.

Specified by:
getErrorMessage in interface TransportError
Returns:

isHTTP

public boolean isHTTP()
Description copied from interface: TransportError
Returns true if the error occurred as the result of an HTTP request.

Specified by:
isHTTP in interface TransportError
Returns:
true if HTTP

isWebSocket

public boolean isWebSocket()
Description copied from interface: TransportError
Returns true if the error occurred as a result of a problem with a WebSockets channel.

Specified by:
isWebSocket in interface TransportError
Returns:
true if WebSockets

getStatusCode

public int getStatusCode()
Description copied from interface: TransportError
Any applicable HTTP status code with the error. Otherwise returns -1.

Specified by:
getStatusCode in interface TransportError
Returns:
an HTTP status code.

getException

public Throwable getException()
Description copied from interface: TransportError
Any exception associated with the error. Returns null if there's no relevant exception.

Specified by:
getException in interface TransportError
Returns:

stopDefaultErrorHandling

public void stopDefaultErrorHandling()
Description copied from interface: TransportError
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.

Specified by:
stopDefaultErrorHandling in interface TransportError

isStopDefaultErrorHandler

public boolean isStopDefaultErrorHandler()

getRetryInfo

public RetryInfo getRetryInfo()
Description copied from interface: TransportError
Provides the retry information for the failed action that led to this error.

Specified by:
getRetryInfo in interface TransportError
Returns:
A RetryInfo object. Never null.

Errai 3.0.1-SNAPSHOT

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