Decorator object (source code)

= Decorator object

A wrapper component in the <Decorator pattern>. It implements the same interface as its inner component, delegates existing work, and contributes one additional responsibility. For per-channel message distribution, a wrapper can forward prior sends, add one channel send and add the corresponding cost, keeping behavior and accounting in the same component.