CatapultServer  v0.5.0.1 (Elephant)
NotificationObserverAdapter.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "ObserverTypes.h"
24 
25 namespace catapult { namespace model { class TransactionRegistry; } }
26 
27 namespace catapult { namespace observers {
28 
31  private:
33  using NotificationPublisherPointer = std::unique_ptr<const model::NotificationPublisher>;
34 
35  public:
38 
39  public:
40  const std::string& name() const override;
41 
42  void notify(const model::WeakEntityInfo& entityInfo, ObserverContext& context) const override;
43 
44  private:
47  };
48 }}
m_observer
const NotificationObserver & m_observer
Definition: NotificationObserverAdapter.cpp:44
NotificationPublisher.h
catapult::observers::NotificationObserverAdapter::m_pObserver
NotificationObserverPointer m_pObserver
Definition: NotificationObserverAdapter.h:45
catapult::observers::NotificationObserverAdapter::notify
void notify(const model::WeakEntityInfo &entityInfo, ObserverContext &context) const override
Notifies the observer with an entityInfo to process and an observer context.
Definition: NotificationObserverAdapter.cpp:60
catapult::observers::ObserverContext
Context passed to all the observers.
Definition: ObserverContext.h:78
catapult::model::NotificationChannel::Observer
Publish notification on observer channel.
catapult::model::IsSet
constexpr bool IsSet(NotificationType type, NotificationChannel channel)
Checks if type has channel set.
Definition: NotificationType.h:61
catapult::validators::Notification
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
NotificationObserverAdapter.h
catapult::observers::EntityObserver
Definition: EntityObserver.h:30
NotificationSubscriber.h
catapult::observers::NotificationObserverAdapter
A notification observer to entity observer adapter.
Definition: NotificationObserverAdapter.h:30
ObserverTypes.h
catapult::observers::NotificationObserverAdapter::m_pPublisher
NotificationPublisherPointer m_pPublisher
Definition: NotificationObserverAdapter.h:46
catapult::model::WeakEntityInfoT
Wrapper around a strongly typed entity and its associated metadata.
Definition: WeakEntityInfo.h:33
catapult::observers::NotificationObserverAdapter::name
const std::string & name() const override
Gets the observer name.
Definition: NotificationObserverAdapter.cpp:56
TransactionPlugin.h
catapult::observers::NotificationObserverAdapter::NotificationObserverPointer
NotificationObserverPointerT< model::Notification > NotificationObserverPointer
Definition: NotificationObserverAdapter.h:32
m_context
ObserverContext & m_context
Definition: NotificationObserverAdapter.cpp:45
catapult::observers::NotificationObserver
NotificationObserverT< model::Notification > NotificationObserver
A notification observer for processing a generic Notification.
Definition: ObserverTypes.h:30
catapult::observers::NotificationObserverAdapter::NotificationObserverAdapter
NotificationObserverAdapter(NotificationObserverPointer &&pObserver, NotificationPublisherPointer &&pPublisher)
Creates a new adapter around pObserver and pPublisher.
Definition: NotificationObserverAdapter.cpp:49
catapult::observers::NotificationObserverPointerT
std::unique_ptr< const NotificationObserverT< TNotification > > NotificationObserverPointerT
A notification observer (unique) pointer.
Definition: ObserverTypes.h:34
catapult::observers::NotificationObserverAdapter::NotificationPublisherPointer
std::unique_ptr< const model::NotificationPublisher > NotificationPublisherPointer
Definition: NotificationObserverAdapter.h:33
catapult
Definition: AddressExtractionExtension.cpp:28