17 #ifndef INCLUDED_BMQA_SESSION
18 #define INCLUDED_BMQA_SESSION
567 #include <ball_log.h>
568 #include <bsl_memory.h>
569 #include <bsl_string.h>
570 #include <bslma_allocator.h>
571 #include <bslma_managedptr.h>
572 #include <bslma_usesbslmaallocator.h>
573 #include <bslmf_nestedtraitdeclaration.h>
574 #include <bsls_keyword.h>
575 #include <bsls_timeinterval.h>
576 #include <bsls_types.h>
588 class MessageGUIDGenerator;
600 class MessageProperties;
641 bslma::Allocator* d_allocator_p;
647 bslma::ManagedPtr<SessionEventHandler> d_eventHandler_mp;
650 bsl::shared_ptr<bmqp::MessageGUIDGenerator> d_guidGenerator_sp;
653 bslma::ManagedPtr<bmqimp::Application> d_application_mp;
657 SessionImpl(
const SessionImpl&) BSLS_KEYWORD_DELETED;
658 SessionImpl& operator=(
const SessionImpl&) BSLS_KEYWORD_DELETED;
662 BSLMF_NESTED_TRAIT_DECLARATION(SessionImpl, bslma::UsesBslmaAllocator)
669 bslma::ManagedPtr<SessionEventHandler> eventHandler,
670 bslma::Allocator* allocator = 0);
702 BALL_LOG_SET_CLASS_CATEGORY(
"BMQA.SESSION");
717 BSLMF_NESTED_TRAIT_DECLARATION(
Session, bslma::UsesBslmaAllocator)
727 const bmqt::SessionOptions& options = bmqt::SessionOptions(),
728 bslma::Allocator* allocator = 0);
737 const bmqt::SessionOptions& options = bmqt::SessionOptions(),
738 bslma::Allocator* allocator = 0);
757 int start(const bsls::TimeInterval& timeout = bsls::TimeInterval())
758 BSLS_KEYWORD_OVERRIDE;
768 int startAsync(const bsls::TimeInterval& timeout = bsls::TimeInterval())
769 BSLS_KEYWORD_OVERRIDE;
778 void stop() BSLS_KEYWORD_OVERRIDE;
817 BSLS_KEYWORD_OVERRIDE;
827 BSLS_KEYWORD_OVERRIDE;
847 const bmqt::Uri& uri) BSLS_KEYWORD_OVERRIDE;
854 BSLS_KEYWORD_OVERRIDE;
861 const bmqt::Uri& uri,
862 bsls::Types::Uint64 flags,
863 const bmqt::QueueOptions& options = bmqt::QueueOptions(),
864 const bsls::TimeInterval& timeout = bsls::TimeInterval())
865 BSLS_KEYWORD_OVERRIDE;
884 const bmqt::Uri& uri,
885 bsls::Types::Uint64 flags,
886 const bmqt::QueueOptions& options = bmqt::QueueOptions(),
887 const bsls::TimeInterval& timeout = bsls::TimeInterval())
888 BSLS_KEYWORD_OVERRIDE;
895 const bmqt::Uri& uri,
896 bsls::Types::Uint64 flags,
897 const bmqt::QueueOptions& options = bmqt::QueueOptions(),
898 const bsls::TimeInterval& timeout = bsls::TimeInterval());
906 const bmqt::Uri& uri,
907 bsls::Types::Uint64 flags,
908 const bmqt::QueueOptions& options = bmqt::QueueOptions(),
909 const bsls::TimeInterval& timeout = bsls::TimeInterval())
910 BSLS_KEYWORD_OVERRIDE;
930 const bmqt::Uri& uri,
931 bsls::Types::Uint64 flags,
933 const bmqt::QueueOptions& options = bmqt::QueueOptions(),
934 const bsls::TimeInterval& timeout = bsls::TimeInterval())
935 BSLS_KEYWORD_OVERRIDE;
942 const bmqt::QueueOptions& options,
943 const bsls::TimeInterval& timeout =
944 bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE;
965 const bmqt::QueueOptions& options,
966 const bsls::TimeInterval& timeout =
967 bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE;
974 const bmqt::QueueOptions& options,
975 const bsls::TimeInterval& timeout =
976 bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE;
996 const bmqt::QueueOptions& options,
998 const bsls::TimeInterval& timeout =
999 bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE;
1006 const bsls::TimeInterval& timeout = bsls::TimeInterval())
1007 BSLS_KEYWORD_OVERRIDE;
1027 const bsls::TimeInterval& timeout = bsls::TimeInterval())
1028 BSLS_KEYWORD_OVERRIDE;
1035 const bsls::TimeInterval& timeout = bsls::TimeInterval());
1042 const bsls::TimeInterval& timeout =
1043 bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE;
1064 const bsls::TimeInterval& timeout =
1065 bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE;
1073 const bsls::TimeInterval& timeout = bsls::TimeInterval());
1090 BSLS_KEYWORD_OVERRIDE;
1118 BSLS_KEYWORD_OVERRIDE;
1161 BSLS_KEYWORD_OVERRIDE;
Provide a pure protocol for a BlazingMQ session.
Provide Value-Semantic Type for a close queue operation status.
Provide a builder for batching confirmation messages.
Provide a builder for bmqa::MessageEvent objects.
Provide Value-Semantic Type for an open queue operation status.
Provide a value-semantic type for options related to a queue.
Provide a value-semantic type to configure session with the broker.
Provide value-semantic type and utilities for a BlazingMQ queue URI.
A pure protocol for a session.
Definition: bmqa_abstractsession.h:50
bsl::function< void(const bmqa::CloseQueueStatus &result)> CloseQueueCallback
Definition: bmqa_abstractsession.h:73
bsl::function< void(const bmqa::ConfigureQueueStatus &result)> ConfigureQueueCallback
Definition: bmqa_abstractsession.h:66
bsl::function< void(const bmqa::OpenQueueStatus &result)> OpenQueueCallback
Definition: bmqa_abstractsession.h:59
Definition: bmqa_closequeuestatus.h:62
Mechanism to build a batch of CONFIRM messages.
Definition: bmqa_confirmeventbuilder.h:157
A variant type encompassing all types of events.
Definition: bmqa_event.h:69
Cookie for async message confirmation.
Definition: bmqa_message.h:131
A builder for MessageEvent objects.
Definition: bmqa_messageeventbuilder.h:319
Definition: bmqa_messageevent.h:64
Provide a VST representing message properties.
Definition: bmqa_messageproperties.h:92
A message sent/received to/from the BlazingMQ broker.
Definition: bmqa_message.h:170
Definition: bmqa_openqueuestatus.h:62
Value-semantic efficient identifier for a queue.
Definition: bmqa_queueid.h:59
Definition: bmqa_session.h:611
virtual ~SessionEventHandler()
Destroy this object.
virtual void onSessionEvent(const SessionEvent &event)=0
virtual void onMessageEvent(const MessageEvent &event)=0
An event related to the operation of a Session.
Definition: bmqa_sessionevent.h:75
A session with a BlazingMQ broker.
Definition: bmqa_session.h:678
int closeQueue(QueueId *queueId, const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
int start(const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
OpenQueueStatus openQueueSync(QueueId *queueId, const bmqt::Uri &uri, bsls::Types::Uint64 flags, const bmqt::QueueOptions &options=bmqt::QueueOptions(), const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
void stopAsync() BSLS_KEYWORD_OVERRIDE
int confirmMessage(const Message &message) BSLS_KEYWORD_OVERRIDE
Definition: bmqa_session.h:1172
ConfigureQueueStatus configureQueueSync(QueueId *queueId, const bmqt::QueueOptions &options, const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
int confirmMessages(ConfirmEventBuilder *builder) BSLS_KEYWORD_OVERRIDE
int configureMessageDumping(const bslstl::StringRef &command) BSLS_KEYWORD_OVERRIDE
AbstractSession::CloseQueueCallback CloseQueueCallback
Definition: bmqa_session.h:698
void finalizeStop() BSLS_KEYWORD_OVERRIDE
int getQueueId(QueueId *queueId, const bmqt::Uri &uri) BSLS_KEYWORD_OVERRIDE
void stop() BSLS_KEYWORD_OVERRIDE
int openQueueAsync(QueueId *queueId, const bmqt::Uri &uri, bsls::Types::Uint64 flags, const bmqt::QueueOptions &options=bmqt::QueueOptions(), const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
CloseQueueStatus closeQueueSync(QueueId *queueId, const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
AbstractSession::OpenQueueCallback OpenQueueCallback
Definition: bmqa_session.h:686
Event nextEvent(const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
int startAsync(const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
int configureQueue(QueueId *queueId, const bmqt::QueueOptions &options, const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
int post(const MessageEvent &event) BSLS_KEYWORD_OVERRIDE
void loadConfirmEventBuilder(ConfirmEventBuilder *builder) BSLS_KEYWORD_OVERRIDE
void loadMessageProperties(MessageProperties *buffer) BSLS_KEYWORD_OVERRIDE
int openQueue(QueueId *queueId, const bmqt::Uri &uri, bsls::Types::Uint64 flags, const bmqt::QueueOptions &options=bmqt::QueueOptions(), const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
virtual MessageEventBuilder createMessageEventBuilder()
void loadMessageEventBuilder(MessageEventBuilder *builder) BSLS_KEYWORD_OVERRIDE
int closeQueueAsync(QueueId *queueId, const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
AbstractSession::ConfigureQueueCallback ConfigureQueueCallback
Definition: bmqa_session.h:692
int configureQueueAsync(QueueId *queueId, const bmqt::QueueOptions &options, const bsls::TimeInterval &timeout=bsls::TimeInterval()) BSLS_KEYWORD_OVERRIDE
Definition: bmqt_sessionoptions.h:161
Definition: bmqa_abstractsession.h:42