3 * A general hub node class
5 * @author Roland Haeder <webmaster@ship-simu.org>
7 * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
8 * @license GNU GPL 3.0 or any newer version
9 * @link http://www.ship-simu.org
11 * This program is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
28 const NODE_TYPE_BOOT = 'boot';
29 const NODE_TYPE_MASTER = 'master';
30 const NODE_TYPE_LIST = 'list';
31 const NODE_TYPE_REGULAR = 'regular';
33 // Exception constants
34 const EXCEPTION_HUB_ALREADY_ANNOUNCED = 0xe00;
37 const OBJECT_LIST_SEPARATOR = ',';
40 * IP/port number of bootstrapping node
42 private $bootIpPort = '';
45 * Query connector instance
47 private $queryConnectorInstance = NULL;
50 * Queue connector instance
52 private $queueConnectorInstance = NULL;
55 * Whether this node is anncounced (KEEP ON false!)
58 private $hubIsAnnounced = false;
61 * Whether this hub is active (default: false)
63 private $isActive = false;
66 * Whether this node accepts announcements (default: false)
68 private $acceptAnnouncements = false;
71 * Protected constructor
73 * @param $className Name of the class
76 protected function __construct ($className) {
77 // Call parent constructor
78 parent::__construct($className);
80 // Get a wrapper instance
81 $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('node_info_db_wrapper_class');
84 $this->setWrapperInstance($wrapperInstance);
86 // Get a crypto instance
87 $cryptoInstance = ObjectFactory::createObjectByConfiguredName('crypto_class');
90 $this->setCryptoInstance($cryptoInstance);
92 // Init state which sets the state to 'init'
97 * Initializes the node's state which sets it to 'init'
101 private function initState() {
103 * Get the state factory and create the initial state, we don't need
104 * the state instance here
106 NodeStateFactory::createNodeStateInstanceByName('init', $this);
110 * Generates a random string from various data inluding UUID if PECL
111 * extension uuid is installed.
113 * @param $length Length of the random part
114 * @return $randomString Random string
115 * @todo Make this code more generic and move it to CryptoHelper or
117 protected function generateRamdomString ($length) {
118 // Get an RNG instance
119 $rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
121 // Generate a pseudo-random string
122 $randomString = $rngInstance->randomString($length) . ':' . $this->getBootIpPort() . ':' . $this->getRequestInstance()->getRequestElement('mode');
124 // Add UUID for even more entropy for the hasher
125 $randomString .= $this->getCryptoInstance()->createUuid();
128 return $randomString;
132 * Generates a private key and hashes it (for speeding up things)
134 * @param $searchInstance An instance of a LocalSearchCriteria class
137 private function generatePrivateKeyAndHash (LocalSearchCriteria $searchInstance) {
138 // Get an RNG instance
139 $rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
141 // Generate a pseudo-random string
142 $randomString = $rngInstance->randomString(255);
144 // Hash and encrypt the string so we become a node id (also documented as "hub id")
145 $this->setPrivateKey($this->getCryptoInstance()->encryptString($randomString));
146 $this->setPrivateKeyHash($this->getCryptoInstance()->hashString($this->getPrivateKey()));
148 // Register the node id with our wrapper
149 $this->getWrapperInstance()->registerPrivateKey($this, $this->getRequestInstance(), $searchInstance);
152 self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Created new private key with hash: ' . $this->getPrivateKeyHash() . '');
156 * Setter for query instance
158 * @param $connectorInstance Our new query instance
161 private final function setQueryConnectorInstance (Connectable $connectorInstance) {
162 $this->queryConnectorInstance = $connectorInstance;
166 * Getter for query instance
168 * @return $connectorInstance Our new query instance
170 public final function getQueryConnectorInstance () {
171 return $this->queryConnectorInstance;
175 * Setter for queue instance
177 * @param $connectorInstance Our new queue instance
180 private final function setQueueConnectorInstance (Connectable $connectorInstance) {
181 $this->queueConnectorInstance = $connectorInstance;
185 * Getter for queue instance
187 * @return $connectorInstance Our new queue instance
189 public final function getQueueConnectorInstance () {
190 return $this->queueConnectorInstance;
194 * Getter for boot IP/port combination
196 * @return $bootIpPort The IP/port combination of the boot node
198 protected final function getBootIpPort () {
199 return $this->bootIpPort;
203 * Checks whether the given IP address matches one of the bootstrapping nodes
205 * @param $remoteAddr IP address to checkout against our bootstrapping list
206 * @return $isFound Whether the IP is found
208 protected function ifAddressMatchesBootstrappingNodes ($remoteAddr) {
209 // By default nothing is found
212 // Run through all configured IPs
213 foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPARATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $ipPort) {
214 // Split it up in IP/port
215 $ipPortArray = explode(':', $ipPort);
218 if ($ipPortArray[0] == $remoteAddr) {
222 // Remember the port number
223 $this->bootIpPort = $ipPort;
226 self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: ' . __FUNCTION__ . '[' . __LINE__ . ']: IP matches remote address ' . $ipPort . '.');
228 // Stop further searching
230 } elseif ($ipPortArray[0] == $this->getConfigInstance()->getConfigEntry('node_listen_addr')) {
232 * IP matches listen address. At this point we really don't care
233 * if we can really listen on that address
237 // Remember the port number
238 $this->bootIpPort = $ipPort;
241 self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: ' . __FUNCTION__ . '[' . __LINE__ . ']: IP matches listen address ' . $ipPort . '.');
243 // Stop further searching
253 * Outputs the console teaser. This should only be executed on startup or
254 * full restarts. This method generates some space around the teaser.
258 public function outputConsoleTeaser () {
259 // Get the app instance (for shortening our code)
260 $app = $this->getApplicationInstance();
263 self::createDebugInstance(__CLASS__)->debugOutput(' ');
264 self::createDebugInstance(__CLASS__)->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - ' . $this->getRequestInstance()->getRequestElement('mode') . ' mode active');
265 self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team');
266 self::createDebugInstance(__CLASS__)->debugOutput(' ');
267 self::createDebugInstance(__CLASS__)->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
268 self::createDebugInstance(__CLASS__)->debugOutput('This is free software, and you are welcome to redistribute it under certain');
269 self::createDebugInstance(__CLASS__)->debugOutput('conditions; see docs/COPYING for details.');
270 self::createDebugInstance(__CLASS__)->debugOutput(' ');
274 * Generic method to acquire a hub-id. On first run this generates a new one
275 * based on many pseudo-random data. On any later run, unless the id
276 * got not removed from database, it will be restored from the database.
278 * @param $requestInstance A Requestable class
279 * @param $responseInstance A Responseable class
282 public function bootstrapAcquireNodeId (Requestable $requestInstance, Responseable $responseInstance) {
283 // Is there a node id?
284 if ($this->getWrapperInstance()->ifNodeDataIsFound($this)) {
285 // Get the node id from result and set it
286 $this->setNodeId($this->getField(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_ID));
289 self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Re-using found node-id: ' . $this->getNodeId() . '');
291 // Get an RNG instance
292 $rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
294 // Generate a pseudo-random string
295 $randomString = $rngInstance->randomString(255);
297 // Hash and encrypt the string so we become a node id (also documented as "hub id")
298 $this->setNodeId($this->getCryptoInstance()->hashString($this->getCryptoInstance()->encryptString($randomString)));
300 // Register the node id with our wrapper
301 $this->getWrapperInstance()->registerNodeId($this, $this->getRequestInstance());
304 self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Created new node-id: ' . $this->getNodeId() . '');
309 * Generates a session id which will be sent to the other hubs and peers
313 public function bootstrapGenerateSessionId () {
314 // Now get a search criteria instance
315 $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
317 // Search for the node number one which is hard-coded the default
318 $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_NR , 1);
319 $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_MODE, $this->getRequestInstance()->getRequestElement('mode'));
320 $searchInstance->setLimit(1);
322 // Remember it for later usage
323 $this->setSearchInstance($searchInstance);
325 // Get a random string
326 $randomString = $this->generateRamdomString(255);
328 // Hash and encrypt the string so we become a "node id" aka Hub-Id
329 $this->setSessionId($this->getCryptoInstance()->hashString($this->getCryptoInstance()->encryptString($randomString)));
331 // Register the node id with our wrapper
332 $this->getWrapperInstance()->registerSessionId($this, $this->getRequestInstance(), $searchInstance);
335 self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Created new session-id: ' . $this->getSessionId() . '');
337 // Change the state because the node has auired a hub id
338 $this->getStateInstance()->nodeGeneratedSessionId();
342 * Generate a private key for en-/decryption
346 public function bootstrapGeneratePrivateKey () {
348 if ($this->getWrapperInstance()->ifNodeDataIsFound($this)) {
349 // Is the element set?
350 if (is_null($this->getField(NodeInformationDatabaseWrapper::DB_COLUMN_PRIVATE_KEY))) {
352 * Auto-generate the private key for e.g. out-dated database
353 * "tables". This allows a smooth update for the underlaying
356 $this->generatePrivateKeyAndHash($this->getSearchInstance());
358 // Get the node id from result and set it
359 $this->setPrivateKey(base64_decode($this->getField(NodeInformationDatabaseWrapper::DB_COLUMN_PRIVATE_KEY)));
360 $this->setPrivateKeyHash($this->getField(NodeInformationDatabaseWrapper::DB_COLUMN_PRIVATE_KEY_HASH));
363 self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Re-using found private key hash: ' . $this->getPrivateKeyHash() . '');
367 * Generate it in a private method (no confusion with 'private
368 * method access' and 'private key' here! ;-)).
370 $this->generatePrivateKeyAndHash($this->getSearchInstance());
375 * Adds hub data elements to a given dataset instance
377 * @param $criteriaInstance An instance of a storeable criteria
378 * @param $requestInstance An instance of a Requestable class
381 public function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance = NULL) {
382 // Make sure request instance is set as it is not optional
383 assert($requestInstance instanceof Requestable);
385 // Add node number and type
386 $criteriaInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_NR , 1);
387 $criteriaInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_MODE, $requestInstance->getRequestElement('mode'));
390 $criteriaInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_ID, $this->getNodeId());
392 // Add the session id if acquired
393 if ($this->getSessionId() != '') {
394 $criteriaInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_SESSION_ID, $this->getSessionId());
397 // Add the private key if acquired
398 if ($this->getPrivateKey() != '') {
399 $criteriaInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_PRIVATE_KEY, base64_encode($this->getPrivateKey()));
400 $criteriaInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_PRIVATE_KEY_HASH, $this->getPrivateKeyHash());
405 * Updates a given field with new value
407 * @param $fieldName Field to update
408 * @param $fieldValue New value to store
410 * @throws DatabaseUpdateSupportException If this class does not support database updates
411 * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem
413 public function updateDatabaseField ($fieldName, $fieldValue) {
415 $this->partialStub('Unfinished!');
418 // Get a critieria instance
419 $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
421 // Add search criteria
422 $searchInstance->addCriteria(UserDatabaseWrapper::DB_COLUMN_USERNAME, $this->getUserName());
423 $searchInstance->setLimit(1);
425 // Now get another criteria
426 $updateInstance = ObjectFactory::createObjectByConfiguredName('update_criteria_class');
428 // Add criteria entry which we shall update
429 $updateInstance->addCriteria($fieldName, $fieldValue);
431 // Add the search criteria for searching for the right entry
432 $updateInstance->setSearchInstance($searchInstance);
434 // Set wrapper class name
435 $updateInstance->setWrapperConfigEntry('user_db_wrapper_class');
437 // Remember the update in database result
438 $this->getResultInstance()->add2UpdateQueue($updateInstance);
442 * Announces this hub to the upper (bootstrap or list) hubs. After this is
443 * successfully done the given task is unregistered from the handler. This
444 * might look a bit overloaded here but the announcement phase isn't a
445 * simple "Hello there" message, it may later on also contain more
446 * informations like the object list.
448 * @param $taskInstance The task instance running this announcement
450 * @throws NodeAlreadyAnnouncedException If this hub is already announced
451 * @todo Change the first if() block to check for a specific state
453 public function announceToUpperNodes (Taskable $taskInstance) {
454 // Is this hub node announced?
455 if ($this->hubIsAnnounced === true) {
456 // Already announced!
457 throw new NodeAlreadyAnnouncedException($this, self::EXCEPTION_HUB_ALREADY_ANNOUNCED);
461 self::createDebugInstance(__CLASS__)->debugOutput('HUB-Announcement: START (taskInstance=' . $taskInstance->__toString(). ')');
463 // Get a helper instance
464 $helperInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_helper_class');
466 // Load the announcement descriptor
467 $helperInstance->loadDescriptorXml($this);
469 // Compile all variables
470 $helperInstance->getTemplateInstance()->compileConfigInVariables();
472 // "Publish" the descriptor by sending it to the bootstrap/list nodes
473 $helperInstance->sendPackage($this);
475 // Change the state, this should be the last line except debug output
476 $this->getStateInstance()->nodeAnnouncedToUpperHubs();
479 self::createDebugInstance(__CLASS__)->debugOutput('HUB-Announcement: FINISHED');
483 * Does a self-connect attempt on the public IP address. This should make
484 * it sure, we are reachable from outside world. For this kind of package we
485 * don't need that overload we have in the announcement phase.
487 * @param $taskInstance The task instance running this announcement
490 public function doSelfConnection (Taskable $taskInstance) {
492 self::createDebugInstance(__CLASS__)->debugOutput('HUB: Self Connection: START (taskInstance=' . $taskInstance->__toString(). ')');
494 // Get a helper instance
495 $helperInstance = ObjectFactory::createObjectByConfiguredName('node_self_connect_helper_class', array($this));
497 // Load the descriptor (XML) file
498 $helperInstance->loadDescriptorXml($this);
500 // Compile all variables
501 $helperInstance->getTemplateInstance()->compileConfigInVariables();
503 // And send the package away
504 $helperInstance->sendPackage($this);
507 self::createDebugInstance(__CLASS__)->debugOutput('HUB: Self Connection: FINISHED');
511 * Activates the hub by doing some final preparation and setting
512 * $hubIsActive to true
514 * @param $requestInstance A Requestable class
515 * @param $responseInstance A Responseable class
518 public function activateNode (Requestable $requestInstance, Responseable $responseInstance) {
519 // Checks whether a listener is still active and shuts it down if one
520 // is still listening.
521 if (($this->determineIfListenerIsActive()) && ($this->isNodeActive())) {
522 // Shutdown them down before they can hurt anything
523 $this->shutdownListenerPool();
526 // Get the controller here
527 $controllerInstance = Registry::getRegistry()->getInstance('controller');
529 // Run all filters for the hub activation
530 $controllerInstance->executeActivationFilters($requestInstance, $responseInstance);
532 // ----------------------- Last step from here ------------------------
533 // Activate the hub. This is ALWAYS the last step in this method
534 $this->getStateInstance()->nodeIsActivated();
535 // ---------------------- Last step until here ------------------------
539 * Initializes the listener pool (class)
543 public function initializeListenerPool () {
545 self::createDebugInstance(__CLASS__)->debugOutput('HUB: Initialize listener: START');
547 // Get a new pool instance
548 $this->setListenerPoolInstance(ObjectFactory::createObjectByConfiguredName('listener_pool_class', array($this)));
550 // Get an instance of the low-level listener
551 $listenerInstance = ObjectFactory::createObjectByConfiguredName('tcp_listener_class', array($this));
553 // Setup address and port
554 $listenerInstance->setListenAddressByConfiguration('node_listen_addr');
557 * All nodes can now use the same configuration entry because it can be
558 * customized in config-local.php.
560 $listenerInstance->setListenPortByConfiguration('node_listen_port');
562 // Initialize the listener
563 $listenerInstance->initListener();
565 // Get a decorator class
566 $decoratorInstance = ObjectFactory::createObjectByConfiguredName('node_tcp_listener_class', array($listenerInstance));
568 // Add this listener to the pool
569 $this->getListenerPoolInstance()->addListener($decoratorInstance);
571 // Get a decorator class
572 $decoratorInstance = ObjectFactory::createObjectByConfiguredName('client_tcp_listener_class', array($listenerInstance));
574 // Add this listener to the pool
575 $this->getListenerPoolInstance()->addListener($decoratorInstance);
577 // Get an instance of the low-level listener
578 $listenerInstance = ObjectFactory::createObjectByConfiguredName('udp_listener_class', array($this));
580 // Setup address and port
581 $listenerInstance->setListenAddressByConfiguration('node_listen_addr');
584 * All nodes can now use the same configuration entry because it can be
585 * customized in config-local.php.
587 $listenerInstance->setListenPortByConfiguration('node_listen_port');
589 // Initialize the listener
590 $listenerInstance->initListener();
592 // Get a decorator class
593 $decoratorInstance = ObjectFactory::createObjectByConfiguredName('node_udp_listener_class', array($listenerInstance));
595 // Add this listener to the pool
596 $this->getListenerPoolInstance()->addListener($decoratorInstance);
598 // Get a decorator class
599 $decoratorInstance = ObjectFactory::createObjectByConfiguredName('client_udp_listener_class', array($listenerInstance));
601 // Add this listener to the pool
602 $this->getListenerPoolInstance()->addListener($decoratorInstance);
605 self::createDebugInstance(__CLASS__)->debugOutput('HUB: Initialize listener: FINISHED.');
609 * Getter for isActive attribute
611 * @return $isActive Whether the hub is active
613 public final function isNodeActive () {
614 return $this->isActive;
618 * Enables (default) or disables isActive flag
620 * @param $isActive Whether the hub is active
623 public final function enableIsActive ($isActive = true) {
624 $this->isActive = (bool) $isActive;
628 * Checks whether this node accepts announcements
630 * @return $acceptAnnouncements Whether this node accepts announcements
632 public final function isAcceptingAnnouncements () {
633 // Check it (this node must be active and not shutdown!)
634 $acceptAnnouncements = (($this->acceptAnnouncements === true) && ($this->isNodeActive()));
637 return $acceptAnnouncements;
641 * Checks whether this node has attempted to announce itself
643 * @return $hasAnnounced Whether this node has attempted to announce itself
644 * @todo Add checking if this node has been announced to the sender node
646 public function ifNodeHasAnnounced () {
648 /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE: ifNodeHasAnnounced(): state=' . $this->getStateInstance()->getStateName());
650 // Simply check the state of this node
651 $hasAnnounced = ($this->getStateInstance() instanceof NodeAnnouncedState);
654 /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE: ifNodeHasAnnounced(): hasAnnounced=' . intval($hasAnnounced));
657 return $hasAnnounced;
661 * Checks whether this node has attempted to announce itself and completed it
663 * @return $hasAnnouncementCompleted Whether this node has attempted to announce itself and completed it
664 * @todo Add checking if this node has been announced to the sender node
666 public function ifNodeHasAnnouncementCompleted () {
668 /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE: ifNodeHasAnnouncementCompleted(): state=' . $this->getStateInstance()->getStateName());
670 // Simply check the state of this node
671 $hasAnnouncementCompleted = ($this->getStateInstance() instanceof NodeAnnouncementCompletedState);
674 /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE: ifNodeHasAnnouncementCompleted(): hasAnnouncementCompleted=' . intval($hasAnnouncementCompleted));
677 return $hasAnnouncementCompleted;
681 * Enables whether this node accepts announcements
683 * @param $acceptAnnouncements Whether this node accepts announcements (default: true)
686 protected final function enableAcceptingAnnouncements ($acceptAnnouncements = true) {
687 $this->acceptAnnouncements = $acceptAnnouncements;
691 * Checks wether this node is accepting node-list requests
693 * @return $acceptsRequest Wether this node accepts node-list requests
695 public function isAcceptingNodeListRequests () {
697 * Only 'regular' nodes does not accept such requests, checking
698 * HubRegularNode is faster, but if e.g. HubRegularI2PNode will be
699 * added then the next check will be true.
701 $acceptsRequest = ((!$this instanceof HubRegularNode) && ($this->getRequestInstance()->getRequestElement('mode') != self::NODE_TYPE_REGULAR));
704 return $acceptsRequest;
708 * "Getter" for address:port combination
710 * @return $addressPort A address:port combination for this node
712 public final function getAddressPort () {
714 $addressPort = $this->getConfigInstance()->detectServerAddress() . ':' . $this->getConfigInstance()->getConfigEntry('node_listen_port');
721 * "Getter" for address:port array
723 * @return $addressPortArray An array of a address:port combination for this node
725 public final function getAddressPortArray () {
727 $addressPortArray = explode(':', $this->getAddressPort());
730 return $addressPortArray;
734 * Updates/refreshes node data (e.g. status).
737 * @todo Find more to do here
739 public function updateNodeData () {
740 // Set some dummy configuration entries, e.g. node_status
741 $this->getConfigInstance()->setConfigEntry('node_status', $this->getStateInstance()->getStateName());
745 * Handles message answer by given data array
747 * @param $messageData A valid answer message data array
748 * @param $packageInstance An instance of a Receivable class
750 * @todo Handle thrown exception
752 public function handleAnswerStatusByMessageData (array $messageData, Receivable $packageInstance) {
754 assert(!empty($messageData[BaseXmlAnswerTemplateEngine::ANSWER_STATUS]));
756 // Construct configuration entry for handling class' name
757 $classConfigEntry = strtolower($messageData[NetworkPackage::MESSAGE_ARRAY_TYPE] . '_status_' . $messageData[BaseXmlAnswerTemplateEngine::ANSWER_STATUS]) . '_handler_class';
759 // Try to get a class
760 $handlerInstance = ObjectFactory::createObjectByConfiguredName($classConfigEntry);
763 $handlerInstance->handleAnswerMessageData($messageData, $packageInstance);
767 * "Getter" for an array of all accepted object types
769 * @return $objectList Array of all accepted object types
771 public function getListFromAcceptedObjectTypes () {
772 // Get registry instance
773 $objectRegistryInstance = ObjectTypeRegistryFactory::createObjectTypeRegistryInstance();
776 $objectList = $objectRegistryInstance->getEntries(XmlObjectRegistryTemplateEngine::OBJECT_TYPE_DATA_NAME);