Class ClientRedirect
- java.lang.Object
-
- org.apache.qpid.protonj2.client.impl.ClientRedirect
-
public final class ClientRedirect extends java.lang.Object
Encapsulates the AMQP Redirect Map
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAddress()
java.lang.String
getHostname()
java.lang.String
getNetworkHost()
java.lang.String
getPath()
int
getPort()
java.util.Map<Symbol,java.lang.Object>
getRedirectMap()
java.lang.String
getScheme()
java.lang.String
toString()
java.net.URI
toURI()
Construct a URI from the redirection information available.ClientRedirect
validate()
Validate the information conveyed in the redirect and signal an error if it is invalid.
-
-
-
Method Detail
-
validate
public ClientRedirect validate() throws java.lang.Exception
Validate the information conveyed in the redirect and signal an error if it is invalid.- Returns:
- this
ClientRedirect
instance which can be assumed carries valid data. - Throws:
java.lang.Exception
- if an error occurs during validation of the redirect payload.
-
getRedirectMap
public java.util.Map<Symbol,java.lang.Object> getRedirectMap()
- Returns:
- the redirection map that backs this object
-
getHostname
public java.lang.String getHostname()
- Returns:
- the host name of the container being redirected to.
-
getNetworkHost
public java.lang.String getNetworkHost()
- Returns:
- the DNS host name or IP address of the peer this connection is being redirected to.
-
getPort
public int getPort()
- Returns:
- the port number on the peer this connection is being redirected to.
-
getScheme
public java.lang.String getScheme()
- Returns:
- the scheme that the remote indicated the redirect connection should use.
-
getPath
public java.lang.String getPath()
- Returns:
- the path that the remote indicated should be path of the redirect URI.
-
getAddress
public java.lang.String getAddress()
- Returns:
- the address that the remote indicated should be used for link redirection.
-
toURI
public java.net.URI toURI() throws java.lang.Exception
Construct a URI from the redirection information available.- Returns:
- a URI that matches the redirection information provided.
- Throws:
java.lang.Exception
- if an error occurs construct a URI from the redirection information.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-