![]() |
Habari Client for RabbitMQ
6.8
Object Pascal STOMP client library for RabbitMQ
|
A Connection object is a client's active connection to its provider. More...
Public Member Functions | |
TBTConnection | MakeConnection () |
A static helper method to create a new connection. | |
TBTConnection | MakeConnection (const string UserName, const string Password, const string URL) |
A static helper method to create a new connection. | |
Boolean | TransportConnected () |
Is the transport layer connected? More... | |
string | StompSessionID () |
Stomp session ID. More... | |
string | StompServerName () |
Stomp server name. More... | |
TStompProtocolVersion | StompProtocolVersion () |
Stomp protocol version of the current connection. More... | |
Start () | |
Starts (or restarts) a connection's delivery of incoming messages. More... | |
Stop () | |
Temporarily stops a connection's delivery of incoming messages. More... | |
Close () | |
Closes the connection. More... | |
ISession | CreateSession (const Boolean Transacted, const TAcknowledgementMode AcknowledgementMode) |
Creates a new session to work on this connection, specifying transacted and acknowledgeMode. More... | |
ISession | CreateSession (const TAcknowledgementMode ASessionMode) |
Creates a new session to work on this connection, specifying sessionMode. More... | |
SetDefaultClientID (const string Value) | |
Sets the default client id that the connection will use if explicitly not set with the SetClientID call. | |
SetTransformer (const IMessageTransformer Transformer) | |
Set the message transformer. | |
IMessageTransformer | GetTransformer () |
Get the message transformer. | |
Public Attributes | |
string | ClientID |
The client identifier for this connection. More... | |
Boolean | Closed |
Returns true if the connection is closed. More... | |
Boolean | Closing |
Returns true if the connection is in the process of being closed. More... | |
Integer | ConnectTimeOut |
Connect time out. More... | |
Integer | SendTimeOut |
Send time out. More... | |
Boolean | Started |
Returns true if this connection has been started. More... | |
TBTAbstractTransport | Transport |
The transport. More... | |
Protected Member Functions | |
CheckClosedOrFailed () | |
simply throws an exception if the Connection is already closed or the Transport has failed More... | |
CheckClientIDWasManuallySpecified () | |
Ensures that the ClientID was manually specified and not auto-generated. More... | |
Boolean | ReceiveHeartbeat (const Integer ATimeout) |
Try to receive server heartbeat. More... | |
A Connection object is a client's active connection to its provider.
A connection serves several purposes:
|
protected |
Ensures that the ClientID was manually specified and not auto-generated.
If the ClientID was not specified this method will throw an exception. This method is used to ensure that the ClientID + durableSubscriber name are used correctly.
|
protected |
simply throws an exception if the Connection is already closed or the Transport has failed
EJMSException |
TBTConnection::Close | ( | ) |
Closes the connection.
Since a provider typically allocates significant resources on behalf of a connection, clients should close these resources when they are not needed.
ISession TBTConnection::CreateSession | ( | const Boolean | Transacted, |
const TAcknowledgementMode | AcknowledgementMode | ||
) |
Creates a new session to work on this connection, specifying transacted and acknowledgeMode.
Transacted | - indicates whether the session is transacted |
AcknowledgementMode | amTransactional, amClientAcknowledge, amAutoAcknowledge. Some brokers also support amClientIndividual (see documentation). |
ISession TBTConnection::CreateSession | ( | const TAcknowledgementMode | ASessionMode | ) |
Creates a new session to work on this connection, specifying sessionMode.
ASessionMode | amTransactional, amClientAcknowledge, amAutoAcknowledge. Some brokers also support amClientIndividual (see documentation). |
|
protected |
Try to receive server heartbeat.
Requires Stomp 1.1
ATimeout | timeout |
TBTConnection::Start | ( | ) |
Starts (or restarts) a connection's delivery of incoming messages.
A call to start on a connection that has already been started is ignored.
TStompProtocolVersion TBTConnection::StompProtocolVersion | ( | ) |
Stomp protocol version of the current connection.
string TBTConnection::StompServerName | ( | ) |
Stomp server name.
string TBTConnection::StompSessionID | ( | ) |
Stomp session ID.
TBTConnection::Stop | ( | ) |
Temporarily stops a connection's delivery of incoming messages.
Delivery can be restarted using the connection's Start method.
When the connection is stopped, delivery to all the connection's message consumers is inhibited: synchronous receives block, and messages are not delivered to message listeners.
This call blocks until receives and/or message listeners in progress have completed.
Stopping a connection has no effect on its ability to send messages. A call to stop on a connection that has already been stopped is ignored.
Boolean TBTConnection::TransportConnected | ( | ) |
Is the transport layer connected?
string TBTConnection::ClientID |
The client identifier for this connection.
Not required with RabbitMQ.
Boolean TBTConnection::Closed |
Returns true if the connection is closed.
Boolean TBTConnection::Closing |
Returns true if the connection is in the process of being closed.
Integer TBTConnection::ConnectTimeOut |
Connect time out.
Integer TBTConnection::SendTimeOut |
Send time out.
Boolean TBTConnection::Started |
Returns true if this connection has been started.
TBTAbstractTransport TBTConnection::Transport |
The transport.