ROSE 0.11.145.192
Public Member Functions | Protected Attributes | List of all members
Sawyer::Message::Destination Class Referenceabstract

Description

Base class for all types of message destinations.

This is the base class for all nodes in the plumbing lattice.

Definition at line 609 of file Message.h.

#include <Sawyer/Message.h>

Inheritance diagram for Sawyer::Message::Destination:
Inheritance graph
[legend]
Collaboration diagram for Sawyer::Message::Destination:
Collaboration graph
[legend]

Public Member Functions

virtual void bakeDestinations (const MesgProps &, BakedDestinations &baked)
 Bakes message properties according to the plumbing lattice.
 
virtual void post (const Mesg &, const MesgProps &bakedProperties)=0
 Causes a message to be emitted.
 
MesgProps mergePropertiesNS (const MesgProps &props)
 Merge properties of this lattice node into the specified properties.
 
const MesgPropsdefaultPropertiesNS () const
 Default values for message properties.
 
MesgPropsdefaultPropertiesNS ()
 Default values for message properties.
 
const MesgPropsoverridePropertiesNS () const
 Overrides message properties.
 
MesgPropsoverridePropertiesNS ()
 Overrides message properties.
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor.
 
 SharedObject (const SharedObject &)
 Copy constructor.
 
virtual ~SharedObject ()
 Virtual destructor.
 
SharedObjectoperator= (const SharedObject &)
 Assignment.
 
- Public Member Functions inherited from Sawyer::SharedFromThis< Destination >
SharedPointer< Destination > sharedFromThis ()
 Create a shared pointer from this.
 
SharedPointer< const Destination > sharedFromThis () const
 Create a shared pointer from this.
 

Protected Attributes

Sawyer::SynchronizationTraits< Sawyer::SingleThreadedTag >::RecursiveMutex mutex_
 Mutex protecting data members here and in subclasses.
 
MesgProps dflts_
 Default properties merged into each incoming message.
 
MesgProps overrides_
 Override properties applied to incoming message.
 

Constructor & Destructor Documentation

◆ Destination()

Sawyer::Message::Destination::Destination ( )
inlineprotected

Definition at line 615 of file Message.h.

◆ ~Destination()

virtual Sawyer::Message::Destination::~Destination ( )
inlinevirtual

Definition at line 617 of file Message.h.

Member Function Documentation

◆ defaultPropertiesNS() [1/2]

const MesgProps & Sawyer::Message::Destination::defaultPropertiesNS ( ) const
inline

Default values for message properties.

Any message property that has no value coming from a higher layer in the plumbing lattice will be set to the default value if one is defined.

Thread safety: Not thread safe.

Definition at line 627 of file Message.h.

◆ defaultPropertiesNS() [2/2]

MesgProps & Sawyer::Message::Destination::defaultPropertiesNS ( )
inline

Default values for message properties.

Any message property that has no value coming from a higher layer in the plumbing lattice will be set to the default value if one is defined.

Thread safety: Not thread safe.

Definition at line 628 of file Message.h.

◆ overridePropertiesNS() [1/2]

const MesgProps & Sawyer::Message::Destination::overridePropertiesNS ( ) const
inline

Overrides message properties.

Any overriding property value that is defined will override the value coming from a higher layer in the plumbing lattice.

Thread safety: Not thread safe.

Definition at line 639 of file Message.h.

◆ overridePropertiesNS() [2/2]

MesgProps & Sawyer::Message::Destination::overridePropertiesNS ( )
inline

Overrides message properties.

Any overriding property value that is defined will override the value coming from a higher layer in the plumbing lattice.

Thread safety: Not thread safe.

Definition at line 640 of file Message.h.

◆ bakeDestinations()

virtual void Sawyer::Message::Destination::bakeDestinations ( const MesgProps ,
BakedDestinations baked 
)
virtual

Bakes message properties according to the plumbing lattice.

The given message properties are applied to the plumbing lattice rooted at this Destination, adjusted according to the default and override properties at this node of the lattice and all lower nodes. The property values at the bottom nodes of the lattice are appended to the baked argument.

Thread safety: All implementations must be thread-safe.

Reimplemented in Sawyer::Message::Multiplexer, and Sawyer::Message::Filter.

◆ post()

virtual void Sawyer::Message::Destination::post ( const Mesg ,
const MesgProps bakedProperties 
)
pure virtual

Causes a message to be emitted.

The bakedProperties argument is one of the values returned by the bakeDestinations method.

Implemented in Sawyer::Message::Multiplexer, Sawyer::Message::FdSink, Sawyer::Message::FileSink, Sawyer::Message::StreamSink, and Sawyer::Message::SyslogSink.

◆ mergePropertiesNS()

MesgProps Sawyer::Message::Destination::mergePropertiesNS ( const MesgProps props)

Merge properties of this lattice node into the specified properties.

Any property in props that is not set will be set to this node's default value for the property (if any). Any override property defined for this node will override the value (or lack of value) in props. The merged result is returned.

Thread safety: Not thread safe.

Member Data Documentation

◆ mutex_

Sawyer::SynchronizationTraits<Sawyer::SingleThreadedTag>::RecursiveMutex Sawyer::Message::Destination::mutex_
mutableprotected

Mutex protecting data members here and in subclasses.

Definition at line 611 of file Message.h.

◆ dflts_

MesgProps Sawyer::Message::Destination::dflts_
protected

Default properties merged into each incoming message.

Definition at line 612 of file Message.h.

◆ overrides_

MesgProps Sawyer::Message::Destination::overrides_
protected

Override properties applied to incoming message.

Definition at line 613 of file Message.h.


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