]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php
Updated 'core'.
[hub.git] / application / hub / main / filter / tags / answer / class_PackageAnnouncementAnswerTagFilter.php
index a25eb165c0440ebf9a5278b112fbf15bea1e1c56..3c9129bfb1f43e970ec353825137c56bce507c83 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A AnnouncementAnswerTag filter for Package
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -33,13 +33,12 @@ class PackageAnnouncementAnswerTagFilter extends BaseNodeFilter implements Filte
 
                // Init array
                $this->dataXmlNodes = array(
-                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_IP   => '',
-                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_IP   => '',
-                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS   => '',
-                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID    => '',
-                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_TCP_PORT      => 9060,
-                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_UDP_PORT      => 9060,
-                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_ANSWER_STATUS => '',
+                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_ADDRESS => '',
+                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_ADDRESS => '',
+                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS      => '',
+                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_NODE_ID          => '',
+                       XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID       => '',
+                       BaseXmlAnswerTemplateEngine::ANSWER_STATUS                              => '',
                );
        }
 
@@ -73,13 +72,26 @@ class PackageAnnouncementAnswerTagFilter extends BaseNodeFilter implements Filte
         * Processes the given raw message content. The method renderXmlContent
         * may throw (not the method itself) several exceptions:
         *
-        * @param       $messageContent         Raw message content
+        * @param       $messageData            Raw message data array
         * @param       $packageInstance        An instance of a Receivable class
         * @return      void
         */
-       public function processMessage ($messageContent, Receivable $packageInstance) {
+       public function processMessage (array $messageData, Receivable $packageInstance) {
                // Process message in generic way
-               $this->genericProcessMessage('announcement_answer', $messageContent, $packageInstance);
+               $this->genericProcessMessage('announcement_answer', $messageData, $packageInstance);
+       }
+
+       /**
+        * Post-processes the stacked message. Do not call popNamed() as then no
+        * other class can process the message.
+        *
+        * @param       $packageInstance        An instance of a Receivable class
+        * @return      void
+        * @throws      UnsupportedOperationException   If this method is called, please use processMessage() instead!
+        */
+       public function postProcessMessage (Receivable $packageInstance) {
+               // Please don't call this method
+               throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 }