$wrapperInstance->registerNodeByMessageData($messageData, $this);
}
}
+
+ /**
+ * Prepares a message as answer for given message data for delivery.
+ *
+ * @param $messageData An array with all message data
+ * @param $packageInstance An instance of a Deliverable instance
+ * @return void
+ */
+ protected function prepareAnswerMessage (array $messageData, Deliverable $packageInstance) {
+ // Get a helper instance based on this handler's name
+ $helperInstance = ObjectFactory::createObjectByConfiguredName('node_answer_' . $this->getHandlerName() . '_helper_class', array($messageData));
+
+ // Load descriptor XML
+ $helperInstance->loadDescriptorXml();
+
+ // Compile any configuration variables
+ $helperInstance->getTemplateInstance()->compileConfigInVariables();
+
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Deliver the package
+ $helperInstance->sendPackage($nodeInstance);
+ }
}
// [EOF]