return $this->nodeId;
}
+ /**
+ * Setter for listener pool instance
+ *
+ * @param $listenerPoolInstance Our new listener pool instance
+ * @return void
+ */
+ private final function setListenerPoolInstance (PoolableListener $listenerPoolInstance) {
+ $this->listenerPoolInstance = $listenerPoolInstance;
+ }
+
+ /**
+ * Getter for listener pool instance
+ *
+ * @return $listenerPoolInstance Our current listener pool instance
+ */
+ public final function getListenerPoolInstance () {
+ return $this->listenerPoolInstance;
+ }
+
/**
* Setter for session id
*
*
* @return $sessionId Our new session id
*/
- private final function getSessionId () {
+ public final function getSessionId () {
return $this->sessionId;
}
*
* @return $queryInstance Our new query instance
*/
- protected final function getQueryInstance () {
+ public final function getQueryInstance () {
return $this->queryInstance;
}
+ /**
+ * Getter for boot IP/port combination
+ *
+ * @return $bootIpPort The IP/port combination of the boot node
+ */
+ protected final function getBootIpPort () {
+ return $this->bootIpPort;
+ }
+
/**
* Checks wether the given IP address matches one of the bootstrapping nodes
*
$this->debugOutput('BOOTSTRAP: Created new session-id: ' . $this->getSessionId() . '');
}
- /**
- * Getter for boot IP/port combination
- *
- * @return $bootIpPort The IP/port combination of the boot node
- */
- protected final function getBootIpPort () {
- return $this->bootIpPort;
- }
-
/**
* Initializes queues which every node needs
*
$this->debugOutput('HUB: Initialize listener: START');
// Get a new pool instance
- $this->listenerPoolInstance = ObjectFactory::createObjectByConfiguredName('listener_pool_class', array($this));
+ $this->setListenerPoolInstance(ObjectFactory::createObjectByConfiguredName('listener_pool_class', array($this)));
// Get an instance of the low-level listener
$listenerInstance = ObjectFactory::createObjectByConfiguredName('tcp_listener_class', array($this));
$decoratorInstance = ObjectFactory::createObjectByConfiguredName('hub_tcp_listener_class', array($listenerInstance));
// Add this listener to the pool
- $this->listenerPoolInstance->addListener($decoratorInstance);
+ $this->getListenerPoolInstance()->addListener($decoratorInstance);
// Get a decorator class
$decoratorInstance = ObjectFactory::createObjectByConfiguredName('client_tcp_listener_class', array($listenerInstance));
// Add this listener to the pool
- $this->listenerPoolInstance->addListener($decoratorInstance);
+ $this->getListenerPoolInstance()->addListener($decoratorInstance);
// Get an instance of the low-level listener
$listenerInstance = ObjectFactory::createObjectByConfiguredName('udp_listener_class', array($this));
$decoratorInstance = ObjectFactory::createObjectByConfiguredName('hub_udp_listener_class', array($listenerInstance));
// Add this listener to the pool
- $this->listenerPoolInstance->addListener($decoratorInstance);
+ $this->getListenerPoolInstance()->addListener($decoratorInstance);
// Get a decorator class
$decoratorInstance = ObjectFactory::createObjectByConfiguredName('client_udp_listener_class', array($listenerInstance));
// Add this listener to the pool
- $this->listenerPoolInstance->addListener($decoratorInstance);
+ $this->getListenerPoolInstance()->addListener($decoratorInstance);
// Debug output
$this->debugOutput('HUB: Initialize listener: FINISHED.');