*/
public function __construct (array $messageArray, $code) {
// Construct the message
- $message = sprintf("[%s:%d] This node (%s) is not accepting announcements, but got one from session-id=%s,ip=%s/%s,tcp.port=%s,udp.port=%s,status=%s.",
+ $message = sprintf("[%s:%d] This node (%s) is not accepting announcements, but got one from session-id=%s,ip=%s/%s,tcp.port=%s,udp.port=%s,status=%s,mode=%s",
$messageArray[0]->__toString(),
$this->getLine(),
$messageArray[1]->__toString(),
$messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_IP],
$messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_TCP_PORT],
$messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_UDP_PORT],
- $messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS]
+ $messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS],
+ $messageArray[2][XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_MODE]
);
// Call parent exception constructor
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_IP => '',
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_IP => '',
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS => '',
+ XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_MODE => '',
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID => '',
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_TCP_PORT => 9060,
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_UDP_PORT => 9060
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_IP,
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_IP,
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS,
+ XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_MODE,
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID,
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_TCP_PORT,
XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_UDP_PORT
*/
const ANNOUNCEMENT_DATA_SESSION_ID = 'session-id';
const ANNOUNCEMENT_DATA_NODE_STATUS = 'node-status';
+ const ANNOUNCEMENT_DATA_NODE_MODE = 'node-mode';
const ANNOUNCEMENT_DATA_EXTERNAL_IP = 'external-ip';
const ANNOUNCEMENT_DATA_INTERNAL_IP = 'internal-ip';
const ANNOUNCEMENT_DATA_TCP_PORT = 'tcp-port';
$this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_NODE_STATUS);
}
+ /**
+ * Starts the node-mode
+ *
+ * @return void
+ */
+ private function startNodeMode () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_NODE_MODE);
+ }
+
/**
* Starts the listener
*
$this->getStackerInstance()->popNamed('announcement');
}
+ /**
+ * Finishes the node mode
+ *
+ * @return void
+ */
+ private function finishNodeMode () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('announcement');
+ }
+
/**
* Finishes the node status
*
<!-- Status of this node, see node_status.xml for details. //-->
<node-status>{?node_status?}</node-status>
<!-- Node mode: regular, master, list, boot again //-->
- <node-status>{?node_default_mode?}</node-status>
+ <node-mode>{?node_default_mode?}</node-mode>
<!-- The session id. This should be announced to all other hubs. //-->
<session-id>{?session_id?}</session-id>
<!-- Data from our listeners (e.g. which port) //-->
along with this program. If not, see <http://www.gnu.org/licenses/>
//-->
<node-request-node-list>
+ <!--
+ All accepted object types as a comma-separted list this node is accepting
+ to share (even master nodes may not accept all types of objects.
+ //-->
+ <accepted-object-types>{?accepted_object_types?}</accepted-object-types>
</node-request-node-list>