Habari STOMP Client for RabbitMQ 9.4
Object Pascal STOMP client library for RabbitMQ
Loading...
Searching...
No Matches
TBTMQContext Class Reference

This interface represents a messaging context. More...

Inheritance diagram for TBTMQContext:
IMQContext

Public Member Functions

 TBTMQContext (const IConnection Connection)
 Constructor.
 TBTMQContext (const IConnection Connection, const TAcknowledgementMode AcknowledgeMode)
 Constructor.

Protected Member Functions

 Close ()
 Closes the context.
 Commit ()
 Commits the context.
IQueueBrowser CreateBrowser (const string QueueName)
 Creates an IQueueBrowser object to peek at the messages on the specified queue.
IBytesMessage CreateBytesMessage ()
 Creates a new binary message.
IMQConsumer CreateConsumer (const IDestination Destination)
 Creates an IMQConsumer for the specified destination.
IMQConsumer CreateConsumer (const IDestination Destination, const string MessageSelector)
 Creates an IMQConsumer for the specified destination, using a message selector.
ITopicSubscriber CreateDurableSubscriber (const ITopic Topic, const string Name)
 Creates a durable subscriber to the specified topic.
ITopicSubscriber CreateDurableSubscriber (const ITopic Topic, const string Name, const string MessageSelector)
 Creates a durable subscriber to the specified topic, using a message selector.
IMapMessage CreateMapMessage ()
 Creates a new map message.
IObjectMessage CreateObjectMessage ()
 Creates a new object message.
IObjectMessage CreateObjectMessage (const TObject AObject)
 Creates a new object message with the given object.
IMQProducer CreateProducer ()
 Creates a Producer object which can be used to configure and send messages.
IQueue CreateQueue (const string QueueName)
 Creates a Queue object which encapsulates a specified provider-specific queue name.
ITemporaryQueue CreateTemporaryQueue ()
 Creates an ITemporaryQueue object.
ITemporaryTopic CreateTemporaryTopic ()
 Creates an ITemporaryTopic object.
ITextMessage CreateTextMessage ()
 Creates a new text message with an empty body.
ITextMessage CreateTextMessage (const string Text)
 Creates a new text message with the given body.
ITopic CreateTopic (const string TopicName)
 Creates an ITopic object which encapsulates a specified provider-specific topic name.
TAcknowledgementMode GetAcknowledgeMode ()
 Returns the acknowledgement mode of the context.
string GetClientID ()
 Returns the client id.
Boolean GetTransacted ()
 Indicates whether the session is in transacted mode.
 Rollback ()
 Rolls back the context.
 Start ()
 Starts the context.
 Stop ()
 Stops the context.
 Unsubscribe (const string Destination, const string Name)
 Unsubscribes a durable subscription that has been created by a client.
IMessageTransformer GetTransformer ()
 SetTransformer (const IMessageTransformer Transformer)
 SetMapMessageTransformationId (const string ATransformationId)
 SetObjectMessageTransformationId (const string ATransformationId)
 SendHeartbeat ()
 CheckHeartbeat ()
Boolean ReceiveHeartbeat (Integer ATimeOut)
Boolean TransportConnected ()
string StompSessionID ()
string StompServerName ()
TStompProtocolVersion StompProtocolVersion ()

Detailed Description

This interface represents a messaging context.

Constructor & Destructor Documentation

◆ TBTMQContext() [1/2]

TBTMQContext::TBTMQContext ( const IConnection Connection)

Constructor.

◆ TBTMQContext() [2/2]

TBTMQContext::TBTMQContext ( const IConnection Connection,
const TAcknowledgementMode AcknowledgeMode )

Constructor.

Member Function Documentation

◆ CheckHeartbeat()

TBTMQContext::CheckHeartbeat ( )
protected

◆ Close()

TBTMQContext::Close ( )
protected

Closes the context.

Implements IMQContext.

◆ Commit()

TBTMQContext::Commit ( )
protected

Commits the context.

Implements IMQContext.

◆ CreateBrowser()

IQueueBrowser TBTMQContext::CreateBrowser ( const string QueueName)
protected

Creates an IQueueBrowser object to peek at the messages on the specified queue.

Implements IMQContext.

◆ CreateBytesMessage()

IBytesMessage TBTMQContext::CreateBytesMessage ( )
protected

Creates a new binary message.

Implements IMQContext.

◆ CreateConsumer() [1/2]

IMQConsumer TBTMQContext::CreateConsumer ( const IDestination Destination)
protected

Creates an IMQConsumer for the specified destination.

Parameters
Destinationthe IDestination to access
Returns
the consumer

Implements IMQContext.

◆ CreateConsumer() [2/2]

IMQConsumer TBTMQContext::CreateConsumer ( const IDestination Destination,
const string MessageSelector )
protected

Creates an IMQConsumer for the specified destination, using a message selector.

Parameters
Destinationthe IDestination to access
MessageSelectoronly messages with properties matching the message selector expression are delivered. An empty string indicates that there is no message selector for the message consumer.
Returns
the consumer
Note
MessageSelector is not supported by RabbitMQ

Implements IMQContext.

◆ CreateDurableSubscriber() [1/2]

ITopicSubscriber TBTMQContext::CreateDurableSubscriber ( const ITopic Topic,
const string Name )
protected

Creates a durable subscriber to the specified topic.

Parameters
Topicthe ITopic to access
Namethe name used to identify this subscription
Returns
the durable subscriber

Implements IMQContext.

◆ CreateDurableSubscriber() [2/2]

ITopicSubscriber TBTMQContext::CreateDurableSubscriber ( const ITopic Topic,
const string Name,
const string MessageSelector )
protected

Creates a durable subscriber to the specified topic, using a message selector.

Parameters
Topicthe ITopic to access
Namethe name used to identify this subscription
MessageSelectoronly messages with properties matching the message selector expression are delivered. An empty string indicates that there is no message selector for the message consumer.
Returns
the durable subscriber
Note
MessageSelector is not supported by RabbitMQ

Implements IMQContext.

◆ CreateMapMessage()

IMapMessage TBTMQContext::CreateMapMessage ( )
protected

Creates a new map message.

Implements IMQContext.

◆ CreateObjectMessage() [1/2]

IObjectMessage TBTMQContext::CreateObjectMessage ( )
protected

Creates a new object message.

Implements IMQContext.

◆ CreateObjectMessage() [2/2]

IObjectMessage TBTMQContext::CreateObjectMessage ( const TObject AObject)
protected

Creates a new object message with the given object.

Implements IMQContext.

◆ CreateProducer()

IMQProducer TBTMQContext::CreateProducer ( )
protected

Creates a Producer object which can be used to configure and send messages.

Implements IMQContext.

◆ CreateQueue()

IQueue TBTMQContext::CreateQueue ( const string QueueName)
protected

Creates a Queue object which encapsulates a specified provider-specific queue name.

Implements IMQContext.

◆ CreateTemporaryQueue()

ITemporaryQueue TBTMQContext::CreateTemporaryQueue ( )
protected

Creates an ITemporaryQueue object.

Its lifetime will be that of the IConnection unless it is deleted earlier.

Implements IMQContext.

◆ CreateTemporaryTopic()

ITemporaryTopic TBTMQContext::CreateTemporaryTopic ( )
protected

Creates an ITemporaryTopic object.

Its lifetime will be that of the IConnection unless it is deleted earlier.

Implements IMQContext.

◆ CreateTextMessage() [1/2]

ITextMessage TBTMQContext::CreateTextMessage ( )
protected

Creates a new text message with an empty body.

Implements IMQContext.

◆ CreateTextMessage() [2/2]

ITextMessage TBTMQContext::CreateTextMessage ( const string Text)
protected

Creates a new text message with the given body.

Implements IMQContext.

◆ CreateTopic()

ITopic TBTMQContext::CreateTopic ( const string TopicName)
protected

Creates an ITopic object which encapsulates a specified provider-specific topic name.

Implements IMQContext.

◆ GetAcknowledgeMode()

TAcknowledgementMode TBTMQContext::GetAcknowledgeMode ( )
protected

Returns the acknowledgement mode of the context.

Implements IMQContext.

◆ GetClientID()

string TBTMQContext::GetClientID ( )
protected

Returns the client id.

Implements IMQContext.

◆ GetTransacted()

Boolean TBTMQContext::GetTransacted ( )
protected

Indicates whether the session is in transacted mode.

Implements IMQContext.

◆ GetTransformer()

IMessageTransformer TBTMQContext::GetTransformer ( )
protected

◆ ReceiveHeartbeat()

Boolean TBTMQContext::ReceiveHeartbeat ( Integer ATimeOut)
protected

◆ Rollback()

TBTMQContext::Rollback ( )
protected

Rolls back the context.

Implements IMQContext.

◆ SendHeartbeat()

TBTMQContext::SendHeartbeat ( )
protected

◆ SetMapMessageTransformationId()

TBTMQContext::SetMapMessageTransformationId ( const string ATransformationId)
protected

◆ SetObjectMessageTransformationId()

TBTMQContext::SetObjectMessageTransformationId ( const string ATransformationId)
protected

◆ SetTransformer()

TBTMQContext::SetTransformer ( const IMessageTransformer Transformer)
protected

◆ Start()

TBTMQContext::Start ( )
protected

Starts the context.

Implements IMQContext.

◆ StompProtocolVersion()

TStompProtocolVersion TBTMQContext::StompProtocolVersion ( )
protected

◆ StompServerName()

string TBTMQContext::StompServerName ( )
protected

◆ StompSessionID()

string TBTMQContext::StompSessionID ( )
protected

◆ Stop()

TBTMQContext::Stop ( )
protected

Stops the context.

Implements IMQContext.

◆ TransportConnected()

Boolean TBTMQContext::TransportConnected ( )
protected

◆ Unsubscribe()

TBTMQContext::Unsubscribe ( const string Destination,
const string Name )
protected

Unsubscribes a durable subscription that has been created by a client.

Implements IMQContext.