|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.rabbitmq.client.ConnectionFactory
public class ConnectionFactory
Convenience "factory" class to facilitate opening a Connection to an AMQP broker.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_SSL_PROTOCOL
The default SSL protocol (currently "SSLv3"). |
| Constructor Summary | |
|---|---|
ConnectionFactory()
Instantiate a ConnectionFactory with a default set of parameters. |
|
ConnectionFactory(ConnectionParameters params)
Instantiate a ConnectionFactory with the given connection parameters. |
|
| Method Summary | |
|---|---|
protected FrameHandler |
createFrameHandler(Address addr)
|
ConnectionParameters |
getParameters()
Retrieve the connection parameters. |
javax.net.SocketFactory |
getSocketFactory()
Retrieve the socket factory used to make connections with. |
Connection |
newConnection(Address[] addrs)
Create a new broker connection (no redirects allowed) |
Connection |
newConnection(Address[] addrs,
int maxRedirects)
Create a new broker connection |
Connection |
newConnection(java.lang.String hostName)
Create a new broker connection, using the default AMQP port |
Connection |
newConnection(java.lang.String hostName,
int portNumber)
Instantiates a connection and return an interface to it. |
void |
setSocketFactory(javax.net.SocketFactory factory)
Set the socket factory used to make connections with. |
void |
useSslProtocol()
Convenience method for setting up a SSL socket factory, using the DEFAULT_SSL_PROTOCOL and a trusting TrustManager. |
void |
useSslProtocol(java.lang.String protocol)
Convenience method for setting up a SSL socket factory, using the DEFAULT_SSL_PROTOCOL and a trusting TrustManager. |
void |
useSslProtocol(java.lang.String protocol,
javax.net.ssl.TrustManager trustManager)
Convenience method for setting up an SSL socket factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_SSL_PROTOCOL
| Constructor Detail |
|---|
public ConnectionFactory()
public ConnectionFactory(ConnectionParameters params)
params - the relevant parameters for instantiating the broker connection| Method Detail |
|---|
public ConnectionParameters getParameters()
public javax.net.SocketFactory getSocketFactory()
public void setSocketFactory(javax.net.SocketFactory factory)
useSslProtocol()
public void useSslProtocol()
throws java.security.NoSuchAlgorithmException,
java.security.KeyManagementException
java.security.NoSuchAlgorithmException
java.security.KeyManagementException
public void useSslProtocol(java.lang.String protocol)
throws java.security.NoSuchAlgorithmException,
java.security.KeyManagementException
java.security.NoSuchAlgorithmException
java.security.KeyManagementException
public void useSslProtocol(java.lang.String protocol,
javax.net.ssl.TrustManager trustManager)
throws java.security.NoSuchAlgorithmException,
java.security.KeyManagementException
protocol - SSL protocol to use.
java.security.NoSuchAlgorithmException
java.security.KeyManagementException
protected FrameHandler createFrameHandler(Address addr)
throws java.io.IOException
java.io.IOException
public Connection newConnection(Address[] addrs,
int maxRedirects)
throws java.io.IOException
addrs - an array of known broker addresses (hostname/port pairs) to try in ordermaxRedirects - the maximum allowable number of redirects
java.io.IOException - if it encounters a problem
public Connection newConnection(Address[] addrs)
throws java.io.IOException
addrs - an array of known broker addresses (hostname/port pairs) to try in order
java.io.IOException - if it encounters a problem
public Connection newConnection(java.lang.String hostName,
int portNumber)
throws java.io.IOException
hostName - the host to connect toportNumber - the port number to use
java.io.IOException - if it encounters a problem
public Connection newConnection(java.lang.String hostName)
throws java.io.IOException
hostName - the host to connect to
java.io.IOException - if it encounters a problem
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||