java.lang.Object | |
↳ | com.rabbitmq.client.ConnectionFactory |
Convenience "factory" class to facilitate opening a Connection
to an AMQP broker.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | DEFAULT_AMQP_OVER_SSL_PORT | The default ssl port | |||||||||
int | DEFAULT_CHANNEL_MAX | Default maximum channel number; zero for unlimited | |||||||||
int | DEFAULT_CONNECTION_TIMEOUT | The default connection timeout; zero means wait indefinitely | |||||||||
int | DEFAULT_FRAME_MAX | Default maximum frame size; zero means no limit | |||||||||
int | DEFAULT_HEARTBEAT | Default heart-beat interval; zero means no heart-beats | |||||||||
String | DEFAULT_HOST | The default host | |||||||||
int | DEFAULT_NUM_CONSUMER_THREADS | Default Executor threads | |||||||||
String | DEFAULT_PASS | Default password | |||||||||
String | DEFAULT_USER | Default user name | |||||||||
String | DEFAULT_VHOST | Default virtual host | |||||||||
int | USE_DEFAULT_PORT | 'Use the default port' port |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DEFAULT_AMQP_PORT | The default non-ssl port |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieve the currently-configured table of client properties
that will be sent to the server during connection
startup.
| |||||||||||
Retrieve the connection timeout.
| |||||||||||
Retrieve the password.
| |||||||||||
Retrieve the requested maximum channel number
| |||||||||||
Retrieve the requested maximum frame size
| |||||||||||
Retrieve the requested heartbeat interval.
| |||||||||||
Gets the sasl config to use when authenticating@return
| |||||||||||
Retrieve the socket factory used to make connections with.
| |||||||||||
Retrieve the user name.
| |||||||||||
Retrieve the virtual host.
| |||||||||||
Create a new broker connection
| |||||||||||
Create a new broker connection
| |||||||||||
Create a new broker connection
| |||||||||||
Create a new broker connection
| |||||||||||
Replace the table of client properties that will be sent to the
server during subsequent connection startups.
| |||||||||||
Set the connection timeout.
| |||||||||||
Set the password.
| |||||||||||
Set the target port.
| |||||||||||
Set the requested maximum channel number
| |||||||||||
Set the requested maximum frame size
| |||||||||||
Set the requested heartbeat.
| |||||||||||
Sets the sasl config to use when authenticating
| |||||||||||
Set the socket factory used to make connections with.
| |||||||||||
Convenience method for setting the fields in an AMQP URI: host,
port, username, password and virtual host.
| |||||||||||
Convenience method for setting the fields in an AMQP URI: host,
port, username, password and virtual host.
| |||||||||||
Set the user name.
| |||||||||||
Set the virtual host.
| |||||||||||
Convenience method for setting up an SSL socket factory.
| |||||||||||
Convenience method for setting up a SSL socket factory, using
the supplied protocol and a very trusting TrustManager.
| |||||||||||
Convenience method for setting up an SSL socket factory.
| |||||||||||
Convenience method for setting up a SSL socket factory, using
the DEFAULT_SSL_PROTOCOL and a trusting TrustManager.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Provides a hook to insert custom configuration of the sockets
used to connect to an AMQP server before they connect.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The default ssl port
Default maximum channel number; zero for unlimited
The default connection timeout; zero means wait indefinitely
Default maximum frame size; zero means no limit
Default heart-beat interval; zero means no heart-beats
Default Executor threads
'Use the default port' port
The default non-ssl port
Retrieve the currently-configured table of client properties that will be sent to the server during connection startup. Clients may add, delete, and alter keys in this table. Such changes will take effect when the next new connection is started using this factory.
Retrieve the connection timeout.
Retrieve the password.
Retrieve the requested maximum channel number
Retrieve the requested maximum frame size
Retrieve the requested heartbeat interval.
Retrieve the user name.
Retrieve the virtual host.
Create a new broker connection
addrs | an array of known broker addresses (hostname/port pairs) to try in order |
---|
IOException | if it encounters a problem |
---|
Create a new broker connection
executor | thread execution service for consumers on the connection |
---|
IOException | if it encounters a problem |
---|
Create a new broker connection
executor | thread execution service for consumers on the connection |
---|---|
addrs | an array of known broker addresses (hostname/port pairs) to try in order |
IOException | if it encounters a problem |
---|
Create a new broker connection
IOException | if it encounters a problem |
---|
Replace the table of client properties that will be sent to the server during subsequent connection startups.
clientProperties | the map of extra client properties |
---|
Set the connection timeout.
connectionTimeout | connection establishment timeout in milliseconds; zero for infinite |
---|
numConsumerThreads | threads in created private executor service |
---|
Set the password.
password | the password to use when connecting to the broker |
---|
Set the target port.
port | the default port to use for connections |
---|
Set the requested maximum channel number
requestedChannelMax | initially requested maximum channel number; zero for unlimited |
---|
Set the requested maximum frame size
requestedFrameMax | initially requested maximum frame size, in octets; zero for unlimited |
---|
Set the requested heartbeat.
requestedHeartbeat | the initially requested heartbeat interval, in seconds; zero for none |
---|
Sets the sasl config to use when authenticating
Set the socket factory used to make connections with. Can be used to enable SSL connections by passing in a javax.net.ssl.SSLSocketFactory instance.
Convenience method for setting the fields in an AMQP URI: host, port, username, password and virtual host. If any part of the URI is ommited, the ConnectionFactory's corresponding variable is left unchanged.
uri | is the AMQP URI containing the data |
---|
Convenience method for setting the fields in an AMQP URI: host, port, username, password and virtual host. If any part of the URI is ommited, the ConnectionFactory's corresponding variable is left unchanged. Note that not all valid AMQP URIs are accepted; in particular, the hostname must be given if the port, username or password are given, and escapes in the hostname are not permitted.
uriString | is the AMQP URI containing the data |
---|
Set the user name.
username | the AMQP user name to use when connecting to the broker |
---|
Set the virtual host.
virtualHost | the virtual host to use when connecting to the broker |
---|
Convenience method for setting up an SSL socket factory. Pass in an initialized SSLContext.
context | An initialized SSLContext |
---|
Convenience method for setting up a SSL socket factory, using the supplied protocol and a very trusting TrustManager.
Convenience method for setting up an SSL socket factory. Pass in the SSL protocol to use, e.g. "TLS" or "SSLv3".
protocol | SSL protocol to use. |
---|
Convenience method for setting up a SSL socket factory, using the DEFAULT_SSL_PROTOCOL and a trusting TrustManager.
Provides a hook to insert custom configuration of the sockets used to connect to an AMQP server before they connect. The default behaviour of this method is to disable Nagle's algorithm to get more consistently low latency. However it may be overridden freely and there is no requirement to retain this behaviour.
socket | The socket that is to be used for the Connection |
---|
IOException |
---|