]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/visitor/pool/shutdown/class_ShutdownListenerPoolVisitor.php
State pattern classes for node states added, factory added, copyright updated
[hub.git] / application / hub / main / visitor / pool / shutdown / class_ShutdownListenerPoolVisitor.php
index 8d48dbd0a934c93c1363182ec9a20599532c5c4f..6c622e400217b05d9b69d58eeb87601fd1c378ef 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -64,6 +64,40 @@ class ShutdownListenerPoolVisitor extends BaseVisitor implements PoolVisitor {
                // Debug message
                $this->debugOutput('VISITOR: Visit of ' . $poolInstance->__toString() . ' - FINISHED');
        }
+
+       /**
+        * Visits the given decorator instance
+        *
+        * @param       $decoratorInstance      A Listenable decorator instance
+        * @return      void
+        */
+       public function visitDecorator (Listenable $decoratorInstance) {
+               // Debug message
+               $this->debugOutput('VISITOR: Visit of ' . $decoratorInstance->__toString() . ' - START');
+
+               // Pre-shutdown the pool
+               $decoratorInstance->doShutdown();
+
+               // Debug message
+               $this->debugOutput('VISITOR: Visit of ' . $decoratorInstance->__toString() . ' - FINISHED');
+       }
+
+       /**
+        * Visits the given listener instance
+        *
+        * @param       $listenerInstance       A Listenable class instance
+        * @return      void
+        */
+       public function visitListener (Listenable $listenerInstance) {
+               // Debug message
+               $this->debugOutput('VISITOR: Visit of ' . $listenerInstance->__toString() . ' - START');
+
+               // Pre-shutdown the pool
+               $listenerInstance->doShutdown();
+
+               // Debug message
+               $this->debugOutput('VISITOR: Visit of ' . $listenerInstance->__toString() . ' - FINISHED');
+       }
 }
 
 //