java.lang.Object | ||
↳ | com.rabbitmq.client.impl.ShutdownNotifierComponent | |
↳ | com.rabbitmq.client.impl.AMQConnection |
Concrete class representing and managing an AMQP connection to a broker.
To create a broker connection, use ConnectionFactory
. See Connection
for an example.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | HANDSHAKE_TIMEOUT | Timeout used while waiting for AMQP handshaking to complete (milliseconds) |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct a new connection using a default ExeceptionHandler
| |||||||||||
Construct a new connection
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public API - Abort this connection and all its channels.
| |||||||||||
Public API - Abort this connection and all its channels.
| |||||||||||
Public API - Abort this connection and all its channels
with the
com.rabbitmq.client.AMQP close code
and message 'OK'. | |||||||||||
Public API - Abort this connection and all its channels
with the
com.rabbitmq.client.AMQP close code
and message 'OK'. | |||||||||||
Public API - Close this connection and all its channels.
| |||||||||||
Public API - Close this connection and all its channels
with the
com.rabbitmq.client.AMQP close code
and message 'OK'. | |||||||||||
Protected API - Delegates to
the
six-argument close method , passing -1 for the timeout, and
false for the abort flag. | |||||||||||
Protected API - Close this connection with the given code, message, source
and timeout value for all the close operations to complete.
| |||||||||||
Public API - Close this connection and all its channels
with the
com.rabbitmq.client.AMQP close code
and message 'OK'. | |||||||||||
Public API - Close this connection and all its channels.
| |||||||||||
Public API - Create a new channel, using an internally allocated channel number.
| |||||||||||
Public API - Create a new channel, using the specified channel number if possible.
| |||||||||||
Retrieve a copy of the default table of client properties that
will be sent to the server during connection startup.
| |||||||||||
Protected API - respond, in the driver thread, to a ShutdownSignal.
| |||||||||||
Retrieve the host.
| |||||||||||
Get the negotiated maximum channel number.
| |||||||||||
Get a copy of the map of client properties sent to the server
| |||||||||||
Protected API - retrieve the current ExceptionHandler
| |||||||||||
Get the negotiated maximum frame size.
| |||||||||||
Get the negotiated heartbeat interval.
| |||||||||||
Retrieve the port number.
| |||||||||||
Retrieve the server properties.
| |||||||||||
Handles incoming control commands on channel zero.
| |||||||||||
Protected API - set the heartbeat timeout.
| |||||||||||
Protected API - causes all attached channels to terminate with
a ShutdownSignal built from the argument, and stops this
connection from accepting further work from the application.
| |||||||||||
Start up the connection, including the MainLoop thread.
| |||||||||||
Public API - sends a frame directly to the broker.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.rabbitmq.client.impl.ShutdownNotifierComponent
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.rabbitmq.client.Connection
| |||||||||||
From interface
com.rabbitmq.client.ShutdownNotifier
|
Timeout used while waiting for AMQP handshaking to complete (milliseconds)
Construct a new connection using a default ExeceptionHandler
username | name used to establish connection |
---|---|
password | for username |
frameHandler | for sending and receiving frames on this connection |
executor | thread pool service for consumer threads for channels on this connection |
clientProperties | client info used in negotiating with the server |
requestedFrameMax | max size of frame offered |
requestedChannelMax | max number of channels offered |
requestedHeartbeat | heart-beat in seconds offered |
saslConfig | sasl configuration hook |
Construct a new connection
username | name used to establish connection |
---|---|
password | for username |
frameHandler | for sending and receiving frames on this connection |
executor | thread pool service for consumer threads for channels on this connection |
clientProperties | client info used in negotiating with the server |
requestedFrameMax | max size of frame offered |
requestedChannelMax | max number of channels offered |
requestedHeartbeat | heart-beat in seconds offered |
saslConfig | sasl configuration hook |
execeptionHandler | handler for exceptions using this connection |
Public API - Abort this connection and all its channels. Forces the connection to close and waits with the given timeout for all the close operations to complete. When timeout is reached the socket is forced to close. Any encountered exceptions in the close operations are silently discarded.
closeCode | the close code (See under "Reply Codes" in the AMQP specification) |
---|---|
closeMessage | a message indicating the reason for closing the connection |
timeout | timeout (in milliseconds) for completing all the close-related operations, use -1 for infinity |
Public API - Abort this connection and all its channels. Forces the connection to close and waits for all the close operations to complete. Any encountered exceptions in the close operations are silently discarded.
closeCode | the close code (See under "Reply Codes" in the AMQP specification) |
---|---|
closeMessage | a message indicating the reason for closing the connection |
Public API - Abort this connection and all its channels
with the com.rabbitmq.client.AMQP
close code
and message 'OK'.
This method behaves in a similar way as abort()
, with the only difference
that it waits with a provided timeout for all the close operations to
complete. When timeout is reached the socket is forced to close.
timeout | timeout (in milliseconds) for completing all the close-related operations, use -1 for infinity |
---|
Public API - Abort this connection and all its channels
with the com.rabbitmq.client.AMQP
close code
and message 'OK'.
Forces the connection to close.
Any encountered exceptions in the close operations are silently discarded.
Public API - Close this connection and all its channels. Waits for all the close operations to complete.
closeCode | the close code (See under "Reply Codes" in the AMQP specification) |
---|---|
closeMessage | a message indicating the reason for closing the connection |
IOException |
---|
Public API - Close this connection and all its channels
with the com.rabbitmq.client.AMQP
close code
and message 'OK'.
Waits for all the close operations to complete.
IOException |
---|
Protected API - Delegates to the
six-argument close method
, passing -1 for the timeout, and
false for the abort flag.
IOException |
---|
Protected API - Close this connection with the given code, message, source and timeout value for all the close operations to complete. Specifies if any encountered exceptions should be ignored.
IOException |
---|
Public API - Close this connection and all its channels
with the com.rabbitmq.client.AMQP
close code
and message 'OK'.
This method behaves in a similar way as close()
, with the only difference
that it waits with a provided timeout for all the close operations to
complete. When timeout is reached the socket is forced to close.
timeout | timeout (in milliseconds) for completing all the close-related operations, use -1 for infinity |
---|
IOException |
---|
Public API - Close this connection and all its channels. Waits with the given timeout for all the close operations to complete. When timeout is reached the socket is forced to close.
closeCode | the close code (See under "Reply Codes" in the AMQP specification) |
---|---|
closeMessage | a message indicating the reason for closing the connection |
timeout | timeout (in milliseconds) for completing all the close-related operations, use -1 for infinity |
IOException |
---|
Public API - Create a new channel, using an internally allocated channel number.
IOException |
---|
Public API - Create a new channel, using the specified channel number if possible.
channelNumber | the channel number to allocate |
---|
IOException |
---|
Retrieve a copy of the default table of client properties that will be sent to the server during connection startup. This method is called when each new ConnectionFactory instance is constructed.
Protected API - respond, in the driver thread, to a ShutdownSignal.
channel | the channel to disconnect |
---|
Retrieve the host.
Get the negotiated maximum channel number. Usable channel numbers range from 1 to this number, inclusive.
Get a copy of the map of client properties sent to the server
Protected API - retrieve the current ExceptionHandler
Get the negotiated maximum frame size.
Get the negotiated heartbeat interval.
Retrieve the port number.
Retrieve the server properties.
Protected API - set the heartbeat timeout. Should only be called during tuning.
Protected API - causes all attached channels to terminate with a ShutdownSignal built from the argument, and stops this connection from accepting further work from the application.
Start up the connection, including the MainLoop thread. Sends the protocol version negotiation header, and runs through Connection.Start/.StartOk, Connection.Tune/.TuneOk, and then calls Connection.Open and waits for the OpenOk. Sets heart-beat and frame max values after tuning has taken place.
IOException | if an error is encountered
either before, or during, protocol negotiation;
sub-classes ProtocolVersionMismatchException and
PossibleAuthenticationFailureException will be thrown in the
corresponding circumstances. If an exception is thrown, connection
resources allocated can all be garbage collected when the connection
object is no longer referenced.
|
---|
Public API - sends a frame directly to the broker.
IOException |
---|