]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/listener/class_BaseListener.php
Refacturing to pass a ProtocolHandler instance instead of the direct name. This
[hub.git] / application / hub / main / listener / class_BaseListener.php
index 2ee21895d569d7f40a04749153130e9e5e84b3dd..3cb9701bd89dba32d20cf69f5e9c8142890dc30d 100644 (file)
@@ -33,11 +33,6 @@ class BaseListener extends BaseHubSystem implements Visitable {
        const EXCEPTION_FINAL_CHUNK_VERIFICATION         = 0xa07;
        const EXCEPTION_INVALID_DATA_CHECKSUM            = 0xa08;
 
-       /**
-        * Used protocol (Default: invalid, which is indeed invalid...)
-        */
-       private $protocol = 'invalid';
-
        /**
         * Address (IP mostly) we shall listen on
         */
@@ -160,25 +155,6 @@ class BaseListener extends BaseHubSystem implements Visitable {
                $this->setListenPort($this->getConfigInstance()->getConfigEntry($configEntry));
        }
 
-       /**
-        * Setter for protocol
-        *
-        * @param       $protocol       Used protocol
-        * @return      void
-        */
-       protected final function setProtocol ($protocol) {
-               $this->protocol = (string) $protocol;
-       }
-
-       /**
-        * Getter for protocol
-        *
-        * @return      $protocol       Used protocol
-        */
-       public final function getProtocol () {
-               return $this->protocol;
-       }
-
        /**
         * Setter for blocking-mode
         *
@@ -272,7 +248,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
         */
        public function accept (Visitor $visitorInstance) {
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($this->getProtocol()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - START');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - START');
 
                // Visit this listener
                $visitorInstance->visitListener($this);
@@ -283,7 +259,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
                } // END - if
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($this->getProtocol()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - FINISHED');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - FINISHED');
        }
 
        /**