]> git.mxchange.org Git - hub.git/commitdiff
Moved to generic class BaseHandler and interface Handleable
authorRoland Häder <roland@mxchange.org>
Tue, 12 Feb 2013 10:13:20 +0000 (10:13 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 12 Feb 2013 10:13:20 +0000 (10:13 +0000)
application/hub/interfaces/handler/class_Handleable.php
application/hub/interfaces/handler/message-types/class_HandleableMessage.php
application/hub/main/handler/answer-status/class_BaseAnserStatusHandler.php
application/hub/main/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php
application/hub/main/handler/class_BaseHandler.php

index a55ac2b1bb6b43262669d004c8a232011ff17dea..fe1a0dfb648b5d651e3ddb5b64db28e1d9839d41 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface Handleable extends FrameworkInterface {
+       /**
+        * Adds all required elements from given array into data set instance
+        *
+        * @param       $dataSetInstance        An instance of a StoreableCriteria class
+        * @param       $messageData            An array with all message data
+        * @return      void
+        */
+       function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData);
 }
 
 // [EOF]
index dc090eafbb22c72c2b6e80e32bf393f7d274608c..9f55c5963f2312172eac4190c81e18ec88699284 100644 (file)
@@ -30,15 +30,6 @@ interface HandleableMessage extends Handleable {
         * @return      void
         */
        function handleMessageData (array $messageData, Receivable $packageInstance);
-
-       /**
-        * Adds all required elements from given array into data set instance
-        *
-        * @param       $dataSetInstance        An instance of a StoreableCriteria class
-        * @param       $messageData            An array with all message data
-        * @return      void
-        */
-       function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData);
 }
 
 // [EOF]
index e3c81adaad3d8d1ae22b599acae44c3cccbd6600..6fea337ffc511ddab0699ec3c7813fdc9f2436fd 100644 (file)
@@ -43,22 +43,6 @@ abstract class BaseAnserStatusHandler extends BaseDataHandler {
                // Call parent constructor
                parent::__construct($className);
        }
-
-       /**
-        * Adds all required elements from given array into data set instance
-        *
-        * @param       $dataSetInstance        An instance of a StoreableCriteria class
-        * @param       $messageData            An array with all message data
-        * @return      void
-        * @todo        Rewrite this to use DHT
-        */
-       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
-               // Add some generic data all messageData arrays provide
-               /*
-               $dataSetInstance->addCriteria(NodeListDatabaseWrapper::DB_COLUMN_ANSWER_STATUS, $messageData[BaseXmlAnswerTemplateEngine::ANSWER_STATUS]);
-               $dataSetInstance->addCriteria(NodeListDatabaseWrapper::DB_COLUMN_MESSAGE_TYPE , $messageData[NetworkPackage::MESSAGE_ARRAY_TYPE]);
-               */
-       }
 }
 
 // [EOF]
index c3f7757890a9cd568fdb851597fa6a0e2aa9c5d5..cca50dab4946c2ef0af09c4fb966053169228376 100644 (file)
@@ -66,7 +66,7 @@ class RequestNodeListAnswerOkayHandler extends BaseAnserStatusHandler implements
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Lookup external session id/external IP/port
-               $searchInstance->addCriteria('node_session_id' , $messageData[XmlRequestNodeListAnswerTemplateEngine::REQUEST_DATA_SESSION_ID]);
+               $searchInstance->addCriteria('session_id' , $messageData[XmlRequestNodeListAnswerTemplateEngine::REQUEST_DATA_SESSION_ID]);
 
                // Only one entry is fine
                $searchInstance->setLimit(1);
index d73a461b3c785c727d4573c06b6176f046cfea6f..c2146e0eeda7fee691a9235cc158e69a52ecefc8 100644 (file)
@@ -56,6 +56,22 @@ class BaseHandler extends BaseHubSystem implements Handleable {
        protected final function setHandlerName ($handlerName) {
                $this->handlerName = $handlerName;
        }
+
+       /**
+        * Adds all required elements from given array into data set instance
+        *
+        * @param       $dataSetInstance        An instance of a StoreableCriteria class
+        * @param       $messageData            An array with all message data
+        * @return      void
+        * @todo        Rewrite this to use DHT
+        */
+       public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+               // Add some generic data all messageData arrays provide
+               /*
+               $dataSetInstance->addCriteria(NodeListDatabaseWrapper::DB_COLUMN_ANSWER_STATUS, $messageData[BaseXmlAnswerTemplateEngine::ANSWER_STATUS]);
+               $dataSetInstance->addCriteria(NodeListDatabaseWrapper::DB_COLUMN_MESSAGE_TYPE , $messageData[NetworkPackage::MESSAGE_ARRAY_TYPE]);
+               */
+       }
 }
 
 // [EOF]