<?php
// Own namespace
-namespace Hub\Network\Package;
+namespace Hub\Network\Compressor\Package;
// Import hub-specific stuff
use Hub\Generic\BaseHubSystem;
+// Import framework-specific stuff
+use CoreFramework\Compressor\Compressor;
+
/**
* A NetworkPackageCompressor decorator class. This decorator can later be
* easily extended without changing any other code.
namespace Hub\Decoder;
// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Handler\Network\RawData\Chunks\ChunkHandler;
use Hub\Network\Package\NetworkPackage;
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-DECODER: decodedData(' . count($decodedData) . ')=' . print_r($decodedData, TRUE));
$this->getPackageInstance()->handleRawData($decodedData);
}
-}
-// [EOF]
-?>
+}
use Hub\Factory\State\Dht\DhtStateFactory;
use Hub\Dht\Distributable;
use Hub\Generic\BaseHubSystem;
+use Hub\Helper\Dht\HelpableDht;
// Import framework stuff
use CoreFramework\Factory\ObjectFactory;
// Call method on database wrapper
$this->getWrapperInstance()->enableAcceptDhtBootstrap();
}
-}
-// [EOF]
-?>
+}
// Return the instance
return $packageInstance;
}
-}
-// [EOF]
-?>
+}
// Import application-specific stuff
use Hub\Filter\Node\BaseNodeFilter;
use Hub\Network\Receive\Receivable;
+use Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
// Import framework stuff
use CoreFramework\Filter\Filterable;
// Import application-specific stuff
use Hub\Factory\Dht\DhtObjectFactory;
use Hub\Network\Receive\Receivable;
+use Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
// Init message-data->configuration translation array
$this->messageToConfig = array(
/*
+ @TODO Why commented out?
XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS => 'your_external_address',
XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS => 'your_internal_address',
XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_SESSION_ID => 'your_session_id'
use Hub\Factory\Dht\DhtObjectFactory;
use Hub\Factory\Node\NodeObjectFactory;
use Hub\Network\Receive\Receivable;
+use Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
// Import framework stuff
use CoreFramework\Criteria\Storing\StoreableCriteria;
namespace Hub\Helper\;
// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Helper\BaseHubSystemHelper;
use Hub\Network\Package\NetworkPackage;
// Next, feed the content in. The network package class is a pipe-through class.
$packageInstance->enqueueRawDataFromTemplate($this);
}
-}
-// [EOF]
-?>
+}
// Import application-specific stuff
use Hub\Factory\Fragmenter\FragmenterFactory;
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Helper\BaseHubSystemHelper;
use Hub\Network\Package\NetworkPackage;
// Import application-specific stuff
use Hub\Dht\Distributable;
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Generic\BaseHubSystem;
use Hub\Helper\BaseHubSystemHelper;
+use Hub\Helper\Dht\HelpableDht;
use Hub\Network\Package\NetworkPackage;
// Import framework stuff
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: EXIT!');
}
-}
-// [EOF]
-?>
+}
// Import application-specific stuff
use Hub\Dht\Distributable;
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Generic\BaseHubSystem;
use Hub\Helper\BaseHubSystemHelper;
+use Hub\Helper\Dht\HelpableDht;
use Hub\Network\Package\NetworkPackage;
// Import framework stuff
// Next, feed the content in. The network package class is a pipe-through class.
$packageInstance->enqueueRawDataFromTemplate($this);
}
-}
-// [EOF]
-?>
+}
namespace Hub\Node\Helper\Announcement;
// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Helper\Node\NodeHelper;
use Hub\Network\Package\NetworkPackage;
// Next, feed the content in. The network package class is a pipe-through class.
$packageInstance->enqueueRawDataFromTemplate($this);
}
-}
-// [EOF]
-?>
+}
namespace Hub\Node\Helper\Answer\Announcement;
// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Helper\Node\NodeHelper;
// Import framework stuff
// Next, feed the content in. The network package class is a pipe-through class.
$packageInstance->enqueueRawDataFromTemplate($this);
}
-}
-// [EOF]
-?>
+}
namespace Hub\Node\Helper\Answer\Dht\Bootstrap;
// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Helper\Node\NodeHelper;
+use Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
// Import framework stuff
use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
// Next, feed the content in. The network package class is a pipe-through class.
$packageInstance->enqueueRawDataFromTemplate($this);
}
-}
-// [EOF]
-?>
+}
namespace Hub\Node\Helper\Answer\Request\NodeList;
// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Helper\Node\NodeHelper;
// Import framework stuff
// Next, feed the content in. The network package class is a pipe-through class.
$packageInstance->enqueueRawDataFromTemplate($this);
}
-}
-// [EOF]
-?>
+}
namespace Hub\Node\Helper\;
// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Helper\Node\NodeHelper;
use Hub\Network\Package\NetworkPackage;
// Next, feed the content in. The network package class is a pipe-through class.
$packageInstance->enqueueRawDataFromTemplate($this);
}
-}
-// [EOF]
-?>
+}
namespace Hub\Node\Helper\SelfConnect;
// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Helper\Node\NodeHelper;
use Hub\Network\Package\NetworkPackage;
use Hub\Tag\Tagable;
// Next, feed the content in. The network package class is a pipe-through class.
$packageInstance->enqueueRawDataFromTemplate($this);
}
-}
-// [EOF]
-?>
+}
namespace Hub\Node\Helper\Request\NodeList;
// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Helper\Node\NodeHelper;
use Hub\Network\Package\NetworkPackage;
// Next, feed the content in. The network package class is a pipe-through class.
$packageInstance->enqueueRawDataFromTemplate($this);
}
-}
-// [EOF]
-?>
+}
// Import application-specific stuff
use Hub\Container\Socket\StorableSocket;
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Listener\Listenable;
use Hub\Network\Networkable;
use Hub\Tools\HubTools;
// Import framework stuff
+use CoreFramework\Compressor\Compressor;
use CoreFramework\Factory\ObjectFactory;
use CoreFramework\Factory\Registry\Socket\SocketRegistryFactory;
use CoreFramework\Registry\Registry;
// Own namespace
namespace Hub\Task\Network\Reader;
+// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
+
// Import framework stuff
use CoreFramework\Task\BaseTask;
use CoreFramework\Task\Taskable;
public function doShutdown () {
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
}
-}
-// [EOF]
-?>
+}
// Own namespace
namespace Hub\Task\Network\Writer;
+// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
+
// Import framework stuff
use CoreFramework\Task\BaseTask;
use CoreFramework\Task\Taskable;
public function doShutdown () {
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
}
-}
-// [EOF]
-?>
+}
// Import application-specific stuff
use Hub\Pool\Poolable;
+use Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
use CoreFramework\Visitor\BaseVisitor;
// Import application-specific stuff
use Hub\Pool\Poolable;
+use Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
use CoreFramework\Visitor\BaseVisitor;
use Hub\Network\Receive\Receivable;
use Hub\Pool\Poolable;
use Hub\Visitor\Listener\ListenerVisitor;
+use Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
use CoreFramework\Visitor\BaseVisitor;
// Import application-specific stuff
use Hub\Pool\Poolable;
+use Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
use CoreFramework\Visitor\BaseVisitor;
// Import application-specific stuff
use Hub\Listener\Listenable;
use Hub\Pool\Poolable;
+use Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
use CoreFramework\Visitor\BaseVisitor;
namespace Hub\Visitor\Shutdown\Socket;
// Import application-specific stuff
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Helper\Connection\ConnectionHelper;
use Hub\Network\Deliver\Deliverable;
// Import application-specific stuff
use Hub\Container\Socket\StorableSocket;
+use Hub\Factory\Network\NetworkPackageFactory;
use Hub\Helper\Connection\ConnectionHelper;
use Hub\Network\Deliver\Deliverable;
$cfg->setConfigEntry('half_shutdown_socket_visitor_class', 'Hub\Visitor\Shutdown\Socket\HalfShutdownSocketVisitor');
// CFG: NODE-RAW-DATA-MONITOR-VISITOR-CLASS
-$cfg->setConfigEntry('node_raw_data_monitor_visitor_class', 'RawDataPoolMonitorVisitor');
+$cfg->setConfigEntry('node_raw_data_monitor_visitor_class', 'Hub\Visitor\Monitor\Pool\RawDataPoolMonitorVisitor');
// CFG: ACTIVE-TASK-VISITOR-CLASS
$cfg->setConfigEntry('active_task_visitor_class', 'Hub\Visitor\Task\Active\ActiveTaskVisitor');
$cfg->setConfigEntry('node_self_connect_helper_class', 'NodeSelfConnectHelper');
// CFG: DHT-BOOTSTRAP-HELPER-CLASS
-$cfg->setConfigEntry('dht_bootstrap_helper_class', 'DhtBootstrapHelper');
+$cfg->setConfigEntry('dht_bootstrap_helper_class', 'Hub\Helper\Dht\Bootstrap\DhtBootstrapHelper');
// CFG: DHT-PUBLISH-ENTRY-HELPER-CLASS
$cfg->setConfigEntry('dht_publish_entry_helper_class', 'DhtPublishEntryHelper');
$cfg->setConfigEntry('node_request_node_list_template_class', 'XmlRequestNodeListTemplateEngine');
// CFG: NODE-DHT-BOOTSTRAP-TEMPLATE-CLASS
-$cfg->setConfigEntry('node_dht_bootstrap_template_class', 'XmlDhtBootstrapTemplateEngine');
+$cfg->setConfigEntry('node_dht_bootstrap_template_class', 'Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine');
// CFG: NODE-DHT-BOOTSTRAP-ANSWER-TEMPLATE-CLASS
$cfg->setConfigEntry('node_dht_bootstrap_answer_template_class', 'XmlDhtBootstrapAnswerTemplateEngine');
$cfg->setConfigEntry('node_request_node_list_entries_template_class', 'XmlRequestNodeListEntryTemplateEngine');
// CFG: DHT-BOOTSTRAP-TEMPLATE-CLASS
-$cfg->setConfigEntry('dht_bootstrap_template_class', 'XmlDhtBootstrapTemplateEngine');
+$cfg->setConfigEntry('dht_bootstrap_template_class', 'Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine');
// CFG: DHT-PUBLISH-ENTRY-TEMPLATE-CLASS
$cfg->setConfigEntry('dht_publish_entry_template_class', 'XmlDhtPublishEntryTemplateEngine');
$cfg->setConfigEntry('web_template_class', 'ConsoleTemplateEngine');
// CFG: NETWORK-PACKAGE-CLASS
-$cfg->setConfigEntry('network_package_class', 'NetworkPackage');
+$cfg->setConfigEntry('network_package_class', 'Hub\Network\Package\NetworkPackage');
// CFG: PACKAGE-COMPRESSOR-CLASS
-$cfg->setConfigEntry('deco_package_compressor_class', 'NetworkPackageCompressorDecorator');
+$cfg->setConfigEntry('deco_package_compressor_class', 'Hub\Network\Compressor\Package\NetworkPackageCompressorDecorator');
// CFG: RAW-PACKAGE-COMPRESSOR-CLASS
-$cfg->setConfigEntry('raw_package_compressor_class', 'ZlibCompressor');
+$cfg->setConfigEntry('raw_package_compressor_class', 'CoreFramework\Compressor\Zlib\ZlibCompressor');
// CFG: SOCKET-REGISTRY-CLASS
$cfg->setConfigEntry('socket_registry_class', 'Hub\Registry\Socket\SocketRegistry');
$cfg->setConfigEntry('package_fragmenter_class', 'Hub\Network\Package\Fragment\PackageFragmenter');
// CFG: PACKAGE-ASSEMBLER-CLASS
-$cfg->setConfigEntry('package_assembler_class', 'PackageAssembler');
+$cfg->setConfigEntry('package_assembler_class', 'Hub\Network\Package\Assembler\PackageAssembler');
// CFG: PACKAGE-CHUNK-SIZE
$cfg->setConfigEntry('package_chunk_size', 256*8);
// Import application-specific stuff
use Hub\Factory\Node\NodeObjectFactory;
+use Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
// Import framework stuff
use CoreFramework\Generic\FrameworkException;
<?php
// Own namespace
-namespace Hub\Assembler;
+namespace Hub\Network\Package\Assembler;
// Import application-specific stuff
use Hub\Generic\HubInterface;
// Import application-specific stuff
use Hub\Listener\Listenable;
-
-// Import framework stuff
+use Hub\Visitor\Pool\PoolVisitor;
/**
* An interface for the visitor implementation for pools