libbmq  a5f8a06ba1d16cb5a65643e1fa7f1a1d6aadef40
BloombergLP::bmqa::MockSessionUtil Struct Reference

Utility methods to create bmqa events.

#include <bmqa_mocksession.h>

Classes

struct  AckParams
 Struct representing parameters for an ack message. More...
 
struct  PushMessageParams
 Struct representing parameters for a push message. More...
 

Static Public Member Functions

static Event createAckEvent (const bsl::vector< AckParams > &acks, bdlbb::BlobBufferFactory *bufferFactory, bslma::Allocator *allocator)
 
static Event createPushEvent (const bsl::vector< PushMessageParams > &pushEventParams, bdlbb::BlobBufferFactory *bufferFactory, bslma::Allocator *allocator)
 
static Event createQueueSessionEvent (bmqt::SessionEventType::Enum sessionEventType, QueueId *queueId, const bmqt::CorrelationId &correlationId, int errorCode, const bslstl::StringRef &errorDescription, bslma::Allocator *allocator)
 
static Event createSessionEvent (bmqt::SessionEventType::Enum sessionEventType, const bmqt::CorrelationId &correlationId, const int errorCode, const bslstl::StringRef &errorDescription, bslma::Allocator *allocator)
 
static OpenQueueStatus createOpenQueueStatus (const QueueId &queueId, bmqt::OpenQueueResult::Enum statusCode, const bsl::string &errorDescription, bslma::Allocator *allocator=0)
 
static ConfigureQueueStatus createConfigureQueueStatus (const QueueId &queueId, bmqt::ConfigureQueueResult::Enum statusCode, const bsl::string &errorDescription, bslma::Allocator *allocator=0)
 
static CloseQueueStatus createCloseQueueStatus (const QueueId &queueId, bmqt::CloseQueueResult::Enum statusCode, const bsl::string &errorDescription, bslma::Allocator *allocator=0)
 

Member Function Documentation

◆ createAckEvent()

static Event BloombergLP::bmqa::MockSessionUtil::createAckEvent ( const bsl::vector< AckParams > &  acks,
bdlbb::BlobBufferFactory *  bufferFactory,
bslma::Allocator *  allocator 
)
static

Create and return an Event configured as a message event of type e_ACK with the specified acks params using the specified bufferFactory and the specified allocator to supply memory.

◆ createPushEvent()

static Event BloombergLP::bmqa::MockSessionUtil::createPushEvent ( const bsl::vector< PushMessageParams > &  pushEventParams,
bdlbb::BlobBufferFactory *  bufferFactory,
bslma::Allocator *  allocator 
)
static

Create and return an Event configured as a message event of type e_PUSH and with the specified pushEventParams, using the specified bufferFactory and the specified allocator to supply memory.

◆ createQueueSessionEvent()

static Event BloombergLP::bmqa::MockSessionUtil::createQueueSessionEvent ( bmqt::SessionEventType::Enum  sessionEventType,
QueueId queueId,
const bmqt::CorrelationId correlationId,
int  errorCode,
const bslstl::StringRef &  errorDescription,
bslma::Allocator *  allocator 
)
static

DEPRECATED: Use the createOpenQueueStatus(...), createConfigureQueueStatus(...), or createCloseQueueStatus(...) methods instead. This method will be marked as BSLS_ANNOTATION_DEPRECATED in future release of libbmq.

◆ createSessionEvent()

static Event BloombergLP::bmqa::MockSessionUtil::createSessionEvent ( bmqt::SessionEventType::Enum  sessionEventType,
const bmqt::CorrelationId correlationId,
const int  errorCode,
const bslstl::StringRef &  errorDescription,
bslma::Allocator *  allocator 
)
static

Create and return an Event configured as a session event with the specified sessionEventType, errorCode and errorDescription and using the specified allocator to supply memory. Note that this method will not create queue related session events.

◆ createOpenQueueStatus()

static OpenQueueStatus BloombergLP::bmqa::MockSessionUtil::createOpenQueueStatus ( const QueueId queueId,
bmqt::OpenQueueResult::Enum  statusCode,
const bsl::string &  errorDescription,
bslma::Allocator *  allocator = 0 
)
static

Create and return a bmqa::OpenQueueStatus object with the specified queueId, statusCode, and errorDescription, using the optionally specified allocator to supply memory in the result.

◆ createConfigureQueueStatus()

static ConfigureQueueStatus BloombergLP::bmqa::MockSessionUtil::createConfigureQueueStatus ( const QueueId queueId,
bmqt::ConfigureQueueResult::Enum  statusCode,
const bsl::string &  errorDescription,
bslma::Allocator *  allocator = 0 
)
static

Create and return a bmqa::ConfigureQueueStatus object with the specified queueId, statusCode, and errorDescription, using the optionally specified allocator to supply memory in the result.

◆ createCloseQueueStatus()

static CloseQueueStatus BloombergLP::bmqa::MockSessionUtil::createCloseQueueStatus ( const QueueId queueId,
bmqt::CloseQueueResult::Enum  statusCode,
const bsl::string &  errorDescription,
bslma::Allocator *  allocator = 0 
)
static

Create and return a bmqa::CloseQueueStatus object with the specified queueId, statusCode, and errorDescription, using the optionally specified allocator to supply memory in the result.


The documentation for this struct was generated from the following file: