com.rabbitmq.client
Class RedirectException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.rabbitmq.client.RedirectException
All Implemented Interfaces:
java.io.Serializable

public class RedirectException
extends java.lang.Exception

Encapsulates an exception requiring redirection to the next from a list of "known addresses"

See Also:
Serialized Form

Constructor Summary
RedirectException(Address address, Address[] knownAddresses)
          Construct a RedirectException from the given initialization parameters.
 
Method Summary
 Address getAddress()
          Returns the address to redirect to
 Address[] getKnownAddresses()
          Returns the known cluster addresses
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RedirectException

public RedirectException(Address address,
                         Address[] knownAddresses)
Construct a RedirectException from the given initialization parameters.

Parameters:
address - the address we are redirecting to
knownAddresses - the list of all known addresses
Method Detail

getAddress

public Address getAddress()
Returns the address to redirect to

Returns:
the redirection address

getKnownAddresses

public Address[] getKnownAddresses()
Returns the known cluster addresses

Returns:
an array of the known cluster addresses (each a hostname/port pair)