Quick Links:

bmqa | bmqpi | bmqt

Classes | Static Public Member Functions

bmqa::MockSessionUtil Struct Reference

#include <bmqa_mocksession.h>

List of all members.

Classes

struct  AckParams
struct  PushMessageParams

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)

Detailed Description

Utility methods to create bmqa events

See Component bmqa_mocksession


Member Function Documentation

static Event 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.

static Event 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.

static Event 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.

static Event 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.

static OpenQueueStatus 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.

static ConfigureQueueStatus 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.

static CloseQueueStatus 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: