*
* @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
*
*
* @return $visitorInstance An instance a Visitorable class
*/
- public final static function createShutdownListenerPoolVisitor () {
+ public static final function createShutdownListenerPoolVisitor () {
// Get new instance
$visitorInstance = new ShutdownListenerPoolVisitor();
// 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');
+ }
}
//