]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/listener/class_BaseListenerDecorator.php
Typo fixed, visitor introduced, SVN property set:
[hub.git] / application / hub / main / listener / class_BaseListenerDecorator.php
index ee2c0a49884e3189ad1618adc03f81e7fe0de101..e71c66f7ca3731f5587383a129faeb932a4648e7 100644 (file)
@@ -115,6 +115,26 @@ class BaseListenerDecorator extends BaseDecorator implements Visitable {
        public final function getPoolInstance () {
                return $this->getListenerInstance()->getPoolInstance();
        }
+
+       /**
+        * Monitors incoming raw data from the handler and transfers it to the
+        * given receiver instance.
+        *
+        * @param       $receiverInstance       An instance of a Receivable class
+        * @return      void
+        */
+       public function monitorIncomingRawData (Receivable $receiverInstance) {
+               /*
+                * Does our deocorated listener (or even a decorator again) have a
+                * handler assigned? Remember that a handler will hold all incoming raw
+                * data and not a listener.
+                */
+               if (!$this->getListenerInstance()->getHandlerInstance() instanceof Networkable) {
+                       // Skip this silently for now. Later on, this will become mandatory!
+                       //* NOISY-DEBUG: */ $this->debugOutput('No handler assigned to this listener decorator. this=' . $this->__toString() . ', listenerInstance=' . $this->getListenerInstance()->__toString());
+                       return;
+               } // END - if
+       }
 }
 
 // [EOF]