-# Use Linux/Uni* line-feed for new lines (prevents converting)
-* text=lf
+#
+### Distribute this file on all GIT projects!
+#
+# Autodetect text files
+* text=auto
+
+# Force the following filetypes to have unix eols, so Windows does not break them
+*.* text eol=lf
+
+# Force images/fonts to be handled as binaries
+*.jpg binary
+*.jpeg binary
+*.gif binary
+*.png binary
+*.t3x binary
+*.t3d binary
+*.exe binary
+*.data binary
+*.ttf binary
+*.eof binary
+*.eot binary
+*.swf binary
+*.mov binary
+*.mp4 binary
+*.mp3 binary
+*.ogg binary
+*.flv binary
+*.jar binary
+*.pdf binary
+*.woff* binary
+*.otf binary
+*.z binary
+*.docx binary
/nbproject
data/stacks/*.stack*
data/url_lists/*.*
+/*.log
<?php
// Must be this namespace, else the launcher cannot find the class.
-namespace CoreFramework\Helper\Application;
+namespace Org\Mxchange\CoreFramework\Helper\Application;
// Import hub-specific sutff
-use Hub\Tools\HubTools;
+use Org\Shipsimu\Hub\Tools\HubTools;
// Import framework stuff
-use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Configuration\FrameworkConfiguration;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Loader\ClassLoader;
-use CoreFramework\Manager\ManageableApplication;
-use CoreFramework\Object\BaseFrameworkSystem;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Loader\ClassLoader;
+use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
+use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* A class holding general data about the application and some methods for
*/
public function initApplication () {
// Get config instance
- $cfg = FrameworkConfiguration::getSelfInstance();
+ $cfg = FrameworkBootstrap::getConfigurationInstance();
// Initialize output system
ApplicationHelper::createDebugInstance('ApplicationHelper');
// Get a controller resolver
$resolverClass = sprintf(
- 'Hub\Resolver\Controller\%s',
+ 'Org\Shipsimu\Hub\Resolver\Controller\%s',
self::convertToClassName(sprintf(
'%s_%s_controller_resolver',
$this->getAppShortName(),
namespace Hub\AptProxy;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A node ??? apt-proxy
<?php
// Own namespace
-namespace Hub\AptProxy;
+namespace Org\Shipsimu\Hub\AptProxy;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A general NodeAptProxy class
<?php
// Own namespace
-namespace Hub\AptProxy;
+namespace Org\Shipsimu\Hub\AptProxy;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A node console apt-proxy
<?php
// Own namespace
-namespace Hub\Block;
+namespace Org\Shipsimu\Hub\Block;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A general Block class
<?php
// Own namespace
-namespace Hub\FilterChain\Package;
+namespace Org\Shipsimu\Hub\FilterChain\Package;
// Import application-specific stuff
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
/**
* A filter chain for processing network packages (or better messages)
namespace Hub\Chat;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A node ??? chat
<?php
// Own namespace
-namespace Hub\Chat;
+namespace Org\Shipsimu\Hub\Chat;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A general NodeChat class
<?php
// Own namespace
-namespace Hub\Chat;
+namespace Org\Shipsimu\Hub\Chat;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A node console chat
<?php
// Own namespace
-namespace Hub\Generic;
+namespace Org\Shipsimu\Hub\Generic;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Handler\Protocol\HandleableProtocol;
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
-use Hub\Information\ShareableInfo;
-use Hub\Listener\BaseListener;
-use Hub\Listener\Listenable;
-use Hub\Locator\Node\LocateableNode;
-use Hub\Network\Deliver\Deliverable;
-use Hub\Network\Package\Assembler\Assembler;
-use Hub\Network\Package\Fragment\Fragmentable;
-use Hub\Network\Receive\Receivable;
-use Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Handler\Protocol\HandleableProtocol;
+use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
+use Org\Shipsimu\Hub\Information\ShareableInfo;
+use Org\Shipsimu\Hub\Listener\BaseListener;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Network\Deliver\Deliverable;
+use Org\Shipsimu\Hub\Network\Package\Assembler\Assembler;
+use Org\Shipsimu\Hub\Network\Package\Fragment\Fragmentable;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Pool\Poolable;
// Import framework stuff
-use CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
/**
* A general hub system class
* @return $isset Whether start/end marker are set
*/
public final function ifStartEndMarkersSet ($data) {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HUB-SYSTEM: data()=%d - CALLED!', strlen($data)));
+
// Determine it
- $isset = ((substr($data, 0, strlen(BaseRawDataHandler::STREAM_START_MARKER)) == BaseRawDataHandler::STREAM_START_MARKER) && (substr($data, -1 * strlen(BaseRawDataHandler::STREAM_END_MARKER), strlen(BaseRawDataHandler::STREAM_END_MARKER)) == BaseRawDataHandler::STREAM_END_MARKER));
+ $isset = ((substr($data, 0, strlen(HandleableRawData::STREAM_START_MARKER)) == HandleableRawData::STREAM_START_MARKER) && (substr($data, -1 * strlen(HandleableRawData::STREAM_END_MARKER), strlen(HandleableRawData::STREAM_END_MARKER)) == HandleableRawData::STREAM_END_MARKER));
// ... and return it
return $isset;
<?php
// Own namespace
-namespace CoreFramework\Client\Http;
+namespace Org\Mxchange\CoreFramework\Client\Http;
/**
* A HTTP client class
<?php
// Own namespace
-namespace Hub\Command;
+namespace Org\Shipsimu\Hub\Command;
// Import framework stuff
-use CoreFramework\Command\BaseCommand;
-use CoreFramework\Command\Commandable;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Command\BaseCommand;
+use Org\Mxchange\CoreFramework\Command\Commandable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A command for the 'apt-proxy client' routine
<?php
// Own namespace
-namespace Hub\Command;
+namespace Org\Shipsimu\Hub\Command;
// Import framework stuff
-use CoreFramework\Command\BaseCommand;
-use CoreFramework\Command\Commandable;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Command\BaseCommand;
+use Org\Mxchange\CoreFramework\Command\Commandable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A command for the 'chat client' routine
<?php
// Own namespace
-namespace Hub\Command;
+namespace Org\Shipsimu\Hub\Command;
// Import framework stuff
-use CoreFramework\Command\BaseCommand;
-use CoreFramework\Command\Commandable;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Command\BaseCommand;
+use Org\Mxchange\CoreFramework\Command\Commandable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A command for the 'crawler client' routine
<?php
// Own namespace
-namespace Hub\Command;
+namespace Org\Shipsimu\Hub\Command;
// Import framework stuff
-use CoreFramework\Command\BaseCommand;
-use CoreFramework\Command\Commandable;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Command\BaseCommand;
+use Org\Mxchange\CoreFramework\Command\Commandable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A command for the 'cruncher client' routine
<?php
// Own namespace
-namespace Hub\Command;
+namespace Org\Shipsimu\Hub\Command;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
// Import framework stuff
-use CoreFramework\Command\BaseCommand;
-use CoreFramework\Command\Commandable;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Command\BaseCommand;
+use Org\Mxchange\CoreFramework\Command\Commandable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A command for the 'main' routine
<?php
// Own namespace
-namespace Hub\Command;
+namespace Org\Shipsimu\Hub\Command;
// Import framework stuff
-use CoreFramework\Command\BaseCommand;
-use CoreFramework\Command\Commandable;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Command\BaseCommand;
+use Org\Mxchange\CoreFramework\Command\Commandable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A command for the 'miner client' routine
<?php
// Own namespace
-namespace Hub\Command;
+namespace Org\Shipsimu\Hub\Command;
// Import framework stuff
-use CoreFramework\Command\BaseCommand;
-use CoreFramework\Command\Commandable;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Command\BaseCommand;
+use Org\Mxchange\CoreFramework\Command\Commandable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A command for the 'main' routine
<?php
// Own namespace
-namespace Hub\Communicator;
+namespace Org\Shipsimu\Hub\Communicator;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A general communicator class
$stateInstance->communicatorHasInitialized();
}
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\Crawler\Communicator\Node;
+namespace Org\Shipsimu\Hub\Crawler\Communicator\Node;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A crawler->node communicator class
<?php
// Own namespace
-namespace Hub\Miner\Communicator\Node;
+namespace Org\Shipsimu\Hub\Miner\Communicator\Node;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A miner->node communicator class
<?php
// Own namespace
-namespace Hub\Network\Compressor\Package;
+namespace Org\Shipsimu\Hub\Network\Compressor\Package;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
// Import framework-specific stuff
-use CoreFramework\Compressor\Compressor;
+use Org\Mxchange\CoreFramework\Compressor\Compressor;
/**
* A NetworkPackageCompressor decorator class. This decorator can later be
<?php
// Own namespace
-namespace Hub\Container;
+namespace Org\Shipsimu\Hub\Container;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
-use Hub\Generic\HubInterface;
-use Hub\Information\ShareableInfo;
-use Hub\Listener\Listenable;
-use Hub\Locator\Node\LocateableNode;
-use Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Information\ShareableInfo;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Pool\Poolable;
// Import framework stuff
-use CoreFramework\Container\BaseContainer;
+use Org\Mxchange\CoreFramework\Container\BaseContainer;
/**
* A general hub container
* @return $isset Whether start/end marker are set
*/
public final function ifStartEndMarkersSet ($data) {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HUB-CONTAINER: data()=%d - CALLED!', strlen($data)));
+
// Determine it
- $isset = ((substr($data, 0, strlen(BaseRawDataHandler::STREAM_START_MARKER)) == BaseRawDataHandler::STREAM_START_MARKER) && (substr($data, -1 * strlen(BaseRawDataHandler::STREAM_END_MARKER), strlen(BaseRawDataHandler::STREAM_END_MARKER)) == BaseRawDataHandler::STREAM_END_MARKER));
+ $isset = ((substr($data, 0, strlen(HandleableRawData::STREAM_START_MARKER)) == HandleableRawData::STREAM_START_MARKER) && (substr($data, -1 * strlen(HandleableRawData::STREAM_END_MARKER), strlen(HandleableRawData::STREAM_END_MARKER)) == HandleableRawData::STREAM_END_MARKER));
// ... and return it
return $isset;
<?php
// Own namespace
-namespace Hub\Container\Socket;
+namespace Org\Shipsimu\Hub\Container\Socket;
// Import application-specific stuff
-use Hub\Container\BaseHubContainer;
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
-use Hub\Factory\Network\Locator\UniversalNodeLocatorFactory;
-use Hub\Factory\Socket\SocketFactory;
-use Hub\Helper\Connection\BaseConnectionHelper;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Information\ShareableInfo;
-use Hub\Listener\BaseListener;
-use Hub\Listener\Listenable;
-use Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Container\BaseHubContainer;
+use Org\Shipsimu\Hub\Factory\Network\Locator\UniversalNodeLocatorFactory;
+use Org\Shipsimu\Hub\Factory\Socket\SocketFactory;
+use Org\Shipsimu\Hub\Helper\Connection\BaseConnectionHelper;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Information\ShareableInfo;
+use Org\Shipsimu\Hub\Listener\BaseListener;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Socket\InvalidSocketException;
-use CoreFramework\Socket\NoSocketErrorDetectedException;
-use CoreFramework\Socket\SocketBindingException;
-use CoreFramework\Socket\SocketConnectionException;
-use CoreFramework\Socket\SocketOperationException;
-use CoreFramework\Socket\UnsupportedSocketErrorHandlerException;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
+use Org\Mxchange\CoreFramework\Socket\NoSocketErrorDetectedException;
+use Org\Mxchange\CoreFramework\Socket\SocketBindingException;
+use Org\Mxchange\CoreFramework\Socket\SocketConnectionException;
+use Org\Mxchange\CoreFramework\Socket\SocketOperationException;
+use Org\Mxchange\CoreFramework\Socket\UnsupportedSocketErrorHandlerException;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
// Import SPL stuff
use \BadMethodCallException;
* @param $socketProtocol Socket protocol
* @param $packageData Raw package data
* @return $socketInstance An instance of this Container class
+ * @throws InvalidArgumentException If socket type is not set in $packageData array
*/
public static final function createSocketContainer ($socketResource, $socketProtocol, array $packageData) {
// Trace message
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET: socketResource=%s,socketProtocol=%s,packageData()=%d - CALLED!', $socketResource, $socketProtocol, count($packageData)));
- /* DEBUG-PRINT: */ printf('[%s:%d]: packageData=%s', __METHOD__, __LINE__, print_r($packageData, TRUE));
+ //* DEBUG-PRINT: */ printf('[%s:%d]: packageData=%s', __METHOD__, __LINE__, print_r($packageData, TRUE));
+
+ // Socket type must always be there
+ if (!isset($packageData[StorableSocket::SOCKET_ARRAY_INDEX_TYPE])) {
+ // Abort here
+ throw new InvalidArgumentException(sprintf('Array packageData does not contain "%s".', StorableSocket::SOCKET_ARRAY_INDEX_TYPE));
+ } // END - if
// Get a new instance
$socketInstance = new SocketContainer();
return $socketInstance;
}
+ /**
+ * Reads (binary) data from socket instance
+ *
+ * @return $rawData Raw data being read
+ * @throws InvalidSocketException If the stored socket is not valid
+ */
+ public function readDataFromSocket () {
+ // Trace message
+ /* EXTREME-NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: CALLED!', strtoupper($this->getSocketProtocol())));
+
+ // Should be valid socket
+ if (!$this->isValidSocket()) {
+ // Throw exception
+ throw new InvalidSocketException(array($this, $this->getSocketResource()), self::EXCEPTION_INVALID_SOCKET);
+ } // END - if
+
+ // Debug message
+ /* EXTREME-NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: this->socketResource=%s', strtoupper($this->getSocketProtocol()), $this->getSocketResource()));
+
+ /*
+ * Read raw data from socket. If you change PHP_BINARY_READ to
+ * PHP_NORMAL_READ, this line will endless block. This script does only
+ * provide simultanous or faked threads, not real.
+ */
+ $rawData = socket_read($this->getSocketResource(), $this->getConfigInstance()->getConfigEntry('tcp_buffer_length'), PHP_BINARY_READ);
+
+ // Trace message
+ /* EXTREME-NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: rawData[%s]()=%d - EXIT!', strtoupper($this->getSocketProtocol()), gettype($rawData), strlen($rawData)));
+
+ // Return it
+ return $rawData;
+ }
+
/**
* Tries to identify the socket peer by calling socket_getpeer() and stores
* it in package data array.
<?php
// Own namespace
-namespace Hub\Controller;
+namespace Org\Shipsimu\Hub\Controller;
// Import framework stuff
-use CoreFramework\Controller\BaseController;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\BaseController;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A console controller for the apt-proxy program.
<?php
// Own namespace
-namespace Hub\Controller;
+namespace Org\Shipsimu\Hub\Controller;
// Import framework stuff
-use CoreFramework\Controller\BaseController;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\BaseController;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A console controller for the chat program.
<?php
// Own namespace
-namespace Hub\Controller;
+namespace Org\Shipsimu\Hub\Controller;
// Import framework stuff
-use CoreFramework\Controller\BaseController;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\BaseController;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A console controller for the crawler program.
<?php
// Own namespace
-namespace Hub\Controller;
+namespace Org\Shipsimu\Hub\Controller;
// Import framework stuff
-use CoreFramework\Controller\BaseController;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\BaseController;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A console controller for the cruncher, which is our very first hub
<?php
// Own namespace
-namespace Hub\Controller;
+namespace Org\Shipsimu\Hub\Controller;
// Import framework stuff
-use CoreFramework\Controller\BaseController;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\BaseController;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* The default controller with news for e.g. home or news page
<?php
// Own namespace
-namespace Hub\Controller;
+namespace Org\Shipsimu\Hub\Controller;
// Import framework stuff
-use CoreFramework\Controller\BaseController;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\BaseController;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A console controller for the crawler program.
<?php
// Own namespace
-namespace Hub\Controller;
+namespace Org\Shipsimu\Hub\Controller;
// Import framework stuff
-use CoreFramework\Controller\BaseController;
-use CoreFramework\Controller\Controller;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Resolver\Command\CommandResolver;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\BaseController;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A console controller for the "continued hashing miner".
namespace Hub\Crawler;
// Import framework stuff
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A node ??? crawler
<?php
// Own namespace
-namespace Hub\Crawler;
+namespace Org\Shipsimu\Hub\Crawler;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
// Import framework stuff
-use CoreFramework\Registry\Registry;
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A general NodeCrawler class
<?php
// Own namespace
-namespace Hub\Crawler;
+namespace Org\Shipsimu\Hub\Crawler;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A node console crawler
namespace Hub\Cruncher;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A hub-cruncher class for the '???' mode
<?php
// Own namespace
-namespace Hub\Cruncher;
+namespace Org\Shipsimu\Hub\Cruncher;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
// Import framework stuff
-use CoreFramework\Database\Updateable;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Database\Updateable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A general hub cruncher class
<?php
// Own namespace
-namespace Hub\Cruncher\Mcrypt;
+namespace Org\Shipsimu\Hub\Cruncher\Mcrypt;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A hub-mcrypt cruncher class
<?php
// Own namespace
-namespace Hub\Database\Frontend;
+namespace Org\Shipsimu\Hub\Database\Frontend;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
-use Hub\Generic\HubInterface;
-use Hub\Information\ShareableInfo;
-use Hub\Locator\Node\LocateableNode;
-use Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Information\ShareableInfo;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Pool\Poolable;
// Import framework stuff
-use CoreFramework\Database\Frontend\BaseDatabaseWrapper;
+use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseWrapper;
/**
* A general hub database wrapper
* @return $isset Whether start/end marker are set
*/
public final function ifStartEndMarkersSet ($data) {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HUB-DATABASE-WRAPPER: data()=%d - CALLED!', strlen($data)));
+
// Determine it
- $isset = ((substr($data, 0, strlen(BaseRawDataHandler::STREAM_START_MARKER)) == BaseRawDataHandler::STREAM_START_MARKER) && (substr($data, -1 * strlen(BaseRawDataHandler::STREAM_END_MARKER), strlen(BaseRawDataHandler::STREAM_END_MARKER)) == BaseRawDataHandler::STREAM_END_MARKER));
+ $isset = ((substr($data, 0, strlen(HandleableRawData::STREAM_START_MARKER)) == HandleableRawData::STREAM_START_MARKER) && (substr($data, -1 * strlen(HandleableRawData::STREAM_END_MARKER), strlen(HandleableRawData::STREAM_END_MARKER)) == HandleableRawData::STREAM_END_MARKER));
// ... and return it
return $isset;
<?php
// Own namespace
-namespace Hub\Database\Frontend\Cruncher\Unit;
+namespace Org\Shipsimu\Hub\Database\Frontend\Cruncher\Unit;
// Import application-specific stuff
-use Hub\Database\Frontend\BaseHubDatabaseWrapper;
+use Org\Shipsimu\Hub\Database\Frontend\BaseHubDatabaseWrapper;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A database wrapper for cruncher work/test units
<?php
// Own namespace
-namespace Hub\Database\Frontend\Node\Dht;
+namespace Org\Shipsimu\Hub\Database\Frontend\Node\Dht;
// Import application-specific stuff
-use Hub\Database\Frontend\BaseHubDatabaseWrapper;
-use Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Node\BaseHubNode;
+use Org\Shipsimu\Hub\Database\Frontend\BaseHubDatabaseWrapper;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Node\BaseHubNode;
// Import framework stuff
-use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Criteria\Local\LocalSearchCriteria;
-use CoreFramework\Criteria\Storing\StoreableCriteria;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Handler\DataSet\HandleableDataSet;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A database wrapper for distributed hash tables
<?php
// Own namespace
-namespace Hub\Database\Frontend\Node\Information;
+namespace Org\Shipsimu\Hub\Database\Frontend\Node\Information;
// Import application-specific stuff
-use Hub\Database\Frontend\BaseHubDatabaseWrapper;
-use Hub\Database\Frontend\Node\NodeInformationWrapper;
-use Hub\Node\BaseHubNode;
-use Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Database\Frontend\BaseHubDatabaseWrapper;
+use Org\Shipsimu\Hub\Database\Frontend\Node\NodeInformationWrapper;
+use Org\Shipsimu\Hub\Node\BaseHubNode;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
// Import framework stuff
-use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Criteria\Local\LocalSearchCriteria;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
/**
* A database wrapper for node informations
<?php
// Own namespace
-namespace Hub\Database\Frontend\Node\PeerState;
+namespace Org\Shipsimu\Hub\Database\Frontend\Node\PeerState;
// Import application-specific sutff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Database\Frontend\BaseHubDatabaseWrapper;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Network\Package\NetworkPackage;
-use Hub\LookupTable\Lookupable;
-use Hub\State\Peer\Lookup\LookupablePeerState;
-use Hub\State\Peer\PeerStateable;
-use Hub\Tools\HubTools;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Database\Frontend\BaseHubDatabaseWrapper;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\LookupTable\Lookupable;
+use Org\Shipsimu\Hub\State\Peer\Lookup\LookupablePeerState;
+use Org\Shipsimu\Hub\State\Peer\PeerStateable;
+use Org\Shipsimu\Hub\Tools\HubTools;
// Import framework stuff
-use CoreFramework\Criteria\Local\LocalSearchCriteria;
-use CoreFramework\Criteria\Storing\StoreableCriteria;
-use CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
/**
* A database wrapper for peer state lookups
*/
private function getSenderSearchInstanceFromPackageData (array $packageData) {
// Get the instance
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: Searching for sender ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER_ADDRESS]);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: Searching for sender ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER_ADDRESS]);
$searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
// Add 'sender' as the peer's IP address
*/
public function isSenderNewPeer (array $packageData, StoreableCriteria $dataSetInstance = NULL) {
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: packageData()=' . count($packageData) . ' - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: packageData()=' . count($packageData) . ' - CALLED!');
// Is the package valid?
if (!isset($packageData[NetworkPackage::PACKAGE_DATA_SENDER_ADDRESS])) {
$entries = $this->doSelectCountByCriteria($searchInstance, array(self::DB_COLUMN_PEER_SESSION_ID => TRUE));
// Is it there?
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: entries=' . $entries);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: entries=' . $entries);
$isNewPeer = ($entries != 1);
// Return the result
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: isNewPeer=' . intval($isNewPeer) . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: isNewPeer=' . intval($isNewPeer) . ' - EXIT!');
return $isNewPeer;
}
$this->queryInsertDataSet($dataSetInstance, array(self::DB_COLUMN_PEER_SESSION_ID => TRUE));
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER_ADDRESS] . ' has been registered.');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER_ADDRESS] . ' has been registered.');
}
/**
}
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER_ADDRESS] . ' has been registered/updated with state ' . $stateInstance->getStateName());
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER_ADDRESS] . ' has been registered/updated with state ' . $stateInstance->getStateName());
}
/**
*/
public function isSamePeerState (ConnectionHelper $helperInstance, array $packageData) {
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: State ' . $helperInstance->getPrintableState() . ' needs to be checked it has changed ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: State ' . $helperInstance->getPrintableState() . ' needs to be checked it has changed ...');
// Now get the search instance from given package data
$searchInstance = $this->getSenderSearchInstanceFromPackageData($packageData);
$rowData = $resultInstance->current();
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: rowData[' . gettype($rowData) . ']=' . print_r($rowData, TRUE));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: rowData[' . gettype($rowData) . ']=' . print_r($rowData, TRUE));
// Assert on important elements
assert(isset($rowData[self::DB_COLUMN_PEER_STATE]));
$isSamePeerState = ($rowData[self::DB_COLUMN_PEER_STATE] == $helperInstance->getPrintableState());
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: state in database: ' . $rowData[self::DB_COLUMN_PEER_STATE] . ', new state: ' . $helperInstance->getPrintableState() . ',isSamePeerState=' . intval($isSamePeerState));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-DATABASE-WRAPPER: state in database: ' . $rowData[self::DB_COLUMN_PEER_STATE] . ', new state: ' . $helperInstance->getPrintableState() . ',isSamePeerState=' . intval($isSamePeerState));
// Return it
return $isSamePeerState;
<?php
// Own namespace
-namespace Hub\Decoder;
+namespace Org\Shipsimu\Hub\Decoder;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A general Decoder class
<?php
// Own namespace
-namespace Hub\Network\Decoder\Package;
+namespace Org\Shipsimu\Hub\Network\Decoder\Package;
// Import application-specific stuff
-use Hub\Decoder\BaseDecoder;
-use Hub\Decoder\Decodeable;
-use Hub\Factory\Discovery\Package\PackageDiscoveryFactory;
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Handler\Network\RawData\Chunks\ChunkHandler;
-use Hub\Handler\Network\RawData\Chunks\HandleableChunks;
-use Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Decoder\BaseDecoder;
+use Org\Shipsimu\Hub\Decoder\Decodeable;
+use Org\Shipsimu\Hub\Factory\Discovery\Package\PackageDiscoveryFactory;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Handler\Network\RawData\Chunks\ChunkHandler;
+use Org\Shipsimu\Hub\Handler\Network\RawData\Chunks\HandleableChunks;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A Package decoder class
<?php
// Own namespace
-namespace Hub\Dht;
+namespace Org\Shipsimu\Hub\Dht;
// Import hub-specific stuff
-use Hub\Factory\State\Dht\DhtStateFactory;
-use Hub\Dht\Distributable;
-use Hub\Generic\BaseHubSystem;
-use Hub\Helper\Dht\HelpableDht;
+use Org\Shipsimu\Hub\Factory\State\Dht\DhtStateFactory;
+use Org\Shipsimu\Hub\Dht\Distributable;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Helper\Dht\HelpableDht;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
/**
* A general DHT class
<?php
// Own namespace
-namespace Hub\Dht\Node;
+namespace Org\Shipsimu\Hub\Dht\Node;
// Import application-specific stuff
-use Hub\Dht\BaseDht;
-use Hub\Dht\Distributable;
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Dht\BaseDht;
+use Org\Shipsimu\Hub\Dht\Distributable;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
// Import framework stuff
-use CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Handler\DataSet\HandleableDataSet;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A Node DHT facade class
<?php
// Own namespace
-namespace Hub\Discovery\Node;
+namespace Org\Shipsimu\Hub\Discovery\Node;
// Import framework stuff
-use CoreFramework\Discovery\BaseDiscovery;
-use CoreFramework\Discovery\Discoverable;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Helper\Template\HelpableTemplate;
-use CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Discovery\BaseDiscovery;
+use Org\Mxchange\CoreFramework\Discovery\Discoverable;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Helper\Template\HelpableTemplate;
+use Org\Mxchange\CoreFramework\Request\Requestable;
/**
* A general node discovery class
<?php
// Own namespace
-namespace Hub\Discovery\Locator;
+namespace Org\Shipsimu\Hub\Discovery\Locator;
// Import application-specific stuff
-use Hub\Discovery\Node\BaseNodeDiscovery;
-use Hub\Factory\Resolver\Protocol\ProtocolResolverFactory;
-use Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Discovery\Node\BaseNodeDiscovery;
+use Org\Shipsimu\Hub\Factory\Resolver\Protocol\ProtocolResolverFactory;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A UniversalNodeLocator discovery class
<?php
// Own namespace
-namespace Hub\Discovery\Protocol;
+namespace Org\Shipsimu\Hub\Discovery\Protocol;
// Import application-specific stuff
-use Hub\Discovery\Node\BaseNodeDiscovery;
-use Hub\Factory\Tag\Package\PackageTagsFactory;
-use Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Discovery\Node\BaseNodeDiscovery;
+use Org\Shipsimu\Hub\Factory\Tag\Package\PackageTagsFactory;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A Protocol discovery class
<?php
// Own namespace
-namespace Hub\Discovery\Recipient;
+namespace Org\Shipsimu\Hub\Discovery\Recipient;
// Import framework-specific stuff
-use Hub\Discovery\Node\BaseNodeDiscovery;
-use Hub\Discovery\Recipient\DiscoverableRecipient;
-use Hub\Factory\Lists\Recipient\RecipientListFactory;
+use Org\Shipsimu\Hub\Discovery\Node\BaseNodeDiscovery;
+use Org\Shipsimu\Hub\Discovery\Recipient\DiscoverableRecipient;
+use Org\Shipsimu\Hub\Factory\Lists\Recipient\RecipientListFactory;
/**
* A PackageRecipient discovery class
<?php
// Own namespace
-namespace Hub\Discovery\Recipient\Dht;
+namespace Org\Shipsimu\Hub\Discovery\Recipient\Dht;
// Import application-specific stuff
-use Hub\Discovery\Recipient\BaseRecipientDiscovery;
-use Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Discovery\Recipient\BaseRecipientDiscovery;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A DhtRecipient discovery class
<?php
// Own namespace
-namespace Hub\Discovery\Network\Recipient;
+namespace Org\Shipsimu\Hub\Discovery\Network\Recipient;
// Import hub-specific sutff
-use Hub\Discovery\Recipient\BaseRecipientDiscovery;
-use Hub\Discovery\Recipient\Node\DiscoverableNodeRecipient;
-use Hub\Factory\Handler\Protocol\ProtocolHandlerFactory;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Node\Data\InvalidSessionIdException;
-use Hub\Tools\HubTools;
+use Org\Shipsimu\Hub\Discovery\Recipient\BaseRecipientDiscovery;
+use Org\Shipsimu\Hub\Discovery\Recipient\Node\DiscoverableNodeRecipient;
+use Org\Shipsimu\Hub\Factory\Handler\Protocol\ProtocolHandlerFactory;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Node\Data\InvalidSessionIdException;
+use Org\Shipsimu\Hub\Tools\HubTools;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\FrameworkException;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A PackageRecipient discovery class
<?php
// Own namespace
-namespace Hub\Network\Discovery\Socket;
+namespace Org\Shipsimu\Hub\Network\Discovery\Socket;
// Import hub-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Discovery\Recipient\BaseRecipientDiscovery;
-use Hub\Discovery\Protocol\ProtocolDiscovery;
-use Hub\Discovery\Socket\DiscoverableSocket;
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Factory\Socket\SocketFactory;
-use Hub\Generic\BaseHubSystem;
-use Hub\Handler\Protocol\HandleableProtocol;
-use Hub\Listener\Listenable;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Resolver\State\Peer\PeerStateResolver;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Discovery\Recipient\BaseRecipientDiscovery;
+use Org\Shipsimu\Hub\Discovery\Protocol\ProtocolDiscovery;
+use Org\Shipsimu\Hub\Discovery\Socket\DiscoverableSocket;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Factory\Socket\SocketFactory;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Handler\Protocol\HandleableProtocol;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Resolver\State\Peer\PeerStateResolver;
// Import framework stuff
-use CoreFramework\Generic\NullPointerException;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Socket\InvalidSocketException;
+use Org\Mxchange\CoreFramework\Generic\NullPointerException;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
// Import SPL stuff
use \LogicException;
* matching socket resource for that protocol.
*
* @param $packageData Raw package data array
- * @param $connectionType Type of connection, can be 'incoming' or 'outgoing', *NEVER* 'server'!
+ * @param $connectionType Type of connection, can be either 'incoming' or 'outgoing', but *NEVER* 'server'!
* @return $socketResource A valid socket resource or FALSE if an error occured
* @throws NoListGroupException If the procol group is not found in peer list
* @throws NullPointerException If listenerInstance is NULL
* @throws InvalidUnlException If the provided UNL cannot be validated by the protocol handler
+ * @throws InvalidArgumentException If one of the parameters are not valid
* @throws LogicException If the discovered listener instance has no pool set
*/
public function discoverSocket (array $packageData, $connectionType) {
// Debug message
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISOVERY: connectionType=' . $connectionType . ' - CALLED!');
- // Assert on type and recipient
- assert($connectionType != StorableSocket::CONNECTION_TYPE_SERVER);
- assert(isset($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]));
+ // Make sure all parameters are valid
+ if (!isset($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) {
+ // Abort here
+ throw new InvalidArgumentException(sprintf('Array packageData(%d) does not contain field "%s".', count($packageData), NetworkPackage::PACKAGE_DATA_RECIPIENT));
+ } elseif (($connectionType != StorableSocket::CONNECTION_TYPE_INCOMING) && ($connectionType != StorableSocket::CONNECTION_TYPE_OUTGOING)) {
+ // Abort here
+ throw new InvalidArgumentException(sprintf('connectionType=%s is whether "%s" nor "%s".', $connectionType, StorableSocket::CONNECTION_TYPE_INCOMING, StorableSocket::CONNECTION_TYPE_OUTGOING));
+ }
// Determine protocol instance
$protocolInstance = ProtocolDiscovery::determineProtocolByPackageData($packageData);
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('protocolInstance=' . $protocolInstance . ',packageData=' . print_r($packageData, TRUE));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('protocolInstance=' . $protocolInstance . ',packageData=' . print_r($packageData, TRUE));
// Is it valid?
assert($protocolInstance instanceof HandleableProtocol);
$listenerInstance = $this->discoverListenerInstance($protocolInstance, $packageData);
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISCOVERY: listenerInstance=' . $listenerInstance . ',packageData=' . print_r($packageData, TRUE));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISCOVERY: listenerInstance=' . $listenerInstance . ',packageData=' . print_r($packageData, TRUE));
// If there is no listener who wants to have that package, we simply drop it here
if (is_null($listenerInstance)) {
}
// And return it
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISCOVERY: socketResource=' . $socketInstance->getSocketResource() . ',packageData=' . print_r($packageData, TRUE));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISCOVERY: socketResource=' . $socketInstance->getSocketResource() . ',packageData=' . print_r($packageData, TRUE));
return $socketInstance;
}
<?php
// Own namespace
-namespace Hub\Factory\FilterChain\Package;
+namespace Org\Shipsimu\Hub\Factory\FilterChain\Package;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for network packages
<?php
// Own namespace
-namespace Hub\Factory\Handler\Chunk;
+namespace Org\Shipsimu\Hub\Factory\Handler\Chunk;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for chunk handler
namespace Hub\Factory\;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for !!!
<?php
// Own namespace
-namespace Hub\Factory\Client;
+namespace Org\Shipsimu\Hub\Factory\Client;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Handler\Protocol\HandleableProtocol;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Handler\Protocol\HandleableProtocol;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* An object factory for clients
<?php
// Own namespace
-namespace Hub\Factory\Communicator;
+namespace Org\Shipsimu\Hub\Factory\Communicator;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for communicator
<?php
// Own namespace
-namespace Hub\Factory\Decoder;
+namespace Org\Shipsimu\Hub\Factory\Decoder;
// Import application-specific stuff
-use Hub\Factory\Handler\Chunk\ChunkHandlerFactory;
-use Hub\Handler\Network\RawData\Chunks\ChunkHandler;
+use Org\Shipsimu\Hub\Factory\Handler\Chunk\ChunkHandlerFactory;
+use Org\Shipsimu\Hub\Handler\Network\RawData\Chunks\ChunkHandler;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for Decodeable objects
<?php
// Own namespace
-namespace Hub\Factory\Dht;
+namespace Org\Shipsimu\Hub\Factory\Dht;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for DHT objects
<?php
// Own namespace
-namespace Hub\Factory\Discovery\Package;
+namespace Org\Shipsimu\Hub\Factory\Discovery\Package;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for package discovery
<?php
// Own namespace
-namespace Hub\Factory\Discovery\Socket;
+namespace Org\Shipsimu\Hub\Factory\Discovery\Socket;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for socket discovery
<?php
// Own namespace
-namespace Hub\Factory\Handler\Message;
+namespace Org\Shipsimu\Hub\Factory\Handler\Message;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for message type handlers
<?php
// Own namespace
-namespace Hub\Factory\Handler\Protocol;
+namespace Org\Shipsimu\Hub\Factory\Handler\Protocol;
// Import application-specific stuff
-use Hub\Discovery\Protocol\ProtocolDiscovery;
-use Hub\Helper\HubHelper;
+use Org\Shipsimu\Hub\Discovery\Protocol\ProtocolDiscovery;
+use Org\Shipsimu\Hub\Helper\HubHelper;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for protocol handlers
<?php
// Own namespace
-namespace Hub\Factory\Information\Connection;
+namespace Org\Shipsimu\Hub\Factory\Information\Connection;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for ShareableInfo
* @return $infoInstance An instance of a ShareableInfo class
*/
public static final function createConnectionInfoInstance ($protocolName, $type) {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO-FACTORY: protocolName=%s,type=%s - CALLED!', $protocolName, $type));
+
// Generate key
- $key = 'connection_info_' . $protocolName . '_' . $type;
+ $key = sprintf('connection_info_%s_%s', $protocolName, $type);
// If there is no info?
if (Registry::getRegistry()->instanceExists($key)) {
$infoInstance = Registry::getRegistry()->getInstance($key);
} else {
// Get the info instance
- $infoInstance = self::createObjectByConfiguredName('connection_info_class');
+ $infoInstance = self::createObjectByConfiguredName('connection_info_class', array($type));
// Add it to the registry
Registry::getRegistry()->addInstance($key, $infoInstance);
}
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO-FACTORY: infoInstance=%s - EXIT!', $infoInstance->__toString()));
+
// Return the instance
return $infoInstance;
}
-}
-// [EOF]
-?>
+}
<?php
// Own namespace
-namespace Hub\Factory\Lists\Recipient;
+namespace Org\Shipsimu\Hub\Factory\Lists\Recipient;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for recipient lists
<?php
// Own namespace
-namespace Hub\Factory\Network\Locator;
+namespace Org\Shipsimu\Hub\Factory\Network\Locator;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for LocateableNode
<?php
// Own namespace
-namespace Hub\Factory\Node;
+namespace Org\Shipsimu\Hub\Factory\Node;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A factory class for nodes
// Now convert the node-mode in a class name
$className = sprintf(
- 'Hub\Node\%s\Hub%sNode',
+ 'Org\Shipsimu\Hub\Node\%s\Hub%sNode',
$factoryInstance->convertToClassName($nodeMode),
$factoryInstance->convertToClassName($nodeMode)
);
<?php
// Own namespace
-namespace Hub\Factory\Assembler\Package;
+namespace Org\Shipsimu\Hub\Factory\Assembler\Package;
// Import application-specific stuff
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for package assembler
<?php
// Own namespace
-namespace Hub\Factory\Network;
+namespace Org\Shipsimu\Hub\Factory\Network;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for network packages
<?php
// Own namespace
-namespace Hub\Factory\Fragmenter;
+namespace Org\Shipsimu\Hub\Factory\Fragmenter;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for fragmenter
<?php
// Own namespace
-namespace Hub\Factory\Producer;
+namespace Org\Shipsimu\Hub\Factory\Producer;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for producer
<?php
// Own namespace
-namespace Hub\Factory\Registry\Object;
+namespace Org\Shipsimu\Hub\Factory\Registry\Object;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for network packages
<?php
// Own namespace
-namespace Hub\Factory\Resolver\Protocol;
+namespace Org\Shipsimu\Hub\Factory\Resolver\Protocol;
// Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for ProtocolResolver
*/
public static final function createResolverFromConfiguredProtocol () {
// Get the configured protocol
- $protocolName = FrameworkConfiguration::getSelfInstance()->getConfigEntry('hub_communication_protocol_type');
+ $protocolName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('hub_communication_protocol_type');
// If there is no handler?
if (Registry::getRegistry()->instanceExists($protocolName . '_protocol_resolver')) {
<?php
// Own namespace
-namespace Hub\Factory\Scanner;
+namespace Org\Shipsimu\Hub\Factory\Scanner;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Task\Taskable;
/**
* A factory class for scanners
<?php
// Own namespace
-namespace Hub\Factory\Socket;
+namespace Org\Shipsimu\Hub\Factory\Socket;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Handler\Protocol\HandleableProtocol;
-use Hub\Listener\BaseListener;
-use Hub\Listener\Listenable;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Handler\Protocol\HandleableProtocol;
+use Org\Shipsimu\Hub\Listener\BaseListener;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Pool\Poolable;
// Import framework stuff
-use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Configuration\FrameworkConfiguration;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Socket\InvalidSocketException;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
// Import SPL stuff
use \LogicException;
+use \SplFileInfo;
/**
* A socket factory class
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Using socket ' . $socketInstance->getSocketResource() . '(' . gettype($socketInstance->getSocketResource()) . ') from registry.');
} else {
// Construct configuration entry for object factory and get it
- $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry($protocolInstance->getProtocolName() . '_connection_helper_class');
+ $className = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($protocolInstance->getProtocolName() . '_connection_helper_class');
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Going to use class ' . $className . ' for creating a socket resource ...');
* @throws InvalidSocketException If the socket cannot be completed
*/
public static final function createListenFileSocket (Listenable $listenerInstance) {
+ // Create SplFileInfo
+ $fileInfo = new SplFileInfo($listenerInstance->getConfigInstance()->getConfigEntry('ipc_socket_file_name'));
+
// Create file name
- $socketFile = self::createTempPathForFile($listenerInstance->getConfigInstance()->getConfigEntry('ipc_socket_file_name'));
+ $socketFile = self::createTempPathForFile($fileInfo);
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: socketFile=' . $socketFile . ' ...');
$packageData = array(
StorableSocket::SOCKET_ARRAY_INDEX_FILE => $socketFile,
'__fake_port' => '0',
+ StorableSocket::SOCKET_ARRAY_INDEX_TYPE => StorableSocket::CONNECTION_TYPE_SERVER,
);
// Init main socket
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Created socket[' . gettype($socketResource) . ']=' . $socketResource . '.');
+ // Add socket type 'outgoing' to package data
+ $packageData[StorableSocket::SOCKET_ARRAY_INDEX_TYPE] = StorableSocket::CONNECTION_TYPE_SERVER;
+
// Construct container class, this won't be reached if an exception is thrown
$socketInstance = ObjectFactory::createObjectByConfiguredName('socket_container_class', array($socketResource, StorableSocket::SOCKET_PROTOCOL_TCP, $packageData));
$packageData = array(
StorableSocket::SOCKET_ARRAY_INDEX_ADDRESS => $listenerInstance->getListenAddress(),
StorableSocket::SOCKET_ARRAY_INDEX_PORT => $listenerInstance->getListenPort(),
+ StorableSocket::SOCKET_ARRAY_INDEX_TYPE => StorableSocket::CONNECTION_TYPE_SERVER,
);
// Create socket instance
$packageData = array(
StorableSocket::SOCKET_ARRAY_INDEX_ADDRESS => $listenerInstance->getListenAddress(),
StorableSocket::SOCKET_ARRAY_INDEX_PORT => $listenerInstance->getListenPort(),
+ StorableSocket::SOCKET_ARRAY_INDEX_TYPE => StorableSocket::CONNECTION_TYPE_SERVER,
);
// Create socket instance
$packageData = array(
StorableSocket::SOCKET_ARRAY_INDEX_ADDRESS => 'invalid',
StorableSocket::SOCKET_ARRAY_INDEX_PORT => '0',
+ StorableSocket::SOCKET_ARRAY_INDEX_TYPE => StorableSocket::CONNECTION_TYPE_INCOMING,
);
// Create socket instance
<?php
// Own namespace
-namespace Hub\Source\Unit;
+namespace Org\Shipsimu\Hub\Source\Unit;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for unit sources
<?php
// Own namespace
-namespace Hub\Source\Url;
+namespace Org\Shipsimu\Hub\Source\Url;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Task\Taskable;
/**
* A factory class for URL sources
<?php
// Own namespace
-namespace Hub\Factory\State\Communicator;
+namespace Org\Shipsimu\Hub\Factory\State\Communicator;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
/**
* A factory class for communicator states
<?php
// Own namespace
-namespace Hub\Factory\State\Crawler;
+namespace Org\Shipsimu\Hub\Factory\State\Crawler;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for crawler states
<?php
// Own namespace
-namespace Hub\Factory\State\Cruncher;
+namespace Org\Shipsimu\Hub\Factory\State\Cruncher;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for cruncher states
<?php
// Own namespace
-namespace Hub\Factory\State\Dht;
+namespace Org\Shipsimu\Hub\Factory\State\Dht;
// Import application-specific stuff
-use Hub\Dht\Distributable;
-use Hub\Factory\State\Dht\DhtStateFactory;
+use Org\Shipsimu\Hub\Dht\Distributable;
+use Org\Shipsimu\Hub\Factory\State\Dht\DhtStateFactory;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
/**
* A factory class for DHT states
<?php
// Own namespace
-namespace Hub\Factory\State\Miner;
+namespace Org\Shipsimu\Hub\Factory\State\Miner;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for miner states
<?php
// Own namespace
-namespace Hub\Factory\State\Node;
+namespace Org\Shipsimu\Hub\Factory\State\Node;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
/**
* A factory class for node states
<?php
// Own namespace
-namespace Hub\Factory\State\Peer;
+namespace Org\Shipsimu\Hub\Factory\State\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Socket\InvalidSocketException;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
/**
* A factory class for peer states
<?php
// Own namespace
-namespace Hub\Factory\Tag\Package;
+namespace Org\Shipsimu\Hub\Factory\Tag\Package;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A factory class for network packages
<?php
// Own namespace
-namespace Hub\Feature\CoinReward;
+namespace Org\Shipsimu\Hub\Feature\CoinReward;
// Import framework stuff
-use CoreFramework\Feature\BaseFeature;
-use CoreFramework\Feature\Feature;
-use CoreFramework\Feature\FrameworkFeature;
+use Org\Mxchange\CoreFramework\Feature\BaseFeature;
+use Org\Mxchange\CoreFramework\Feature\Feature;
+use Org\Mxchange\CoreFramework\Feature\FrameworkFeature;
// Import other libraries
use DomBlack\Scrypt\Scrypt;
use Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for hub activation
<?php
// Own namespace
-namespace Hub\Filter\Activation\Node\Announcement;
+namespace Org\Shipsimu\Hub\Filter\Activation\Node\Announcement;
// Import application-specific stuff
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* An Announcement filter for hub activation
<?php
// Own namespace
-namespace Hub\AptProxy\Filter\Initialization;
+namespace Org\Shipsimu\Hub\AptProxy\Filter\Initialization;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A Initialization filter for apt-proxy
<?php
// Own namespace
-namespace Hub\AptProxy\Filter\Requirements;
+namespace Org\Shipsimu\Hub\AptProxy\Filter\Requirements;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A PhpRequirements filter for apt-proxy
<?php
// Own namespace
-namespace Hub\AptProxy\Filter\WelcomeTeaser;
+namespace Org\Shipsimu\Hub\AptProxy\Filter\WelcomeTeaser;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A welcome-teaser filter for the apt-proxy
namespace Hub\Filter\Bootstrap\AptProxy\;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for bootstrapping apt-proxy
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\AptProxy\Extra;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\AptProxy\Extra;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ExtraBootstrapping filter for bootstrapping apt-proxy
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\AptProxy\Activation;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\AptProxy\Activation;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A GenericActivation filter for bootstrapping proxy
namespace Hub\Filter\Bootstrap\Chat\;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for bootstrapping chats
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Chat\Extra;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Chat\Extra;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ExtraBootstrapping filter for bootstrapping chat
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Chat\Activation;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Chat\Activation;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A GenericActivation filter for bootstrapping chat
namespace Hub\Filter\Bootstrap\Crawler\;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for bootstrapping crawlers
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Crawler\Extra;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Crawler\Extra;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ExtraBootstrapping filter for bootstrapping crawler
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Crawler\Activation;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Crawler\Activation;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A GenericActivation filter for bootstrapping crawler
namespace Hub\Filter\Bootstrap\Cruncher\;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for bootstrapping crunchers
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Cruncher\Queue;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Cruncher\Queue;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A BufferQueue filter for bootstrapping crunchers
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Cruncher\Extra;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Cruncher\Extra;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ExtraBootstrapping filter for bootstrapping crunchers
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Cruncher\Activation;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Cruncher\Activation;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A GenericActivation filter for bootstrapping crunchers
namespace Hub\Filter\Bootstrap\Miner\;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for bootstrapping miners
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Miner\Queue;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Miner\Queue;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A BufferQueue filter for bootstrapping miners
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Miner\Extra;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Miner\Extra;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ExtraBootstrapping filter for bootstrapping miners
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Miner\Activation;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Miner\Activation;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A GenericActivation filter for bootstrapping miners
use Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for bootstrapping
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Node\Extra;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Node\Extra;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ExtraBootstrapping filter for bootstrapping
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Node\NodeId;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Node\NodeId;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A GenerateNodeId filter for bootstrapping
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Node\PrivateKey;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Node\PrivateKey;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A GeneratePrivateKey filter for bootstrapping
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Node\SessionId;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Node\SessionId;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A GenerateSessionId filter for bootstrapping
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Node\Pool;
+namespace Org\Shipsimu\Hub\Filter\Bootstrap\Node\Pool;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ListenerPool filter for bootstrapping
namespace Hub\Filter\Chat\;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for crunchers
<?php
// Own namespace
-namespace Hub\Chat\Filter\Initialization;
+namespace Org\Shipsimu\Hub\Chat\Filter\Initialization;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A Initialization filter for chat
<?php
// Own namespace
-namespace Hub\Chat\Filter\Requirements;
+namespace Org\Shipsimu\Hub\Chat\Filter\Requirements;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A PhpRequirements filter for chat
<?php
// Own namespace
-namespace Hub\Chat\Filter\WelcomeTeaser;
+namespace Org\Shipsimu\Hub\Chat\Filter\WelcomeTeaser;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A welcome-teaser filter for the chat
use Hub\Filter\BaseHubFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for !!!
<?php
// Own namespace
-namespace Hub\AptProxy\Filter;
+namespace Org\Shipsimu\Hub\AptProxy\Filter;
// Import application-specific stuff
-use Hub\Filter\BaseHubFilter;
+use Org\Shipsimu\Hub\Filter\BaseHubFilter;
/**
* A generic filter for apt-proxy sub-project
<?php
// Own namespace
-namespace Hub\Chat\Filter;
+namespace Org\Shipsimu\Hub\Chat\Filter;
// Import application-specific stuff
-use Hub\Filter\BaseHubFilter;
+use Org\Shipsimu\Hub\Filter\BaseHubFilter;
/**
* A generic filter for chat sub-project
<?php
// Own namespace
-namespace Hub\Crawler\Filter;
+namespace Org\Shipsimu\Hub\Crawler\Filter;
// Import application-specific stuff
-use Hub\Filter\BaseHubFilter;
+use Org\Shipsimu\Hub\Filter\BaseHubFilter;
/**
* A generic filter for crawler sub-project
<?php
// Own namespace
-namespace Hub\Cruncher\Filter;
+namespace Org\Shipsimu\Hub\Cruncher\Filter;
// Import application-specific stuff
-use Hub\Filter\BaseHubFilter;
+use Org\Shipsimu\Hub\Filter\BaseHubFilter;
/**
* A generic filter for cruncher sub-project
<?php
// Own namespace
-namespace Hub\Filter;
+namespace Org\Shipsimu\Hub\Filter;
// Import application-specific stuff
-use Hub\Network\Package\NetworkPackage;
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
-use CoreFramework\Filter\BaseFilter;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Filter\BaseFilter;
/**
* A generic filter for hub project
<?php
// Own namespace
-namespace Hub\Miner\Filter;
+namespace Org\Shipsimu\Hub\Miner\Filter;
// Import application-specific stuff
-use Hub\Filter\BaseHubFilter;
+use Org\Shipsimu\Hub\Filter\BaseHubFilter;
/**
* A generic filter for miner sub-project
<?php
// Own namespace
-namespace Hub\Filter\Node;
+namespace Org\Shipsimu\Hub\Filter\Node;
// Import application-specific stuff
-use Hub\Filter\BaseHubFilter;
+use Org\Shipsimu\Hub\Filter\BaseHubFilter;
/**
* A generic filter for nodes
<?php
// Own namespace
-namespace Hub\Crawler\Filter\Initialization;
+namespace Org\Shipsimu\Hub\Crawler\Filter\Initialization;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A Initialization filter for crawler
<?php
// Own namespace
-namespace Hub\Crawler\Filter\Requirements;
+namespace Org\Shipsimu\Hub\Crawler\Filter\Requirements;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A PhpRequirements filter for crawler
<?php
// Own namespace
-namespace Hub\Crawler\Filter\WelcomeTeaser;
+namespace Org\Shipsimu\Hub\Crawler\Filter\WelcomeTeaser;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A welcome-teaser filter for the crawler
namespace Hub\Filter\Cruncher\;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for crunchers
<?php
// Own namespace
-namespace Hub\Cruncher\Filter\Initialization;
+namespace Org\Shipsimu\Hub\Cruncher\Filter\Initialization;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A Initialization filter for crunchers
<?php
// Own namespace
-namespace Hub\Cruncher\Filter\Requirements;
+namespace Org\Shipsimu\Hub\Cruncher\Filter\Requirements;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A PhpRequirements filter for crunchers
<?php
// Own namespace
-namespace Hub\Cruncher\Filter\WelcomeTeaser;
+namespace Org\Shipsimu\Hub\Cruncher\Filter\WelcomeTeaser;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A welcome-teaser filter for the cruncher
namespace Hub\Filter\Miner\;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for miners
<?php
// Own namespace
-namespace Hub\Miner\Filter\Initialization;
+namespace Org\Shipsimu\Hub\Miner\Filter\Initialization;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A Initialization filter for miners
<?php
// Own namespace
-namespace Hub\Miner\Filter\Requirements;
+namespace Org\Shipsimu\Hub\Miner\Filter\Requirements;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A PhpRequirements filter for miners
<?php
// Own namespace
-namespace Hub\Miner\Filter\WelcomeTeaser;
+namespace Org\Shipsimu\Hub\Miner\Filter\WelcomeTeaser;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A welcome-teaser filter for the miner
use Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for nodes
<?php
// Own namespace
-namespace Hub\Filter\Node\Initialization;
+namespace Org\Shipsimu\Hub\Filter\Node\Initialization;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A Initialization filter for nodes
<?php
// Own namespace
-namespace Hub\Filter\Node\Requirements;
+namespace Org\Shipsimu\Hub\Filter\Node\Requirements;
// Import application-specific stuff
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A PhpRequirements filter for nodes
<?php
// Own namespace
-namespace Hub\Filter\Node\WelcomeTeaser;
+namespace Org\Shipsimu\Hub\Filter\Node\WelcomeTeaser;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A welcome-teaser filter for the console
<?php
// Own namespace
-namespace Hub\Filter\Shutdown\AptProxy;
+namespace Org\Shipsimu\Hub\Filter\Shutdown\AptProxy;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A shutdown filter for shutting down the apt-proxy. This filter should be the
<?php
// Own namespace
-namespace Hub\Filter\Shutdown\Chat;
+namespace Org\Shipsimu\Hub\Filter\Shutdown\Chat;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A shutdown filter for shutting down the chat console. This filter should be
<?php
// Own namespace
-namespace Hub\Filter\Shutdown\Crawler;
+namespace Org\Shipsimu\Hub\Filter\Shutdown\Crawler;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A shutdown filter for shutting down the crawler. This filter should be the
<?php
// Own namespace
-namespace Hub\Filter\Shutdown\Cruncher;
+namespace Org\Shipsimu\Hub\Filter\Shutdown\Cruncher;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A shutdown filter for shutting down the cruncher. This filter should be the
<?php
// Own namespace
-namespace Hub\Filter\Shutdown\Miner;
+namespace Org\Shipsimu\Hub\Filter\Shutdown\Miner;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A shutdown filter for shutting down the miner. This filter should be the
use Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ??? filter for shutting down the node.
<?php
// Own namespace
-namespace Hub\Filter\Shutdown\Node\NodeList;
+namespace Org\Shipsimu\Hub\Filter\Shutdown\Node\NodeList;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A FlushNodeList filter for shutting down the node.
<?php
// Own namespace
-namespace Hub\Filter\Shutdown\Node;
+namespace Org\Shipsimu\Hub\Filter\Shutdown\Node;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A ShutdownNode filter for shutting down the node. This filter should be the
<?php
// Own namespace
-namespace Hub\Filter\Shutdown\Node\Handler\Task;
+namespace Org\Shipsimu\Hub\Filter\Shutdown\Node\Handler\Task;
// Import application-specific stuff
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A TaskHandler filter for shutting down the node.
<?php
// Own namespace
-namespace Hub\Filter\Tag\Network\Answer\Announcement;
+namespace Org\Shipsimu\Hub\Filter\Tag\Network\Answer\Announcement;
// Import application-specific stuff
-use Hub\Filter\Node\BaseNodeFilter;
-use Hub\Network\Receive\Receivable;
-use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A AnnouncementAnswerTag filter for Package
<?php
// Own namespace
-namespace Hub\Filter\Tag\Network\Answer\Dht\Bootstrap;
+namespace Org\Shipsimu\Hub\Filter\Tag\Network\Answer\Dht\Bootstrap;
// Import application-specific stuff
-use Hub\Filter\Node\BaseNodeFilter;
-use Hub\Network\Receive\Receivable;
-use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A DhtBootstrapAnswerTag filter for Package
<?php
// Own namespace
-namespace Hub\Filter\Tag\Network\Answer\Request\NodeList;
+namespace Org\Shipsimu\Hub\Filter\Tag\Network\Answer\Request\NodeList;
// Import application-specific stuff
-use Hub\Filter\Node\BaseNodeFilter;
-use Hub\Network\Receive\Receivable;
-use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A RequestNodeListAnswerTag filter for Package
<?php
// Own namespace
-namespace Hub\Filter\Tag\Network\Announcement;
+namespace Org\Shipsimu\Hub\Filter\Tag\Network\Announcement;
// Import application-specific stuff
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A AnnouncementTag filter for packages
<?php
// Own namespace
-namespace Hub\Filter\Tag\Network\Dht\Bootstrap;
+namespace Org\Shipsimu\Hub\Filter\Tag\Network\Dht\Bootstrap;
// Import application-specific stuff
-use Hub\Filter\Node\BaseNodeFilter;
-use Hub\Network\Receive\Receivable;
-use Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A DhtBootstrapTag filter for packages
<?php
// Own namespace
-namespace Hub\Filter\Tag\Network\Request\NodeList;
+namespace Org\Shipsimu\Hub\Filter\Tag\Network\Request\NodeList;
// Import application-specific stuff
-use Hub\Filter\Node\BaseNodeFilter;
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A RequestNodeListTag filter for packages
<?php
// Own namespace
-namespace Hub\Filter\Tag\Network\SelfConnect;
+namespace Org\Shipsimu\Hub\Filter\Tag\Network\SelfConnect;
// Import application-specific stuff
-use Hub\Filter\Node\BaseNodeFilter;
-use Hub\Network\Receive\Receivable;
-use Hub\Tag\Tagable;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Tag\Tagable;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A SelfConnectTag filter for packages
<?php
// Own namespace
-namespace Hub\Filter\Initializer\AptProxy\Handler\Task;
+namespace Org\Shipsimu\Hub\Filter\Initializer\AptProxy\Handler\Task;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A TaskHandlerInitializer filter for apt-proxy
<?php
// Own namespace
-namespace Hub\Filter\Initializer\Chat\Handler\Task;
+namespace Org\Shipsimu\Hub\Filter\Initializer\Chat\Handler\Task;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A TaskHandlerInitializer filter for chat
<?php
// Own namespace
-namespace Hub\Filter\Initializer\Crawler\Handler\Task;
+namespace Org\Shipsimu\Hub\Filter\Initializer\Crawler\Handler\Task;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A TaskHandlerInitializer filter for crawler
<?php
// Own namespace
-namespace Hub\Filter\Initializer\Cruncher\Handler\Task;
+namespace Org\Shipsimu\Hub\Filter\Initializer\Cruncher\Handler\Task;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A TaskHandlerInitializer filter for crunchers
<?php
// Own namespace
-namespace Hub\Filter\Initializer\Miner\Handler\Task;
+namespace Org\Shipsimu\Hub\Filter\Initializer\Miner\Handler\Task;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A TaskHandlerInitializer filter for miners
<?php
// Own namespace
-namespace Hub\Filter\Initializer\Node\Handler\Task;
+namespace Org\Shipsimu\Hub\Filter\Initializer\Node\Handler\Task;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filter\Filterable;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A TaskHandlerInitializer filter for hubs
<?php
// Own namespace
-namespace Hub\Handler\Network\RawData\Chunks;
+namespace Org\Shipsimu\Hub\Handler\Network\RawData\Chunks;
// Import application-specific stuff
-use Hub\Factory\Fragmenter\FragmenterFactory;
-use Hub\Handler\BaseHubHandler;
-use Hub\Network\Package\Fragment\PackageFragmenter;
+use Org\Shipsimu\Hub\Factory\Fragmenter\FragmenterFactory;
+use Org\Shipsimu\Hub\Handler\BaseHubHandler;
+use Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A Chunk handler
<?php
// Own namespace
-namespace Hub\Handler;
+namespace Org\Shipsimu\Hub\Handler;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
-use Hub\Generic\HubInterface;
-use Hub\Information\ShareableInfo;
-use Hub\Listener\Listenable;
-use Hub\Locator\Node\LocateableNode;
-use Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Information\ShareableInfo;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Pool\Poolable;
// Import framework stuff
-use CoreFramework\Handler\BaseHandler;
-use CoreFramework\Handler\Handleable;
+use Org\Mxchange\CoreFramework\Handler\BaseHandler;
+use Org\Mxchange\CoreFramework\Handler\Handleable;
/**
* A general hub handler
* @return $isset Whether start/end marker are set
*/
public final function ifStartEndMarkersSet ($data) {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HUB-HANDLER: data()=%d - CALLED!', strlen($data)));
+
// Determine it
- $isset = ((substr($data, 0, strlen(BaseRawDataHandler::STREAM_START_MARKER)) == BaseRawDataHandler::STREAM_START_MARKER) && (substr($data, -1 * strlen(BaseRawDataHandler::STREAM_END_MARKER), strlen(BaseRawDataHandler::STREAM_END_MARKER)) == BaseRawDataHandler::STREAM_END_MARKER));
+ $isset = ((substr($data, 0, strlen(HandleableRawData::STREAM_START_MARKER)) == HandleableRawData::STREAM_START_MARKER) && (substr($data, -1 * strlen(HandleableRawData::STREAM_END_MARKER), strlen(HandleableRawData::STREAM_END_MARKER)) == HandleableRawData::STREAM_END_MARKER));
// ... and return it
return $isset;
<?php
// Own namespace
-namespace Hub\Handler\Node\Announcement\Answer;
+namespace Org\Shipsimu\Hub\Handler\Node\Announcement\Answer;
// Import application-specific stuff
-use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
-use Hub\Factory\Dht\DhtObjectFactory;
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Network\Receive\Receivable;
-use Hub\Node\BaseHubNode;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Node\BaseHubNode;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A AnnouncementAnswerOkay handler
<?php
// Own namespace
-namespace Hub\Handler\Answer\Okay\NodeList;
+namespace Org\Shipsimu\Hub\Handler\Answer\Okay\NodeList;
// Import application-specific stuff
-use Hub\Factory\Dht\DhtObjectFactory;
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A RequestNodeListAnswerOkay handler
<?php
// Own namespace
-namespace Hub\Handler\Data;
+namespace Org\Shipsimu\Hub\Handler\Data;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Generic\HubInterface;
-use Hub\Handler\BaseHubHandler;
-use Hub\Network\Deliver\Deliverable;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Handler\BaseHubHandler;
+use Org\Shipsimu\Hub\Network\Deliver\Deliverable;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* A general data Handler
<?php
// Own namespace
-namespace Hub\Handler\Node\Message\Announcement;
+namespace Org\Shipsimu\Hub\Handler\Node\Message\Announcement;
// Import application-specific stuff
-use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Generic\BaseHubSystem;
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Criteria\Storing\StoreableCriteria;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A NodeMessageAnnouncement handler
<?php
// Own namespace
-namespace Hub\Handler\Node\Answer\Announcement;
+namespace Org\Shipsimu\Hub\Handler\Node\Answer\Announcement;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Network\Receive\Receivable;
-use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
-use CoreFramework\Criteria\Storing\StoreableCriteria;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A NodeMessageAnnouncementAnswer handler
<?php
// Own namespace
-namespace Hub\Handler\Answer\Node\DhtBootstrap;
+namespace Org\Shipsimu\Hub\Handler\Answer\Node\DhtBootstrap;
// 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;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
-use CoreFramework\Criteria\Storing\StoreableCriteria;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A NodeMessageDhtBootstrapAnswer handler
<?php
// Own namespace
-namespace Hub\Handler\Node\Answer\Request\NodeList;
+namespace Org\Shipsimu\Hub\Handler\Node\Answer\Request\NodeList;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Network\Receive\Receivable;
-use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
-use CoreFramework\Criteria\Storing\StoreableCriteria;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A NodeMessageRequestNodeListAnswer handler
namespace Hub\Handler\Message\;
// Import framework stuff
-use CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
/**
* A NodeMessage??? handler
<?php
// Own namespace
-namespace Hub\Handler\Message;
+namespace Org\Shipsimu\Hub\Handler\Message;
// Import hub-specific stuff
-use Hub\Factory\Dht\DhtObjectFactory;
-use Hub\Generic\BaseHubSystem;
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* A general message handler, this class must be abstract to make the template
<?php
// Own namespace
-namespace Hub\Handler\Node\Answer\Dht\Bootstrap;
+namespace Org\Shipsimu\Hub\Handler\Node\Answer\Dht\Bootstrap;
// Import application-specific stuff
-use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
-use Hub\Factory\Dht\DhtObjectFactory;
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Network\Receive\Receivable;
-use Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
// Import framework stuff
-use CoreFramework\Criteria\Storing\StoreableCriteria;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A NodeMessageDhtBootstrap handler
<?php
// Own namespace
-namespace Hub\Handler\Node\Message\Request\NodeList;
+namespace Org\Shipsimu\Hub\Handler\Node\Message\Request\NodeList;
// Import application-specific stuff
-use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
-use Hub\Factory\Dht\DhtObjectFactory;
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Network\Receive\Receivable;
-use Hub\Node\BaseHubNode;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Node\BaseHubNode;
// Import framework stuff
-use CoreFramework\Criteria\Storing\StoreableCriteria;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A NodeMessageRequestNodeList handler
<?php
// Own namespace
-namespace Hub\Handler\Node\Message\SelfConnect;
+namespace Org\Shipsimu\Hub\Handler\Node\Message\SelfConnect;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Criteria\Storing\StoreableCriteria;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A NodeMessageSelfConnect handler
use Hub\Handler\Protocol\HandleableProtocol;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A ??? protocol handler
<?php
// Own namespace
-namespace Hub\Handler\Protocol;
+namespace Org\Shipsimu\Hub\Handler\Protocol;
// Import application-specific sutff
-use Hub\Handler\BaseHubHandler;
-use Hub\Handler\Protocol\HandleableProtocol;
-use Hub\Tools\HubTools;
+use Org\Shipsimu\Hub\Handler\BaseHubHandler;
+use Org\Shipsimu\Hub\Handler\Protocol\HandleableProtocol;
+use Org\Shipsimu\Hub\Tools\HubTools;
/**
* A general handler for protocols such as TCP, UDP and others.
<?php
// Own namespace
-namespace Hub\Handler\Protocol\Network\IpV4;
+namespace Org\Shipsimu\Hub\Handler\Protocol\Network\IpV4;
// Import application-specific stuff
-use Hub\Factory\Network\Locator\UniversalNodeLocatorFactory;
-use Hub\Handler\Protocol\BaseProtocolHandler;
-use Hub\Locator\Node\LocateableNode;
-use Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Factory\Network\Locator\UniversalNodeLocatorFactory;
+use Org\Shipsimu\Hub\Handler\Protocol\BaseProtocolHandler;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
/**
* A general handler for IPv4 protocols such as TCP, UDP and others.
<?php
// Own namespace
-namespace Hub\Handler\Protocol\Network\IpV4\Tcp;
+namespace Org\Shipsimu\Hub\Handler\Protocol\Network\IpV4\Tcp;
// Import application-specific stuff
-use Hub\Handler\Protocol\Network\IpV4\BaseIpV4ProtocolHandler;
-use Hub\Handler\Protocol\HandleableProtocol;
+use Org\Shipsimu\Hub\Handler\Protocol\Network\IpV4\BaseIpV4ProtocolHandler;
+use Org\Shipsimu\Hub\Handler\Protocol\HandleableProtocol;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A TCP protocol handler (IPv4)
<?php
// Own namespace
-namespace Hub\Handler\Network\RawData;
+namespace Org\Shipsimu\Hub\Handler\Network\RawData;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Generic\HubInterface;
-use Hub\Handler\BaseHubHandler;
-use Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Handler\BaseHubHandler;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
/**
* A general Handler for raw data from sockets
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class BaseRawDataHandler extends BaseHubHandler implements HubInterface {
- // - Package errors
- const PACKAGE_ERROR_INVALID_DATA = 'invalid_data'; // Invalid data in package found
- const PACKAGE_ERROR_INCOMPLETE_DATA = 'incomplete_data'; // Incomplete data sent (e.g. field is missing)
- const PACKAGE_ERROR_INVALID_CONTENT = 'invalid_content'; // Content is invalid (e.g. not well-formed)
- const PACKAGE_ERROR_RECIPIENT_MISMATCH = 'recipient_error'; // Recipient is not us
- const PACKAGE_LEVEL_CHECK_OKAY = 'checked_package'; // Package is fine
-
- // Package data
- const PACKAGE_RAW_DATA = 'raw_data';
- const PACKAGE_ERROR_CODE = 'error_code';
-
- // Start/end marker
- const STREAM_START_MARKER = '[[S]]';
- const STREAM_END_MARKER = '[[E]]';
-
- /**
- * Stacker for raw data
- */
- const STACKER_NAME_RAW_DATA = 'raw_data';
-
+class BaseRawDataHandler extends BaseHubHandler implements HandleableRawData {
/**
* Error code from socket
*/
/**
* Adds given raw data to the raw data stacker
*
- * @param $rawData raw data from the socket resource
+ * @param $rawData Raw data from the socket resource
* @return void
*/
protected function addRawDataToStacker ($rawData) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-DATA-HANDLER: rawData()=%d - CALLED!', strlen($rawData)));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-DATA-HANDLER: rawData(%d)=%s - CALLED!', strlen($rawData), $rawData));
/*
* Add the deocoded data and error code to the stacker so other classes
* (e.g. NetworkPackage) can "pop" it from the stacker.
*/
$this->getStackInstance()->pushNamed(self::STACKER_NAME_RAW_DATA, array(
- self::PACKAGE_RAW_DATA => $rawData,
- self::PACKAGE_ERROR_CODE => $this->getErrorCode()
+ HandleableRawData::PACKAGE_RAW_DATA => $rawData,
+ HandleableRawData::PACKAGE_ERROR_CODE => $this->getErrorCode()
));
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-DATA-HANDLER: EXIT!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-DATA-HANDLER: EXIT!');
}
/**
<?php
// Own namespace
-namespace Hub\Handler\Network\Socket\RawData;
+namespace Org\Shipsimu\Hub\Handler\Network\Socket\RawData;
// Import application-specific stuff
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
-use Hub\Network\Networkable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Handler\Network\RawData\BaseRawDataHandler;
+use Org\Shipsimu\Hub\Network\Networkable;
/**
* A file-based socket raw data handler
* Processes raw data from given socket instance. This is mostly useful for
* raw package handling and is implemented in the ???Listener class.
*
- * @param $resource A valid socket resource array
+ * @param $socketInstance An instance of a StorableSocket class
* @return void
*/
- public function processRawDataFromSocketArray (array $socketArray) {
- $this->partialStub('socketArray=' . print_r($socketArray, TRUE));
+ public function processRawDataFromSocketInstance (StorableSocket $socketInstance) {
+ $this->partialStub('socketInstance=' . print_r($socketInstance, TRUE));
}
}
use Hub\Listener\Listenable;
// Import framework stuff
-use CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
<?php
/**
<?php
// Own namespace
-namespace Hub\Handler\Network\RawData\Tcp;
+namespace Org\Shipsimu\Hub\Handler\Network\RawData\Tcp;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
-use Hub\Network\Networkable;
-use Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Handler\Network\RawData\BaseRawDataHandler;
+use Org\Shipsimu\Hub\Network\Networkable;
+use Org\Shipsimu\Hub\Pool\Poolable;
// Import framework stuff
-use CoreFramework\Socket\InvalidSocketException;
+use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
// Import SPL stuff
use \InvalidArgumentException;
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class TcpRawDataHandler extends BaseRawDataHandler implements Networkable {
+ /**
+ * Last socket error (default: Success)
+ */
+ private $lastSocketError = 0;
+
/**
* Protected constructor
*
*
* @param $resource A valid socket resource array
* @return void
- * @throws InvalidArgumentException If the socket instance is not set
*/
- public function processRawDataFromSocketArray (array $socketArray) {
+ public function processRawDataFromSocketInstance (StorableSocket $socketInstance) {
// Trace message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TCP-RAWDATA-HANDLER: socketArray()=%d - CALLED!', count($socketArray)));
-
- // Check the resource
- if ((!isset($socketArray[Poolable::SOCKET_ARRAY_INSTANCE])) || (!($socketArray[Poolable::SOCKET_ARRAY_INSTANCE] instanceof StorableSocket))) {
- // Throw an exception
- throw new InvalidArgumentException(sprintf('socketArray[%s] is not set or invalid.', Poolable::SOCKET_ARRAY_INSTANCE));
- } // END - if
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TCP-RAW-DATA-HANDLER: socketInstance=%s - CALLED!', $socketInstance->__toString()));
// Reset error code to unhandled
- $this->setErrorCode(self::SOCKET_ERROR_UNHANDLED);
+ $this->setErrorCode(StorableSocket::SOCKET_ERROR_UNHANDLED);
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAWDATA-HANDLER: Handling TCP package from resource=' . $socketArray[Poolable::SOCKET_ARRAY_INSTANCE] . ',type=' . $socketArray[Poolable::SOCKET_ARRAY_CONN_TYPE] . ',last error=' . socket_strerror($this->lastSocketError));
- $this->partialStub('Please rewrite this part.');
- return;
-
- /*
- * Read the raw data from socket. If you change PHP_BINARY_READ to
- * PHP_NORMAL_READ, this line will endless block. This script does only
- * provide simultanous or faked threads, not real.
- */
- $rawData = socket_read($socketArray[Poolable::SOCKET_ARRAY_INSTANCE], $this->getConfigInstance()->getConfigEntry('tcp_buffer_length'), PHP_BINARY_READ);
-
- // Get socket error code back
- $this->lastSocketError = $socketArray[Poolable::SOCKET_ARRAY_INSTANCE]->getSocketLastErrorCode();
-
- // Debug output of read data length
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAWDATA-HANDLER: rawData[' . gettype($rawData) . ']=' . strlen($rawData) . ',MD5=' . md5($rawData) . ',resource=' . $socketArray[Poolable::SOCKET_ARRAY_INSTANCE] . ',this->lastSocketError=' . socket_strerror($this->lastSocketError));
- /* NOISY-DEBUG: */ if ($rawData !== FALSE) self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAWDATA-HANDLER: rawData=' . $rawData);
-
- // Is it valid?
- if ($this->lastSocketError == 11) {
- // Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAWDATA-HANDLER: Ignoring error 11 (Resource temporary unavailable) from socket resource=' . $socketArray[Poolable::SOCKET_ARRAY_INSTANCE]);
-
- /*
- * Error code 11 (Resource temporary unavailable) can be safely
- * ignored on non-blocking sockets. The socket is currently not
- * sending any data.
- */
- $socketArray[Poolable::SOCKET_ARRAY_INSTANCE]->clearLastSocketError();
-
- // Skip any further processing
- return;
- } elseif (($rawData === FALSE) || ($this->lastSocketError > 0)) {
- // Network error or connection lost
- $this->setErrorCode($this->lastSocketError);
- } elseif (empty($rawData)) {
- // Trace message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAWDATA-HANDLER: No raw data pending. - EXIT!');
-
- // The peer did send nothing to us which is now being ignored
- return;
- } else {
- /*
- * All is fine at this point. So it is okay to add the raw data to
- * the stacker. Here it doesn't matter if the raw data is a
- * well-formed BASE64-encoded message with start and markers. This
- * will be checked later on.
- */
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAWDATA-HANDLER: Adding ' . strlen($rawData) . ' bytes to stacker ...');
- $this->addRawDataToStacker($rawData);
- }
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAW-DATA-HANDLER: Handling TCP package from resource=' . $socketInstance->getSocketResource() . ',last error=' . $socketInstance->getLastSocketErrorMessage());
+
+ // Read the raw data from socket in a loop
+ while ($rawData = $socketInstance->readDataFromSocket()) {
+ // Get socket error code back
+ $this->lastSocketError = $socketInstance->getLastSocketErrorCode();
+
+ // Debug output of read data length
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAW-DATA-HANDLER: rawData[' . gettype($rawData) . ']=' . strlen($rawData) . ',MD5=' . md5($rawData) . ',resource=' . $socketInstance . ',this->lastSocketError=' . socket_strerror($this->lastSocketError));
+
+ // Is not FALSE?
+ if ($rawData !== FALSE) {
+ // Output raw data
+ /* NOISY-DEBUG: */self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAW-DATA-HANDLER: rawData=' . $rawData);
+ } // END - if
+
+ // Is it valid?
+ if ($this->lastSocketError == 11) {
+ // Debug message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAW-DATA-HANDLER: Ignoring error 11 (Resource temporary unavailable) from socket resource=' . $socketInstance);
+
+ /*
+ * Error code 11 (Resource temporary unavailable) can be safely
+ * ignored on non-blocking sockets. The socket is currently not
+ * sending any data.
+ */
+ $socketInstance->clearLastSocketError();
+
+ // Skip any further processing
+ continue;
+ } elseif (($rawData === FALSE) || ($this->lastSocketError > 0)) {
+ // Network error or connection lost
+ $this->setErrorCode($this->lastSocketError);
+ break;
+ } elseif (empty($rawData)) {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAW-DATA-HANDLER: No raw data pending. - EXIT!');
+
+ // The peer did send nothing to us which is now being ignored
+ continue;
+ } else {
+ /*
+ * All is fine at this point. So it is okay to add the raw data to
+ * the stacker. Here it doesn't matter if the raw data is a
+ * well-formed BASE64-encoded message with start and markers. This
+ * will be checked later on.
+ */
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAW-DATA-HANDLER: Adding ' . strlen($rawData) . ' bytes to stacker ...');
+ $this->addRawDataToStacker($rawData);
+ }
+ } // END - while
// Trace message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAWDATA-HANDLER: EXIT!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-RAW-DATA-HANDLER: EXIT!');
}
<?php
// Own namespace
-namespace Hub\Handler\Network\RawData\Udp;
+namespace Org\Shipsimu\Hub\Handler\Network\RawData\Udp;
// Import application-specific stuff
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
-use Hub\Network\Networkable;
-use Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Handler\Network\RawData\BaseRawDataHandler;
+use Org\Shipsimu\Hub\Network\Networkable;
+use Org\Shipsimu\Hub\Pool\Poolable;
/**
* A UDP raw data handler
/**
* Creates an instance of this class
*
- * @return $handlerInstance An instance of a Networkable class
+ * @return $handlerInstance An instance of a Networkable class
*/
public static final function createUdpRawDataHandler () {
// Get new instance
* Processes raw data from given socket instance. This is mostly useful for
* UDP package handling and is implemented in the UDPListener class
*
- * @param $resource A valid socket resource array
+ * @param $socketInstance An instance of a StorableSocket socket
* @return void
- * @throws InvalidArgumentException If the socket instance is not set
*/
- public function processRawDataFromSocketArray (array $socketArray) {
- // Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UDP-HANDLER: socketArray()=%d - CALLED!', count($socketArray)));
-
- // Check the resource
- if ((!isset($socketArray[Poolable::SOCKET_ARRAY_INSTANCE])) || (!($socketArray[Poolable::SOCKET_ARRAY_INSTANCE] instanceof StorableSocket))) {
- // Throw an exception
- throw new InvalidArgumentException(sprintf('socketArray[%s] is not set or invalid.', Poolable::SOCKET_ARRAY_INSTANCE));
- } // END - if
-
+ public function processRawDataFromSocketInstance (StorableSocket $socketInstance) {
// Reset error code to unhandled
- $this->setErrorCode(self::SOCKET_ERROR_UNHANDLED);
+ $this->setErrorCode(StorableSocket::SOCKET_ERROR_UNHANDLED);
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UDP-HANDLER: Handling UDP package from resource=' . $socketArray[Poolable::SOCKET_ARRAY_INSTANCE] . ',type=' . $socketArray[Poolable::SOCKET_ARRAY_CONN_TYPE] . ',last error=' . socket_strerror($this->lastSocketError));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UDP-HANDLER: Handling UDP package from resource=' . $socketInstance->getSocketResource() . ',last error=' . $socketInstance->getLastSocketErrorMessage());
$this->partialStub('Please rewrite this part.');
return;
}
<?php
// Own namespace
-namespace Hub\Helper;
+namespace Org\Shipsimu\Hub\Helper;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A general hub helper class. This class does not extend BaseHelper.
<?php
// Own namespace
-namespace Hub\Helper\Connection;
+namespace Org\Shipsimu\Hub\Helper\Connection;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Fragmenter\FragmenterFactory;
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Factory\State\Peer\PeerStateFactory;
-use Hub\Helper\BaseHubSystemHelper;
-use Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Fragmenter\FragmenterFactory;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Factory\State\Peer\PeerStateFactory;
+use Org\Shipsimu\Hub\Helper\BaseHubSystemHelper;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\FrameworkInterface;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A general ConnectionHelper class
$rawDataChunk = $this->getFragmenterInstance()->getNextRawDataChunk($this->currentFinalHash);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: rawDataChunk=' . print_r($rawDataChunk, TRUE));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: rawDataChunk=' . print_r($rawDataChunk, TRUE));
// Get chunk hashes and chunk data
$chunkHashes = array_keys($rawDataChunk);
$chunkData = array_values($rawDataChunk);
+ // Default is empty raw data
+ $rawData = '';
+
// Is the required data there?
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: chunkHashes[]=' . count($chunkHashes) . ',chunkData[]=' . count($chunkData));
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('chunkData='.print_r($chunkData, TRUE));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: chunkHashes[]=' . count($chunkHashes) . ',chunkData[]=' . count($chunkData));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('chunkData='.print_r($chunkData, TRUE));
if ((isset($chunkHashes[0])) && (isset($chunkData[0]))) {
// Remember this chunk as queued
$this->queuedChunks[$chunkHashes[0]] = $chunkData[0];
// Return the raw data
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Returning ' . strlen($chunkData[0]) . ' bytes from ' . __METHOD__ . ' ...');
- return $chunkData[0];
- } else {
- // Return zero string
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Returning zero bytes from ' . __METHOD__ . '!');
- return '';
- }
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: rawData()=' . strlen($chunkData[0]) . ' bytes.');
+ $rawData = $chunkData[0];
+ } // END - if
+
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: rawData()=%d - EXIT!', strlen($rawData)));
+
+ // Return raw data
+ return $rawData;
}
/**
*/
public function sendRawPackageData (array $packageData) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: packageData()=%d - CALLED!', count($packageData)));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: packageData()=%d - CALLED!', count($packageData)));
// The helper's state must be 'connected'
$this->getStateInstance()->validatePeerStateConnected();
$finalHash = $this->getFragmenterInstance()->fragmentPackageArray($packageData, $this);
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: finalHash[%s]=%s', gettype($finalHash), $finalHash));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: finalHash[%s]=%s', gettype($finalHash), $finalHash));
// Is the final hash set?
if ($finalHash !== TRUE) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Setting finalHash=' . $finalHash . ',currentFinalHash[' . gettype($this->currentFinalHash) . ']=' . $this->currentFinalHash);
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Setting finalHash=' . $finalHash . ',currentFinalHash[' . gettype($this->currentFinalHash) . ']=' . $this->currentFinalHash);
// Set final hash
$this->currentFinalHash = $finalHash;
// Fill sending buffer with data
while (TRUE) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: dataStream()=%d', strlen($dataStream)));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: dataStream()=%d - BEFORE!', strlen($dataStream)));
// Convert the package data array to a raw data stream
$dataStream = $this->getRawDataFromPackageArray($packageData);
+ // Debug message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: dataStream()=%d - AFTER!', strlen($dataStream)));
+
// Is it empty?
if (strlen($dataStream) == 0) {
+ // Debug message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: dataStream is now empty, exiting loop ...');
+
// Abort here
break;
} // END - if
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Adding ' . strlen($dataStream) . ' bytes to the sending buffer ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Adding ' . strlen($dataStream) . ' bytes to the sending buffer ...');
// Add raw data
$rawData .= $dataStream;
} // END - while
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: rawData()=%d', strlen($rawData)));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: rawData()=%d - after loop ...', strlen($rawData)));
// Nothing to sent is bad news, so assert on it
assert(strlen($rawData) > 0);
$bufferSize = $this->getConfigInstance()->getConfigEntry($this->getProtocolName() . '_buffer_length');
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: bufferSize=%d', $bufferSize));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: bufferSize=%d', $bufferSize));
// Encode the raw data with our output-stream
$encodedData = $this->getOutputStreamInstance()->streamData($rawData);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: socketResource[]=' . gettype($this->getSocketInstance()->getSocketResource()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: socketResource[%s]=%s', gettype($this->getSocketInstance()->getSocketResource()), $this->getSocketInstance()->getSocketResource()));
// Init array
$encodedDataArray = array(
NetworkPackage::RAW_INDEX_SENT_BYTES => 0,
NetworkPackage::RAW_INDEX_SOCKET_INSTANCE => $this->getSocketInstance(),
NetworkPackage::RAW_INDEX_BUFFER_SIZE => $bufferSize,
- NetworkPackage::RAW_INDEX_DIFF => 0
+ NetworkPackage::RAW_INDEX_DIFF => ($bufferSize - strlen($encodedData)),
);
- // Calculate difference
- $diff = $encodedDataArray[NetworkPackage::RAW_INDEX_BUFFER_SIZE] - strlen($encodedDataArray[NetworkPackage::RAW_INDEX_ENCODED_DATA]);
-
- // Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: diff=' . $diff);
-
// Push raw data to the package's outgoing stack
$this->getPackageInstance()->getStackInstance()->pushNamed(NetworkPackage::STACKER_NAME_OUTGOING_STREAM, $encodedDataArray);
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: EXIT!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: EXIT!');
}
/**
<?php
// Own namespace
-namespace Hub\Helper\Connection\Network\IpV4;
+namespace Org\Shipsimu\Hub\Helper\Connection\Network\IpV4;
// Import application-specific stuff
-use Hub\Factory\State\Peer\PeerStateFactory;
-use Hub\Helper\Connection\BaseConnectionHelper;
-use Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Factory\State\Peer\PeerStateFactory;
+use Org\Shipsimu\Hub\Helper\Connection\BaseConnectionHelper;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
/**
* A ??? connection helper class
<?php
// Own namespace
-namespace Hub\Helper\Connection\Network\IpV4\Tcp;
+namespace Org\Shipsimu\Hub\Helper\Connection\Network\IpV4\Tcp;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Handler\Protocol\ProtocolHandlerFactory;
-use Hub\Factory\Socket\SocketFactory;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Helper\Connection\Network\IpV4\BaseIpV4ConnectionHelper;
-use Hub\Locator\Node\LocateableNode;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Tools\HubTools;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Handler\Protocol\ProtocolHandlerFactory;
+use Org\Shipsimu\Hub\Factory\Socket\SocketFactory;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Helper\Connection\Network\IpV4\BaseIpV4ConnectionHelper;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Tools\HubTools;
// Import framework stuff
<?php
// Own namespace
-namespace Hub\Helper\Connection\Network\IpV4\Udp;
+namespace Org\Shipsimu\Hub\Helper\Connection\Network\IpV4\Udp;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Helper\Connection\Network\IpV4\BaseIpV4ConnectionHelper;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Helper\Connection\Network\IpV4\BaseIpV4ConnectionHelper;
/**
* A UDP connection helper class
<?php
// Own namespace
-namespace Hub\Helper\Dht\Bootstrap;
+namespace Org\Shipsimu\Hub\Helper\Dht\Bootstrap;
// 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;
+use Org\Shipsimu\Hub\Dht\Distributable;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Helper\BaseHubSystemHelper;
+use Org\Shipsimu\Hub\Helper\Dht\HelpableDht;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* A Bootstrap Dht helper class
<?php
// Own namespace
-namespace Hub\Helper\Dht\Publish;
+namespace Org\Shipsimu\Hub\Helper\Dht\Publish;
// 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;
+use Org\Shipsimu\Hub\Dht\Distributable;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Helper\BaseHubSystemHelper;
+use Org\Shipsimu\Hub\Helper\Dht\HelpableDht;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* A PublishingEntry Dht helper class
<?php
// Own namespace
-namespace Hub\Helper\Message;
+namespace Org\Shipsimu\Hub\Helper\Message;
// Import application-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A general Message class
<?php
// Own namespace
-namespace Hub\Helper\Crypto\Message\RandomUnit;
+namespace Org\Shipsimu\Hub\Helper\Crypto\Message\RandomUnit;
// Import application-specific stuff
-use Hub\Factory\Source\Unit\UnitSourceFactory;
+use Org\Shipsimu\Hub\Factory\Source\Unit\UnitSourceFactory;
/**
* A CryptoRandom message helper
<?php
// Own namespace
-namespace Hub\Node\Helper\Announcement;
+namespace Org\Shipsimu\Hub\Node\Helper\Announcement;
// Import application-specific stuff
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Helper\Node\BaseNodeHelper;
-use Hub\Helper\Node\NodeHelper;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Helper\Node\BaseNodeHelper;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
// Import framework stuff
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* A helper class for announcing this node to other nodes
<?php
// Own namespace
-namespace Hub\Node\Helper\Answer\Announcement;
+namespace Org\Shipsimu\Hub\Node\Helper\Answer\Announcement;
// Import application-specific stuff
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Helper\Node\NodeHelper;
-use Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
// Import framework stuff
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* A AnnouncementMessageAnswer node helper class
namespace Helper\Node\Answer;
// Import application-specific stuff
-use Hub\Helper\Node\BaseNodeHelper;
+use Org\Shipsimu\Hub\Helper\Node\BaseNodeHelper;
/**
* A general hub message answer helper class
<?php
// Own namespace
-namespace Hub\Node\Helper\Answer\Dht\Bootstrap;
+namespace Org\Shipsimu\Hub\Node\Helper\Answer\Dht\Bootstrap;
// Import application-specific stuff
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Helper\Node\NodeHelper;
-use Hub\Node\Helper\HelpableNode;
-use Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
// Import framework stuff
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* A DhtBootstrapMessageAnswer node helper class
<?php
// Own namespace
-namespace Hub\Node\Helper\Answer\Request\NodeList;
+namespace Org\Shipsimu\Hub\Node\Helper\Answer\Request\NodeList;
// Import application-specific stuff
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Helper\Node\NodeHelper;
-use Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
// Import framework stuff
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* A RequestNodeListMessageAnswer node helper class
<?php
// Own namespace
-namespace Hub\Helper\Node;
+namespace Org\Shipsimu\Hub\Helper\Node;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
-use Hub\Helper\BaseHubSystemHelper;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Helper\BaseHubSystemHelper;
/**
* A general node helper class
<?php
// Own namespace
-namespace Hub\Node\Helper\SelfConnect;
+namespace Org\Shipsimu\Hub\Node\Helper\SelfConnect;
// Import application-specific stuff
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Helper\Node\BaseNodeHelper;
-use Hub\Helper\Node\NodeHelper;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Node\Helper\HelpableNode;
-use Hub\Tag\Tagable;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Helper\Node\BaseNodeHelper;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Tag\Tagable;
// Import framework stuff
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* A SelfConnect hub helper class
<?php
// Own namespace
-namespace Hub\Node\Helper\Request\NodeList;
+namespace Org\Shipsimu\Hub\Node\Helper\Request\NodeList;
// Import application-specific stuff
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Helper\Node\BaseNodeHelper;
-use Hub\Helper\Node\NodeHelper;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Helper\Node\BaseNodeHelper;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
// Import framework stuff
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* A ??? hub helper class
<?php
// Own namespace
-namespace Hub\Helper\WorkUnit;
+namespace Org\Shipsimu\Hub\Helper\WorkUnit;
// Import application-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A general WorkUnit class
<?php
// Own namespace
-namespace Hub\Information;
+namespace Org\Shipsimu\Hub\Information;
// Import application-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A general Info class
<?php
// Own namespace
-namespace Hub\Information\Connection;
+namespace Org\Shipsimu\Hub\Information\Connection;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Information\BaseInfo;
-use Hub\Information\ShareableInfo;
-use Hub\Listener\Listenable;
-use Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Information\BaseInfo;
+use Org\Shipsimu\Hub\Information\ShareableInfo;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Socket\InvalidSocketException;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
/**
* A Connection information class
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class ConnectionInfo extends BaseInfo implements ShareableInfo, Registerable {
+ /**
+ * Connection type: 'incoming', 'outgoing', 'server'
+ */
+ private $connectionType = 'invalid';
+
/**
* Protected constructor
*
/**
* Creates an instance of this class
*
+ * @param $connectionType Connection type (valid: 'incoming', 'outgoing', 'server')
* @return $infoInstance An instance of a ShareableInfo class
*/
- public final static function createConnectionInfo () {
+ public final static function createConnectionInfo ($connectionType) {
// Get new instance
$infoInstance = new ConnectionInfo();
+ // Set connection type here
+ $infoInstance->setConnectionType($connectionType);
+
// Return the prepared instance
return $infoInstance;
}
+ /**
+ * Setter for connection type
+ *
+ * @param $connectionType Connection type
+ * @return void
+ */
+ private function setConnectionType ($connectionType) {
+ $this->connectionType = $connectionType;
+ }
+
+ /**
+ * Getter for connection type
+ *
+ * @return $connectionType Connection type
+ */
+ public final function getConnectionType () {
+ return $this->connectionType;
+ }
+
/**
* Fills the information class with data from a Listenable instance
*
<?php
// Own namespace
-namespace Hub\Iterator\Network\Listener;
+namespace Org\Shipsimu\Hub\Iterator\Network\Listener;
// Import framework stuff
-use CoreFramework\Iterator\BaseIterator;
-use CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Iterator\BaseIterator;
+use Org\Mxchange\CoreFramework\Lists\Listable;
// Import SPL stuff
use \Iterator;
<?php
// Own namespace
-namespace Hub\Iterator\Node\Ping;
+namespace Org\Shipsimu\Hub\Iterator\Node\Ping;
// Import framework stuff
-use CoreFramework\Iterator\BaseIterator;
+use Org\Mxchange\CoreFramework\Iterator\BaseIterator;
// Import SPL stuff
use \Iterator;
namespace Hub\Iterator\Handler\;
// Import framework stuff
-use CoreFramework\Iterator\BaseIterator;
+use Org\Mxchange\CoreFramework\Iterator\BaseIterator;
// Import SPL stuff
use \Iterator;
<?php
// Own namespace
-namespace Hub\Iterator\Handler\Pool;
+namespace Org\Shipsimu\Hub\Iterator\Handler\Pool;
// Import framework stuff
-use CoreFramework\Iterator\BaseIterator;
-use CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Iterator\BaseIterator;
+use Org\Mxchange\CoreFramework\Lists\Listable;
// Import SPL stuff
use \Iterator;
<?php
// Own namespace
-namespace Hub\Iterator\Pool\Monitor;
+namespace Org\Shipsimu\Hub\Iterator\Pool\Monitor;
// Import framework stuff
-use CoreFramework\Iterator\BaseIterator;
-use CoreFramework\Lists\Listable;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Iterator\BaseIterator;
+use Org\Mxchange\CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
// Import SPL stuff
use \Iterator;
namespace Hub\Iterator\Shutdown\;
// Import framework stuff
-use CoreFramework\Iterator\BaseIterator;
+use Org\Mxchange\CoreFramework\Iterator\BaseIterator;
// Import SPL stuff
use \Iterator;
<?php
// Own namespace
-namespace Hub\Iterator\Shutdown\Pool;
+namespace Org\Shipsimu\Hub\Iterator\Shutdown\Pool;
// Import framework stuff
-use CoreFramework\Iterator\BaseIterator;
-use CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Iterator\BaseIterator;
+use Org\Mxchange\CoreFramework\Lists\Listable;
// Import SPL stuff
use \Iterator;
<?php
// Own namespace
-namespace Hub\Iterator\Pool\Task;
+namespace Org\Shipsimu\Hub\Iterator\Pool\Task;
// Import framework stuff
-use CoreFramework\Iterator\BaseIterator;
-use CoreFramework\Lists\Listable;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Iterator\BaseIterator;
+use Org\Mxchange\CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
// Import SPL stuff
use \Iterator;
<?php
// Own namespace
-namespace Hub\Iterator\Producer\TestUnitKey;
+namespace Org\Shipsimu\Hub\Iterator\Producer\TestUnitKey;
// Import framework stuff
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Iterator\BaseIterator;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Iterator\BaseIterator;
// Import SPL stuff
use \Iterator;
<?php
// Own namespace
-namespace Hub\Listener;
+namespace Org\Shipsimu\Hub\Listener;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Information\Connection\ConnectionInfoFactory;
-use Hub\Factory\Network\Locator\UniversalNodeLocatorFactory;
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Factory\Socket\SocketFactory;
-use Hub\Generic\BaseHubSystem;
-use Hub\Information\ShareableInfo;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Pool\Peer\PoolablePeer;
-use Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Information\Connection\ConnectionInfoFactory;
+use Org\Shipsimu\Hub\Factory\Network\Locator\UniversalNodeLocatorFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Factory\Socket\SocketFactory;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Information\ShareableInfo;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Pool\Peer\PoolablePeer;
+use Org\Shipsimu\Hub\Pool\Poolable;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Factory\Registry\Socket\SocketRegistryFactory;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Socket\InvalidServerSocketException;
-use CoreFramework\Socket\SocketAlreadyRegisteredException;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Registry\Socket\SocketRegistryFactory;
+use Org\Mxchange\CoreFramework\Generic\NullPointerException;
+use Org\Mxchange\CoreFramework\Socket\InvalidServerSocketException;
+use Org\Mxchange\CoreFramework\Socket\SocketAlreadyRegisteredException;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
// Import SPL stuff
use \LogicException;
protected function __construct ($className) {
// Call parent constructor
parent::__construct($className);
+
+ // Get a socket registry instance (singleton)
+ $registryInstance = SocketRegistryFactory::createSocketRegistryInstance();
+
+ // And set it here for later on making lesser calls
+ $this->setRegistryInstance($registryInstance);
}
/**
*/
protected function registerServerSocketInstance (StorableSocket $socketInstance) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: socketInstance=%s - CALLED!', $socketInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance=%s - CALLED!', strtoupper($this->getProtocolName()), $socketInstance->__toString()));
// First check if it is valid
if ($this->isServerSocketRegistered($socketInstance)) {
throw new SocketAlreadyRegisteredException(array($this, $socketInstance->getSocketResource()), self::EXCEPTION_SOCKET_ALREADY_REGISTERED);
} // END - if
- // Get a socket registry instance (singleton)
- $registryInstance = SocketRegistryFactory::createSocketRegistryInstance();
-
// Get a connection info instance
- $infoInstance = ConnectionInfoFactory::createConnectionInfoInstance($this->getProtocolName(), 'listener');
+ $infoInstance = ConnectionInfoFactory::createConnectionInfoInstance($this->getProtocolName(), StorableSocket::CONNECTION_TYPE_SERVER);
// Is the instance set?
if (!($infoInstance instanceof ShareableInfo)) {
$infoInstance->fillWithListenerInformation($this);
// Register the socket
- $registryInstance->registerSocketInstance($infoInstance, $socketInstance);
+ $this->getRegistryInstance()->registerSocketInstance($infoInstance, $socketInstance);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: Setting socketInstance ... (socketResource=%s)', $socketInstance->getSocketResource()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Setting socketInstance ... (socketResource=%s)', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
// And set it here
$this->setSocketInstance($socketInstance);
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER: EXIT!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: EXIT!', strtoupper($this->getProtocolName())));
}
/**
*/
protected function isServerSocketRegistered (StorableSocket $socketInstance) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: socketInstance=%s - CALLED!', $socketInstance->__toString()));
-
- // Get a socket registry instance (singleton)
- $registryInstance = SocketRegistryFactory::createSocketRegistryInstance();
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance=%s - CALLED!', strtoupper($this->getProtocolName()), $socketInstance->__toString()));
// Get a connection info instance
- $infoInstance = ConnectionInfoFactory::createConnectionInfoInstance($this->getProtocolName(), 'listener');
+ $infoInstance = ConnectionInfoFactory::createConnectionInfoInstance($this->getProtocolName(), StorableSocket::CONNECTION_TYPE_SERVER);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: infoInstance[]=%s', gettype($infoInstance)));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: infoInstance[]=%s', strtoupper($this->getProtocolName()), gettype($infoInstance)));
// Is the instance set?
if (!($infoInstance instanceof ShareableInfo)) {
$infoInstance->fillWithListenerInformation($this);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: Checking socketInstance ... (socketResource=%s)', $socketInstance->getSocketResource()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Checking socketInstance ... (socketResource=%s)', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
// Check it
- $isRegistered = $registryInstance->isSocketRegistered($infoInstance, $socketInstance);
+ $isRegistered = $this->getRegistryInstance()->isSocketRegistered($infoInstance, $socketInstance);
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: isRegistered=%d - EXIT!', intval($isRegistered)));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: isRegistered=%d - EXIT!', strtoupper($this->getProtocolName()), intval($isRegistered)));
// Return result
return $isRegistered;
*/
public function accept (Visitor $visitorInstance) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - CALLED!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - CALLED!');
// Visit this listener
$visitorInstance->visitListener($this);
// Visit the pool if set
if ($this->getPoolInstance() instanceof Poolable) {
+ // Visit pool instance
$this->getPoolInstance()->accept($visitorInstance);
} // END - if
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - EXIT!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - EXIT!');
}
/**
- * Monitors incoming raw data from the handler and transfers it to the
- * given receiver instance. This method should not be called, please call
- * the decorator's version instead to separator node/client traffic.
+ * Monitors incoming raw data from all registered sockets and if found,
+ * processRawDataFromSocketInstance() is being called.
*
* @return void
- * @throws UnsupportedOperatorException If this method is called by a mistake
*/
public function monitorIncomingRawData () {
- throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: CALLED!', strtoupper($this->getProtocolName())));
+
+ // Check if an incoming socket is registered
+ if (!$this->getRegistryInstance()->isIncomingSocketRegistered()) {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: No socket of type "%s" registered. - EXIT!', strtoupper($this->getProtocolName()), StorableSocket::CONNECTION_TYPE_INCOMING));
+
+ // Skip further processing
+ return;
+ } // END - if
+
+ // Debugging:
+ /* DEBUG-DIE: */ $this->getRegistryInstance()->debugInstance();
+
+ // Get iterator from registry instance
+ $iteratorInstance = $this->getRegistryInstance()->getIterator();
+
+ // Debug message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: iteratorInstance[]=%s', strtoupper($this->getProtocolName()), gettype($iteratorInstance)));
+
+ // Should be valid instance
+ if (is_null($iteratorInstance)) {
+ // Throw NPE
+ throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
+ } // END - if
+
+ // Is it valid?
+ if (!$iteratorInstance->valid()) {
+ // Then rewind it
+ $iteratorInstance->rewind();
+ } // END - if
+
+ // Get current instance
+ $socketInstance = $iteratorInstance->current();
+
+ // Debug message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance[]=%s', strtoupper($this->getProtocolName()), gettype($socketInstance)));
+
+ // Is NULL returned?
+ if (is_null($socketInstance)) {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance=NULL - EXIT!', strtoupper($this->getProtocolName())));
+
+ // Then abort here
+ return;
+ } // END - if
+
+ // Advance to next
+ $iteratorInstance->next();
+
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: EXIT!', strtoupper($this->getProtocolName())));
}
/**
*/
protected function doListenSocketSelect ($peerSuffix) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: peerSuffix=%s - CALLED!', $peerSuffix));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: peerSuffix=%s - CALLED!', strtoupper($this->getProtocolName()), $peerSuffix));
// Check on all instances
assert($this->getPoolInstance() instanceof Poolable);
$socketInstance = SocketFactory::createNextAcceptedSocketFromPool($this->getPoolInstance(), $this->getSocketInstance());
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: socketInstance[]=%s accepted.', gettype($socketInstance)));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance[]=%s accepted.', strtoupper($this->getProtocolName()), gettype($socketInstance)));
// Is socket instance set?
if (!($socketInstance instanceof StorableSocket)) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER: No new connection on listener ... - EXIT!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: No new connection on listener ... - EXIT!', strtoupper($this->getProtocolName())));
// Nothing has changed on the listener
return;
} // END - if
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: socketInstance.socketResource=%s accepted.', $socketInstance->getSocketResource()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance.socketResource=%s accepted.', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
// Init peer address/port
$peerAddress = '0.0.0.0';
// Get node instance
$nodeInstance = NodeObjectFactory::createNodeInstance();
- // Create a faked package data array
- $packageData = array(
- NetworkPackage::PACKAGE_DATA_SENDER_ADDRESS => $peerAddress . $peerSuffix,
- NetworkPackage::PACKAGE_DATA_SENDER_PORT => $peerPort,
- NetworkPackage::PACKAGE_DATA_RECIPIENT => $nodeInstance->getSessionId(),
- NetworkPackage::PACKAGE_DATA_STATUS => NetworkPackage::PACKAGE_STATUS_FAKED
- );
-
// Get a connection info instance
- $infoInstance = ConnectionInfoFactory::createConnectionInfoInstance($this->getProtocolName(), 'listener');
+ $infoInstance = ConnectionInfoFactory::createConnectionInfoInstance($this->getProtocolName(), StorableSocket::CONNECTION_TYPE_INCOMING);
+
+ // Debug message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: infoInstance[]=%s', strtoupper($this->getProtocolName()), gettype($infoInstance)));
// Is the instance set?
if (!($infoInstance instanceof ShareableInfo)) {
// Will the info instance with listener data
$infoInstance->fillWithSocketPeerInformation($socketInstance);
- // Get a socket registry
- $registryInstance = SocketRegistryFactory::createSocketRegistryInstance();
-
- // Register the socket with the registry and with the faked array
- $registryInstance->registerSocketInstance($infoInstance, $socketInstance, $packageData);
+ // Debugging:
+ //* DEBUG-DIE: */ $infoInstance->debugInstance();
- // Do we have to rewind?
- if (!$this->getIteratorInstance()->valid()) {
- // Rewind the list
- $this->getIteratorInstance()->rewind();
- } // END - if
+ // Create a faked package data array
+ $packageData = array(
+ NetworkPackage::PACKAGE_DATA_SENDER_ADDRESS => $peerAddress . $peerSuffix,
+ NetworkPackage::PACKAGE_DATA_SENDER_PORT => $peerPort,
+ NetworkPackage::PACKAGE_DATA_RECIPIENT => $nodeInstance->getSessionId(),
+ NetworkPackage::PACKAGE_DATA_STATUS => NetworkPackage::PACKAGE_STATUS_FAKED
+ );
- // Get the current value
- $currentSocketData = $this->getIteratorInstance()->current();
+ // Register the socket with the registry and with the faked array
+ $this->getRegistryInstance()->registerSocketInstance($infoInstance, $socketInstance, $packageData);
- // Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER: currentSocketData=' . $currentSocketData[Poolable::SOCKET_ARRAY_INSTANCE] . ',type=' . $currentSocketData[Poolable::SOCKET_ARRAY_CONN_TYPE] . ',serverSocket=' . $this->getSocketInstance()->getSocketResource());
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Calling this.handlerInstance.processRawDataFromSocketInstance(resource=%s) ...', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
// Handle it here, if not main server socket
- if (($currentSocketData[Poolable::SOCKET_ARRAY_CONN_TYPE] != StorableSocket::CONNECTION_TYPE_SERVER) && (!$currentSocketData[Poolable::SOCKET_ARRAY_INSTANCE]->equals($this->getSocketInstance()))) {
- // ... or else it will raise warnings like 'Transport endpoint is not connected'
- $this->getHandlerInstance()->processRawDataFromSocketArray($currentSocketData);
- } // END - if
-
- // Advance to next entry. This should be the last line.
- $this->getIteratorInstance()->next();
+ $this->getHandlerInstance()->processRawDataFromSocketInstance($socketInstance);
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER: EXIT!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: EXIT!', strtoupper($this->getProtocolName())));
}
/**
*/
public function ifListenerAcceptsPackageData (array $packageData) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: packageData()=%d - CALLED!', count($packageData)));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: packageData()=%d - CALLED!', strtoupper($this->getProtocolName()), count($packageData)));
// Check if same socket protocol
$socketProtocol = $this->getSocketInstance()->getSocketProtocol();
$unlProtocol = $unlInstance->getUnlProtocol();
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: unlInstance.unlProtocol=%s,socketProtocol=%s', $unlProtocol, $socketProtocol));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: unlInstance.unlProtocol=%s,socketProtocol=%s', strtoupper($this->getProtocolName()), $unlProtocol, $socketProtocol));
// Is same protocol?
$accepts = ($unlProtocol == $socketProtocol);
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER: accepts=%d - EXIT!', $accepts));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: accepts=%d - EXIT!', strtoupper($this->getProtocolName()), $accepts));
// Return the result
return $accepts;
<?php
// Own namespace
-namespace Hub\Listener;
+namespace Org\Shipsimu\Hub\Listener;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Listener\Listenable;
-use Hub\Locator\Node\LocateableNode;
-use Hub\Network\Networkable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Network\Networkable;
// Import framework stuff
-use CoreFramework\Generic\BaseDecorator;
-use CoreFramework\Generic\UnsupportedOperationException;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Generic\BaseDecorator;
+use Org\Mxchange\CoreFramework\Generic\NullPointerException;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
+
+// Import SPL stuff
+use \LogicException;
/**
* A general decorator for listeners to communicate to hubs
* @return void
*/
public function accept (Visitor $visitorInstance) {
+ // Trace message
+ /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER-DECORATOR: visitorInstance=%s - CALLED!', $visitorInstance->__toString()));
+
// Visit this decorator
$visitorInstance->visitDecorator($this);
+ // Trace message
+ /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER-DECORATOR: Calling visitorInstance->visitListener(%s) ...', $this->getListenerInstance()->__toString()));
+
// Visit the covered class
$visitorInstance->visitListener($this->getListenerInstance());
+
+ // Trace message
+ /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: EXIT!');
}
/**
* given receiver instance.
*
* @return void
+ * @throws NullPointerException If no handler instance is set in listener instance
+ * @throws LogicException If the given handler instance is not implementing a required interface
*/
public function monitorIncomingRawData () {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: CALLED!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: CALLED!');
// Get the handler instance
$handlerInstance = $this->getListenerInstance()->getHandlerInstance();
/*
* Does the deocorated listener (or even a decorator again) have a
- * handler assigned? Remember that a handler will hold all incoming raw
- * data and not a listener.
+ * handler assigned? This is now mandadory.
*/
- if (!$handlerInstance instanceof Networkable) {
- // Skip this silently for now. Later on, this will become mandatory!
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: No handler assigned to this listener decorator. this=' . $this->__toString() . ', listenerInstance=' . $this->getListenerInstance()->__toString());
- return;
- } // END - if
+ if (is_null($handlerInstance)) {
+ // Should not happen anymore
+ throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
+ } elseif (!$handlerInstance instanceof Networkable) {
+ // Bad, bad!
+ throw new LogicException(sprintf('listenerInstance.handlerInstance[]=%s is not imlementing Networkable.', gettype($handlerInstance)));
+ }
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER-DECORATOR: handlerInstance=%s', $handlerInstance->__toString()));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER-DECORATOR: handlerInstance=%s', $handlerInstance->__toString()));
// Does the handler have some decoded data pending?
if (!$handlerInstance->isRawDataPending()) {
// No data is pending so skip further code silently
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: No data pending on handlerInstance=' . $handlerInstance->__toString() . ' - EXIT!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: No data pending on handlerInstance=' . $handlerInstance->__toString() . ' - EXIT!');
return;
} // END - if
* know if the decoded data origins from a TCP or UDP connection so it
* can just be passed over to the network package receiver.
*/
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: Going to handle over some raw data to receiverInstance=' . $receiverInstance->__toString() . ' ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: Going to handle over some raw data to receiverInstance=' . $receiverInstance->__toString() . ' ...');
$receiverInstance->addRawDataToIncomingStack($handlerInstance);
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: EXIT!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: EXIT!');
}
/**
<?php
// Own namespace
-namespace Hub\Listener\Socket;
+namespace Org\Shipsimu\Hub\Listener\Socket;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Socket\SocketFactory;
-use Hub\Factory\Tag\Package\PackageTagsFactory;
-use Hub\Listener\BaseListener;
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Socket\SocketFactory;
+use Org\Shipsimu\Hub\Factory\Tag\Package\PackageTagsFactory;
+use Org\Shipsimu\Hub\Listener\BaseListener;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import framework stuff
-use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
/**
* A file-based socket listener
<?php
// Own namespace
-namespace Hub\Listener\Socket;
+namespace Org\Shipsimu\Hub\Listener\Socket;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Tag\Package\PackageTagsFactory;
-use Hub\Listener\BaseListenerDecorator;
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Tag\Package\PackageTagsFactory;
+use Org\Shipsimu\Hub\Listener\BaseListenerDecorator;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import framework stuff
use Hub\Listener\Listenable;
// Import framework stuff
-use CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
<?php
/**
<?php
// Own namespace
-namespace Hub\Listener\Tcp;
+namespace Org\Shipsimu\Hub\Listener\Tcp;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Socket\SocketFactory;
-use Hub\Listener\BaseListener;
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Socket\SocketFactory;
+use Org\Shipsimu\Hub\Listener\BaseListener;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
/**
* A TCP connection listener
<?php
// Own namespace
-namespace Hub\Listener\Client\Tcp;
+namespace Org\Shipsimu\Hub\Listener\Client\Tcp;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Tag\Package\PackageTagsFactory;
-use Hub\Listener\BaseListenerDecorator;
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Tag\Package\PackageTagsFactory;
+use Org\Shipsimu\Hub\Listener\BaseListenerDecorator;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import framework stuff
<?php
// Own namespace
-namespace Hub\Listener\Hub\Tcp;
+namespace Org\Shipsimu\Hub\Listener\Hub\Tcp;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Tag\Package\PackageTagsFactory;
-use Hub\Listener\BaseListenerDecorator;
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Tag\Package\PackageTagsFactory;
+use Org\Shipsimu\Hub\Listener\BaseListenerDecorator;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import framework stuff
<?php
// Own namespace
-namespace Hub\Listener\Udp;
+namespace Org\Shipsimu\Hub\Listener\Udp;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Socket\SocketFactory;
-use Hub\Listener\BaseListener;
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Socket\SocketFactory;
+use Org\Shipsimu\Hub\Listener\BaseListener;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
/**
* An UDP connection listener
<?php
// Own namespace
-namespace Hub\Listener\Client\Udp;
+namespace Org\Shipsimu\Hub\Listener\Client\Udp;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Tag\Package\PackageTagsFactory;
-use Hub\Listener\BaseListenerDecorator;
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Tag\Package\PackageTagsFactory;
+use Org\Shipsimu\Hub\Listener\BaseListenerDecorator;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import framework stuff
<?php
// Own namespace
-namespace Hub\Listener\Hub\Udp;
+namespace Org\Shipsimu\Hub\Listener\Hub\Udp;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Tag\Package\PackageTagsFactory;
-use Hub\Listener\BaseListenerDecorator;
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Tag\Package\PackageTagsFactory;
+use Org\Shipsimu\Hub\Listener\BaseListenerDecorator;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import framework stuff
<?php
// Own namespace
-namespace Hub\Lists\Hub;
+namespace Org\Shipsimu\Hub\Lists\Hub;
// Import framework stuff
-use CoreFramework\Lists\BaseList;
-use CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Lists\BaseList;
+use Org\Mxchange\CoreFramework\Lists\Listable;
/**
* A Hub list
<?php
// Own namespace
-namespace Hub\Lists\Pool;
+namespace Org\Shipsimu\Hub\Lists\Pool;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Lists\BaseList;
-use CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Lists\BaseList;
+use Org\Mxchange\CoreFramework\Lists\Listable;
/**
* A list for pool entries
<?php
// Own namespace
-namespace Hub\Lists\Recipient;
+namespace Org\Shipsimu\Hub\Lists\Recipient;
// Import framework stuff
-use CoreFramework\Lists\BaseList;
-use CoreFramework\Lists\Listable;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Lists\BaseList;
+use Org\Mxchange\CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A Recipient list
<?php
// Own namespace
-namespace Hub\Locator\Node;
+namespace Org\Shipsimu\Hub\Locator\Node;
// Import application-specific stuff
-use Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
// Import SPL stuff
use \BadMethodCallException;
<?php
// Own namespace
-namespace Hub\Miner;
+namespace Org\Shipsimu\Hub\Miner;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* A hub-mcrypt miner class
namespace Hub\Miner;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A hub-miner class for the '???' mode
<?php
// Own namespace
-namespace Hub\Miner;
+namespace Org\Shipsimu\Hub\Miner;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
// Import framework stuff
-use CoreFramework\Database\Updateable;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Database\Updateable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A general hub miner class
<?php
// Own namespace
-namespace Hub\Node\Boot;
+namespace Org\Shipsimu\Hub\Node\Boot;
// Import application-specific stuff
-use Hub\Node\BaseHubNode;
-use Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\BaseHubNode;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
// Import framework stuff
-use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Handler\Task\HandleableTask;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A hub-node class for the 'Boot' mode
use Hub\Helper\Node\NodeHelper;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A hub-node class for the '???' mode
<?php
// Own namespace
-namespace Hub\Node;
+namespace Org\Shipsimu\Hub\Node;
// Import hub-specific stuff
-use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
-use Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
-use Hub\Factory\Registry\Object\ObjectTypeRegistryFactory;
-use Hub\Factory\State\Node\NodeStateFactory;
-use Hub\Locator\Node\LocateableNode;
-use Hub\Generic\BaseHubSystem;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Network\Receive\Receivable;
-use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
-use Hub\Template\Engine\Xml\ObjectRegistry\XmlObjectRegistryTemplateEngine;
-use Hub\Tools\HubTools;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
+use Org\Shipsimu\Hub\Factory\Registry\Object\ObjectTypeRegistryFactory;
+use Org\Shipsimu\Hub\Factory\State\Node\NodeStateFactory;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\ObjectRegistry\XmlObjectRegistryTemplateEngine;
+use Org\Shipsimu\Hub\Tools\HubTools;
// Import framework stuff
-use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Criteria\Add\AddableCriteria;
-use CoreFramework\Criteria\Local\LocalSearchCriteria;
-use CoreFramework\Criteria\Storing\StoreableCriteria;
-use CoreFramework\Database\Updateable;
-use CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
-use CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Criteria\Add\AddableCriteria;
+use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Database\Updateable;
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\NullPointerException;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Task\Taskable;
/**
* A general hub node class
// Get the UNL array back
$unlInstance = $this->determineUniversalNodeLocator();
+ // Is the instance valid?
+ if (NULL == $unlInstance) {
+ // Throw NPE
+ throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
+ } // END - if
+
// There are 2 UNLs, internal and external.
if ($this->getConfigInstance()->getConfigEntry('allow_publish_internal_address') == 'N') {
// Public "external" UNL address
<?php
// Own namespace
-namespace Hub\Node\Backup;
+namespace Org\Shipsimu\Hub\Node\Backup;
// Import application-specific stuff
-use Hub\Node\BaseHubNode;
-use Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\BaseHubNode;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Handler\Task\HandleableTask;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A hub-node class for the 'List' mode
<?php
// Own namespace
-namespace Hub\Node\Master;
+namespace Org\Shipsimu\Hub\Node\Master;
// Import application-specific stuff
-use Hub\Node\BaseHubNode;
-use Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\BaseHubNode;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Handler\Task\HandleableTask;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A hub-node class for the 'Master' mode
<?php
// Own namespace
-namespace Hub\Node\Regular;
+namespace Org\Shipsimu\Hub\Node\Regular;
// Import application-specific stuff
-use Hub\Node\BaseHubNode;
-use Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\BaseHubNode;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Handler\Task\HandleableTask;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A hub-node class for the 'regular' mode
<?php
// Own namespace
-namespace Hub\Network\Package\Assembler;
+namespace Org\Shipsimu\Hub\Network\Package\Assembler;
// Import hub-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Handler\Chunk\ChunkHandlerFactory;
-use Hub\Generic\BaseHubSystem;
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
-use Hub\Network\Package\Fragment\PackageFragmenter;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Handler\Chunk\ChunkHandlerFactory;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
+use Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A PackageAssembler class to assemble a package content stream fragemented
*/
private function isPackageContentCompleted (array $packageContent) {
// Check both
- $isCompleted = $this->ifStartEndMarkersSet($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]);
+ $isCompleted = $this->ifStartEndMarkersSet($packageContent[HandleableRawData::PACKAGE_RAW_DATA]);
// Return status
return $isCompleted;
public function chunkPackageContent (array $packageContent) {
// Validate the package content array again
assert(
- (isset($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA])) &&
- (isset($packageContent[BaseRawDataHandler::PACKAGE_ERROR_CODE]))
+ (isset($packageContent[HandleableRawData::PACKAGE_RAW_DATA])) &&
+ (isset($packageContent[HandleableRawData::PACKAGE_ERROR_CODE]))
);
// Construct call-back name from package error code
- $this->callbacks[$packageContent[BaseRawDataHandler::PACKAGE_ERROR_CODE]] = 'handlePackageBy' . self::convertToClassName($packageContent[BaseRawDataHandler::PACKAGE_ERROR_CODE]);
+ $this->callbacks[$packageContent[HandleableRawData::PACKAGE_ERROR_CODE]] = 'handlePackageBy' . self::convertToClassName($packageContent[HandleableRawData::PACKAGE_ERROR_CODE]);
// Abort if the call-back method is not there
- if (!method_exists($this, $this->callbacks[$packageContent[BaseRawDataHandler::PACKAGE_ERROR_CODE]])) {
+ if (!method_exists($this, $this->callbacks[$packageContent[HandleableRawData::PACKAGE_ERROR_CODE]])) {
// Throw an exception
- throw new UnsupportedPackageCodeHandlerException(array($this, $this->callbacks[$packageContent[BaseRawDataHandler::PACKAGE_ERROR_CODE]], $packageContent), self::EXCEPTION_UNSUPPORTED_PACKAGE_CODE_HANDLER);
+ throw new UnsupportedPackageCodeHandlerException(array($this, $this->callbacks[$packageContent[HandleableRawData::PACKAGE_ERROR_CODE]], $packageContent), self::EXCEPTION_UNSUPPORTED_PACKAGE_CODE_HANDLER);
} // END - if
// Call it back
- call_user_func(array($this, $this->callbacks[$packageContent[BaseRawDataHandler::PACKAGE_ERROR_CODE]]), $packageContent);
+ call_user_func(array($this, $this->callbacks[$packageContent[HandleableRawData::PACKAGE_ERROR_CODE]]), $packageContent);
}
/**************************************************************************
*/
private function handlePackageByUnhandledPackage (array $packageContent) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: packageData[' . BaseRawDataHandler::PACKAGE_RAW_DATA . ']=' . $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: packageData[' . HandleableRawData::PACKAGE_RAW_DATA . ']=' . $packageContent[HandleableRawData::PACKAGE_RAW_DATA]);
// Check for some conditions
if ((!$this->ifInputBufferIsEmpty()) || (!$this->isPackageContentCompleted($packageContent))) {
// Last chunk is not valid, so wait for more
- $this->pendingData .= $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA];
+ $this->pendingData .= $packageContent[HandleableRawData::PACKAGE_RAW_DATA];
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Partial data received. Waiting for more ... ( ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes)');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Partial data received. Waiting for more ... ( ' . strlen($packageContent[HandleableRawData::PACKAGE_RAW_DATA]) . ' bytes)');
} else {
// Debug message
//* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: packageContent=' . print_r($packageContent, TRUE) . ',chunks='.print_r($chunks, TRUE));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Pending data of ' . strlen($this->pendingData) . ' Bytes are incomplete, waiting for more ...');
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: this->pendingData=' . $this->pendingData);
return;
- } elseif (substr_count($this->pendingData, BaseRawDataHandler::STREAM_START_MARKER) > 1) {
+ } elseif (substr_count($this->pendingData, HandleableRawData::STREAM_START_MARKER) > 1) {
/*
* Multiple messages found, so split off first message as the input
* stream can only handle one message per time.
*/
- foreach (explode(BaseRawDataHandler::STREAM_START_MARKER, $this->pendingData) as $message) {
+ foreach (explode(HandleableRawData::STREAM_START_MARKER, $this->pendingData) as $message) {
// Prepend start marker again as it is needed to decode the message.
- $message = BaseRawDataHandler::STREAM_START_MARKER . $message;
+ $message = HandleableRawData::STREAM_START_MARKER . $message;
// Push it on stack
$this->getStackInstance()->pushNamed(self::STACKER_NAME_MULTIPLE_MESSAGE, $message);
// Init fake array
$packageContent = array(
- BaseRawDataHandler::PACKAGE_RAW_DATA => $this->getInputStreamInstance()->streamData($this->pendingData),
- BaseRawDataHandler::PACKAGE_ERROR_CODE => StorableSocket::SOCKET_ERROR_UNHANDLED
+ HandleableRawData::PACKAGE_RAW_DATA => $this->getInputStreamInstance()->streamData($this->pendingData),
+ HandleableRawData::PACKAGE_ERROR_CODE => StorableSocket::SOCKET_ERROR_UNHANDLED
);
/*
$this->clearPendingData();
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Last block of partial data received. A total of ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes has been received.');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Last block of partial data received. A total of ' . strlen($packageContent[HandleableRawData::PACKAGE_RAW_DATA]) . ' bytes has been received.');
// Make sure last CHUNK_SEPARATOR is not there
- if (substr($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA], -1, 1) == PackageFragmenter::CHUNK_SEPARATOR) {
+ if (substr($packageContent[HandleableRawData::PACKAGE_RAW_DATA], -1, 1) == PackageFragmenter::CHUNK_SEPARATOR) {
// Remove it
- $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA] = substr($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA], 0, -1);
+ $packageContent[HandleableRawData::PACKAGE_RAW_DATA] = substr($packageContent[HandleableRawData::PACKAGE_RAW_DATA], 0, -1);
} // END - if
/*
* array of chunks. These chunks must then be verified by their
* checksums. Also the final chunk must be handled.
*/
- $chunks = explode(PackageFragmenter::CHUNK_SEPARATOR, $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]);
+ $chunks = explode(PackageFragmenter::CHUNK_SEPARATOR, $packageContent[HandleableRawData::PACKAGE_RAW_DATA]);
// Add all chunks because the last final chunk is found
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-ASSEMBLER: Going to add ' . count($chunks) . ' to chunk handler ...');
<?php
// Own namespace
-namespace Hub\Network\Package;
+namespace Org\Shipsimu\Hub\Network\Package;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
-use Hub\Factory\Assembler\Package\PackageAssemblerFactory;
-use Hub\Factory\Dht\DhtObjectFactory;
-use Hub\Factory\Discovery\Package\PackageDiscoveryFactory;
-use Hub\Factory\Discovery\Socket\SocketDiscoveryFactory;
-use Hub\Factory\Information\Connection\ConnectionInfoFactory;
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Generic\BaseHubSystem;
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Helper\HubHelper;
-use Hub\Information\ShareableInfo;
-use Hub\Network\Deliver\Deliverable;
-use Hub\Network\Networkable;
-use Hub\Network\Package\Fragment\PackageFragmenter;
-use Hub\Network\Receive\Receivable;
-use Hub\Tag\Tagable;
-use Hub\Tools\HubTools;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Org\Shipsimu\Hub\Factory\Assembler\Package\PackageAssemblerFactory;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\Discovery\Package\PackageDiscoveryFactory;
+use Org\Shipsimu\Hub\Factory\Discovery\Socket\SocketDiscoveryFactory;
+use Org\Shipsimu\Hub\Factory\Information\Connection\ConnectionInfoFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Helper\HubHelper;
+use Org\Shipsimu\Hub\Information\ShareableInfo;
+use Org\Shipsimu\Hub\Network\Deliver\Deliverable;
+use Org\Shipsimu\Hub\Network\Networkable;
+use Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Tag\Tagable;
+use Org\Shipsimu\Hub\Tools\HubTools;
// Import framework stuff
-use CoreFramework\Compressor\Compressor;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Factory\Registry\Socket\SocketRegistryFactory;
-use CoreFramework\Feature\FrameworkFeature;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Socket\InvalidSocketException;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Compressor\Compressor;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Registry\Socket\SocketRegistryFactory;
+use Org\Mxchange\CoreFramework\Feature\FrameworkFeature;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
// Import SPL stuff
use \Iterator;
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
+
+ // The socket needs to be put in a special registry that can handle such data
+ $registryInstance = SocketRegistryFactory::createSocketRegistryInstance();
+
+ // Set it here
+ $this->setRegistryInstance($registryInstance);
}
/**
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' after discoverSocket() has been called.');
- // The socket needs to be put in a special registry that can handle such data
- $registryInstance = SocketRegistryFactory::createSocketRegistryInstance();
-
// Get the connection helper from registry
$helperInstance = Registry::getRegistry()->getInstance('connection');
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Reached line ' . __LINE__ . ' before isSocketRegistered() has been called.');
// Is it not there?
- if (($socketInstance->isValidSocket()) && (!$registryInstance->isSocketRegistered($infoInstance, $socketInstance))) {
+ if (($socketInstance->isValidSocket()) && (!$this->getRegistryInstance()->isSocketRegistered($infoInstance, $socketInstance))) {
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Registering socket ' . $socketInstance . ' ...');
// Then register it
- $registryInstance->registerSocketInstance($infoInstance, $socketInstance, $packageData);
+ $this->getRegistryInstance()->registerSocketInstance($infoInstance, $socketInstance, $packageData);
} elseif (!$helperInstance->getStateInstance()->isPeerStateConnected()) {
// Is not connected, then we cannot send
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Unexpected peer state ' . $helperInstance->getStateInstance()->__toString() . ' detected.');
* @return void
*/
private function sendOutgoingRawPackageData (array $packageData) {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: packageData()=%d - CALLED!', count($packageData)));
+
// Init sent bytes
$sentBytes = 0;
// Get the right connection instance
- $infoInstance = SocketRegistryFactory::createSocketRegistryInstance()->getInfoInstanceFromPackageData($packageData);
+ $infoInstance = $this->getRegistryInstance()->getInfoInstanceFromPackageData($packageData);
// Test helper instance
assert($infoInstance instanceof ShareableInfo);
// Sent out package data
$helperInstance->sendRawPackageData($packageData);
+
+ // Debug message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
}
/**
} // END - if
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: sentBytes[%s]=%d', gettype($sentBytes), $sentBytes));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: sentBytes[%s]=%d', gettype($sentBytes), $sentBytes));
// If there was an error, don't continue here
if (($sentBytes === 0) && (strlen($encodedDataArray[self::RAW_INDEX_ENCODED_DATA]) > 0)) {
// Nothing sent means all data has been sent
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
return;
- } elseif (strlen($encodedDataArray[self::RAW_INDEX_ENCODED_DATA]) <= 0) {
+ } elseif (strlen($encodedDataArray[self::RAW_INDEX_ENCODED_DATA]) == 0) {
// Abort here, all sent!
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
return;
}
+ // Debug message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Pushing raw data back to stacker, as still some data is pending delivery.');
+
// Push array back in stack
$this->getStackInstance()->pushNamed(self::STACKER_NAME_OUTGOING_STREAM, $encodedDataArray);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
}
///////////////////////////////////////////////////////////////////////////
// Make sure both array elements are there
assert(
(is_array($decodedData)) &&
- (isset($decodedData[BaseRawDataHandler::PACKAGE_RAW_DATA])) &&
- (isset($decodedData[BaseRawDataHandler::PACKAGE_ERROR_CODE]))
+ (isset($decodedData[HandleableRawData::PACKAGE_RAW_DATA])) &&
+ (isset($decodedData[HandleableRawData::PACKAGE_ERROR_CODE]))
);
/*
* Also make sure the error code is SOCKET_ERROR_UNHANDLED because we
* only want to handle unhandled packages here.
*/
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: errorCode=' . $decodedData[BaseRawDataHandler::PACKAGE_ERROR_CODE] . '(' . StorableSocket::SOCKET_ERROR_UNHANDLED . ')');
- assert($decodedData[BaseRawDataHandler::PACKAGE_ERROR_CODE] == StorableSocket::SOCKET_ERROR_UNHANDLED);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: errorCode=' . $decodedData[HandleableRawData::PACKAGE_ERROR_CODE] . '(' . StorableSocket::SOCKET_ERROR_UNHANDLED . ')');
+ assert($decodedData[HandleableRawData::PACKAGE_ERROR_CODE] == StorableSocket::SOCKET_ERROR_UNHANDLED);
// Remove the last chunk SEPARATOR (because there is no need for it)
- if (substr($decodedData[BaseRawDataHandler::PACKAGE_RAW_DATA], -1, 1) == PackageFragmenter::CHUNK_SEPARATOR) {
+ if (substr($decodedData[HandleableRawData::PACKAGE_RAW_DATA], -1, 1) == PackageFragmenter::CHUNK_SEPARATOR) {
// It is there and should be removed
- $decodedData[BaseRawDataHandler::PACKAGE_RAW_DATA] = substr($decodedData[BaseRawDataHandler::PACKAGE_RAW_DATA], 0, -1);
+ $decodedData[HandleableRawData::PACKAGE_RAW_DATA] = substr($decodedData[HandleableRawData::PACKAGE_RAW_DATA], 0, -1);
} // END - if
// This package is "handled" and can be pushed on the next stack
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Pushing ' . strlen($decodedData[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes to stack ' . self::STACKER_NAME_DECODED_HANDLED . ' ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Pushing ' . strlen($decodedData[HandleableRawData::PACKAGE_RAW_DATA]) . ' bytes to stack ' . self::STACKER_NAME_DECODED_HANDLED . ' ...');
$this->getStackInstance()->pushNamed(self::STACKER_NAME_DECODED_HANDLED, $decodedData);
}
// Assert on some elements
assert(
(is_array($packageContent)) &&
- (isset($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA])) &&
- (isset($packageContent[BaseRawDataHandler::PACKAGE_ERROR_CODE]))
+ (isset($packageContent[HandleableRawData::PACKAGE_RAW_DATA])) &&
+ (isset($packageContent[HandleableRawData::PACKAGE_ERROR_CODE]))
);
// Start assembling the raw package data array by chunking it
$this->getStackInstance()->popNamed(self::STACKER_NAME_DECODED_HANDLED);
// ... and push it on the 'chunked' stacker
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Pushing ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes on stack ' . self::STACKER_NAME_DECODED_CHUNKED . ',packageContent=' . print_r($packageContent, TRUE));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Pushing ' . strlen($packageContent[HandleableRawData::PACKAGE_RAW_DATA]) . ' bytes on stack ' . self::STACKER_NAME_DECODED_CHUNKED . ',packageContent=' . print_r($packageContent, TRUE));
$this->getStackInstance()->pushNamed(self::STACKER_NAME_DECODED_CHUNKED, $packageContent);
}
<?php
// Own namespace
-namespace Hub\Network\Package\Fragment;
+namespace Org\Shipsimu\Hub\Network\Package\Fragment;
// Import application-specific stuff
-use Hub\Generic\BaseHubSystem;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A PackageFragmenter class to fragment package data into smaller chunks for
<?php
// Own namespace
-namespace Hub\Pool;
+namespace Org\Shipsimu\Hub\Pool;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
-use Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Pool\Poolable;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A general pool class
<?php
// Own namespace
-namespace Hub\Pool\Listener;
+namespace Org\Shipsimu\Hub\Pool\Listener;
// Import application-specific stuff
-use Hub\Helper\Node\NodeHelper;
-use Hub\Listener\Listenable;
-use Hub\Pool\BasePool;
-use Hub\Pool\Listener\PoolableListener;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Pool\BasePool;
+use Org\Shipsimu\Hub\Pool\Listener\PoolableListener;
// Import framework stuff
<?php
// Own namespace
-namespace Hub\Pool\Peer;
+namespace Org\Shipsimu\Hub\Pool\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Connection\InvalidConnectionTypeException;
-use Hub\Factory\Handler\Protocol\ProtocolHandlerFactory;
-use Hub\Listener\Listenable;
-use Hub\Locator\Node\LocateableNode;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Pool\BasePool;
-use Hub\Pool\Poolable;
-use Hub\Pool\Peer\PoolablePeer;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Connection\InvalidConnectionTypeException;
+use Org\Shipsimu\Hub\Factory\Handler\Protocol\ProtocolHandlerFactory;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Pool\BasePool;
+use Org\Shipsimu\Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Pool\Peer\PoolablePeer;
// Import framework stuff
-use CoreFramework\Socket\InvalidSocketException;
+use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
// Import SPL stuff
use \LogicException;
<?php
// Own namespace
-namespace Hub\Producer;
+namespace Org\Shipsimu\Hub\Producer;
// Import application-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A general Producer class
<?php
// Own namespace
-namespace Hub\Producer\Cruncher\Key;
+namespace Org\Shipsimu\Hub\Producer\Cruncher\Key;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A CruncherKey producer class
$this->getIteratorInstance()->next();
}
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\Cruncher\Producer\Unit;
+namespace Org\Shipsimu\Hub\Cruncher\Producer\Unit;
// Import framework stuff
-use CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A CruncherTestUnit producer class
$this->partialStub('Maybe implement this method?');
}
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\Miner\Producer\Block\Genesis;
+namespace Org\Shipsimu\Hub\Miner\Producer\Block\Genesis;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A MinerRealGenesisBlock producer class
use Hub\Network\Recipient\BaseRecipient;
// Import framework stuff
-use CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Lists\Listable;
/**
* A ??? recipient
<?php
// Own namespace
-namespace Hub\Network\Recipient;
+namespace Org\Shipsimu\Hub\Network\Recipient;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A general Recipient class
<?php
// Own namespace
-namespace Hub\Network\Recipient\Dht;
+namespace Org\Shipsimu\Hub\Network\Recipient\Dht;
// Import application-specific stuff
-use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Network\Recipient\BaseRecipient;
-use Hub\Network\Recipient\Recipient;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Network\Recipient\BaseRecipient;
+use Org\Shipsimu\Hub\Network\Recipient\Recipient;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Lists\Listable;
/**
* A DHT recipient
<?php
// Own namespace
-namespace Hub\Network\Recipient\Direct;
+namespace Org\Shipsimu\Hub\Network\Recipient\Direct;
// Import hub-specific sutff
-use Hub\Network\Package\NetworkPackage;
-use Hub\Network\Recipient\BaseRecipient;
-use Hub\Network\Recipient\Recipient;
-use Hub\Tools\HubTools;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Network\Recipient\BaseRecipient;
+use Org\Shipsimu\Hub\Network\Recipient\Recipient;
+use Org\Shipsimu\Hub\Tools\HubTools;
// Import framework stuff
-use CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Lists\Listable;
/**
* A Direct recipient
<?php
// Own namespace
-namespace Hub\Network\Recipient\Loopback;
+namespace Org\Shipsimu\Hub\Network\Recipient\Loopback;
// Import hub-specific sutff
-use Hub\Network\Package\NetworkPackage;
-use Hub\Network\Recipient\BaseRecipient;
-use Hub\Network\Recipient\Recipient;
-use Hub\Tools\HubTools;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Network\Recipient\BaseRecipient;
+use Org\Shipsimu\Hub\Network\Recipient\Recipient;
+use Org\Shipsimu\Hub\Tools\HubTools;
// Import framework stuff
-use CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Lists\Listable;
/**
* A Self recipient
<?php
// Own namespace
-namespace Hub\Network\Recipient\Upper;
+namespace Org\Shipsimu\Hub\Network\Recipient\Upper;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Network\Recipient\BaseRecipient;
-use Hub\Network\Recipient\Recipient;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Network\Recipient\BaseRecipient;
+use Org\Shipsimu\Hub\Network\Recipient\Recipient;
// Import framework stuff
-use CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Lists\Listable;
/**
* A Upper recipient
<?php
// Own namespace
-namespace Hub\Registry\Object;
+namespace Org\Shipsimu\Hub\Registry\Object;
// Imported framework stuff
-use CoreFramework\Registry\BaseRegistry;
-use CoreFramework\Registry\Register;
+use Org\Mxchange\CoreFramework\Registry\BaseRegistry;
+use Org\Mxchange\CoreFramework\Registry\Register;
/**
* A ObjectType registry
<?php
// Own namespace
-namespace Hub\Registry\Socket;
+namespace Org\Shipsimu\Hub\Registry\Socket;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Information\Connection\ConnectionInfoFactory;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Information\ShareableInfo;
-use Hub\Listener\BaseListener;
-use Hub\Listener\Listenable;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Registry\Socket\RegisterableSocket;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Information\Connection\ConnectionInfoFactory;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Information\ShareableInfo;
+use Org\Shipsimu\Hub\Listener\BaseListener;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Registry\Socket\RegisterableSocket;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\BaseRegistry;
-use CoreFramework\Registry\Register;
-use CoreFramework\Registry\Sub\SubRegistry;
-use CoreFramework\Socket\SocketAlreadyRegisteredException;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+use Org\Mxchange\CoreFramework\Registry\BaseRegistry;
+use Org\Mxchange\CoreFramework\Registry\Register;
+use Org\Mxchange\CoreFramework\Registry\Sub\SubRegistry;
+use Org\Mxchange\CoreFramework\Socket\SocketAlreadyRegisteredException;
/**
* A Socket registry
// Also register all instances from info instance in socket
$socketInstance->registerInfoInstance($infoInstance);
+
+ // Trace message
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: EXIT!');
}
/**
return $infoInstance;
}
+ /**
+ * Checks whether a socket of a connection type 'incoming' is registered.
+ *
+ * @return $isRegistered Whether such a socket is registered
+ * @todo 0% done
+ */
+ public function isIncomingSocketRegistered () {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: CALLED!');
+
+ // Default is not found
+ $isRegistered = FALSE;
+
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-REGISTRY: isRegistered=%d - EXIT!', intval($isRegistered)));
+
+ // Return status
+ return $isRegistered;
+ }
+
}
<?php
// Own namespace
-namespace Hub\Resolver\Command;
+namespace Org\Shipsimu\Hub\Resolver\Command;
// Import Framework stuff
-use CoreFramework\Manager\ManageableApplication;
-use CoreFramework\Resolver\Command\BaseCommandResolver;
-use CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
+use Org\Mxchange\CoreFramework\Resolver\Command\BaseCommandResolver;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
/**
* A command resolver for local (non-hubbed) web commands
if (empty($commandName)) {
// Then thrown an exception here
throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
- } elseif ($resolverInstance->isCommandValid('Hub\Command', $commandName) === FALSE) {
+ } elseif ($resolverInstance->isCommandValid('Org\Shipsimu\Hub\Command', $commandName) === FALSE) {
// Invalid command found
throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);
}
// Set namespace and application instance
- $resolverInstance->setNamespace('Hub\Command');
+ $resolverInstance->setNamespace('Org\Shipsimu\Hub\Command');
$resolverInstance->setApplicationInstance($applicationInstance);
// Return the prepared instance
<?php
// Own namespace
-namespace Hub\Resolver\Command;
+namespace Org\Shipsimu\Hub\Resolver\Command;
// Import Framework stuff
-use CoreFramework\Manager\ManageableApplication;
-use CoreFramework\Resolver\Command\BaseCommandResolver;
-use CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
+use Org\Mxchange\CoreFramework\Resolver\Command\BaseCommandResolver;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
/**
* A command resolver for HTML commands
if (empty($commandName)) {
// Then thrown an exception here
throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
- } elseif ($resolverInstance->isCommandValid('Hub\Command', $commandName) === FALSE) {
+ } elseif ($resolverInstance->isCommandValid('Org\Shipsimu\Hub\Command', $commandName) === FALSE) {
// Invalid command found
throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);
}
// Set namespace and application instance
- $resolverInstance->setNamespace('Hub\Command');
+ $resolverInstance->setNamespace('Org\Shipsimu\Hub\Command');
$resolverInstance->setApplicationInstance($applicationInstance);
// Return the prepared instance
<?php
// Own namespace
-namespace Hub\Resolver\Controller;
+namespace Org\Shipsimu\Hub\Resolver\Controller;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Manager\ManageableApplication;
-use CoreFramework\Resolver\Controller\BaseControllerResolver;
-use CoreFramework\Resolver\Controller\ControllerResolver;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
+use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
+use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
/**
* A resolver for resolving controllers locally
if (empty($controllerName)) {
// Then thrown an exception here
throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
- } elseif ($resolverInstance->isControllerValid('Hub\Controller', $controllerName) === false) {
+ } elseif ($resolverInstance->isControllerValid('Org\Shipsimu\Hub\Controller', $controllerName) === false) {
// Invalid command found
throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
}
$resolverInstance->setApplicationInstance($applicationInstance);
// Set namespace and command name
- $resolverInstance->setNamespace('Hub\Controller');
+ $resolverInstance->setNamespace('Org\Shipsimu\Hub\Controller');
$resolverInstance->setControllerName($controllerName);
// Return the prepared instance
<?php
// Own namespace
-namespace Hub\Resolver\Controller;
+namespace Org\Shipsimu\Hub\Resolver\Controller;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Manager\ManageableApplication;
-use CoreFramework\Resolver\Controller\BaseControllerResolver;
-use CoreFramework\Resolver\Controller\ControllerResolver;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
+use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
+use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
/**
* A resolver for resolving controllers locally
if (empty($controllerName)) {
// Then thrown an exception here
throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
- } elseif ($resolverInstance->isControllerValid('Hub\Controller', $controllerName) === false) {
+ } elseif ($resolverInstance->isControllerValid('Org\Shipsimu\Hub\Controller', $controllerName) === false) {
// Invalid command found
throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
}
$resolverInstance->setApplicationInstance($applicationInstance);
// Set namespace and command name
- $resolverInstance->setNamespace('Hub\Controller');
+ $resolverInstance->setNamespace('Org\Shipsimu\Hub\Controller');
$resolverInstance->setControllerName($controllerName);
// Return the prepared instance
<?php
// Own namespace
-namespace Hub\Resolver\Protocol;
+namespace Org\Shipsimu\Hub\Resolver\Protocol;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A generic protocol resolver class
<?php
// Own namespace
-namespace Hub\Resolver\Protocol\Tcp;
+namespace Org\Shipsimu\Hub\Resolver\Protocol\Tcp;
// Import application-specific stuff
-use Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
-use Hub\Factory\Network\Locator\UniversalNodeLocatorFactory;
-use Hub\Helper\Node\NodeHelper;
-use Hub\Resolver\Protocol\BaseProtocolResolver;
-use Hub\Resolver\Protocol\ProtocolResolver;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
+use Org\Shipsimu\Hub\Factory\Network\Locator\UniversalNodeLocatorFactory;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Resolver\Protocol\BaseProtocolResolver;
+use Org\Shipsimu\Hub\Resolver\Protocol\ProtocolResolver;
// Import framework stuff
-use CoreFramework\Console\Tools\ConsoleTools;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Console\Tools\ConsoleTools;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A TCP protocol resolver class
<?php
// Own namespace
-namespace Hub\Resolver\State;
+namespace Org\Shipsimu\Hub\Resolver\State;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Resolver\BaseResolver;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Resolver\BaseResolver;
/**
* A generic state resolver class
<?php
// Own namespace
-namespace Hub\Resolver\State\Peer;
+namespace Org\Shipsimu\Hub\Resolver\State\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\State\Peer\PeerStateFactory;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Resolver\State\BaseStateResolver;
-use Hub\Resolver\State\StateResolver;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\State\Peer\PeerStateFactory;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Resolver\State\BaseStateResolver;
+use Org\Shipsimu\Hub\Resolver\State\StateResolver;
// Import framework stuff
-use CoreFramework\Socket\InvalidSocketException;
+use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
/**
* A resolver for resolving peer states locally
<?php
// Own namespace
-namespace Hub\Scanner;
+namespace Org\Shipsimu\Hub\Scanner;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A general Scanner class
<?php
// Own namespace
-namespace Hub\Crawler\Scanner\UploadedList;
+namespace Org\Shipsimu\Hub\Crawler\Scanner\UploadedList;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A UploadedList scanner class for crawlers
<?php
// Own namespace
-namespace Hub\Source;
+namespace Org\Shipsimu\Hub\Source;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
/**
* A general Source class
<?php
// Own namespace
-namespace Hub\Source\Unit;
+namespace Org\Shipsimu\Hub\Source\Unit;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A TestUnit source class
<?php
// Own namespace
-namespace Hub\Crawler\Source\FoundRss;
+namespace Org\Shipsimu\Hub\Crawler\Source\FoundRss;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A FoundRss URL source class for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Source\LocalStart;
+namespace Org\Shipsimu\Hub\Crawler\Source\LocalStart;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A ??? URL source class for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Source\RssStart;
+namespace Org\Shipsimu\Hub\Crawler\Source\RssStart;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A RssStart URL source class for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Source\Url\UploadList;
+namespace Org\Shipsimu\Hub\Crawler\Source\Url\UploadList;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\NullPointerException;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\NullPointerException;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A UploadedList URL source class for crawlers
<?php
// Own namespace
-namespace Hub\State\Communicator;
+namespace Org\Shipsimu\Hub\State\Communicator;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A active communicator state class
<?php
// Own namespace
-namespace Hub\Communicator\State;
+namespace Org\Shipsimu\Hub\Communicator\State;
// Import framework stuff
-use CoreFramework\State\BaseState;
+use Org\Mxchange\CoreFramework\State\BaseState;
/**
* A general communicator state class
namespace Hub\State\Communicator\;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A ??? communicator state class
<?php
// Own namespace
-namespace Hub\State\Communicator;
+namespace Org\Shipsimu\Hub\State\Communicator;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A init communicator state class
public function executeState (Executor $executorInstance) {
}
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\State\Crawler;
+namespace Org\Shipsimu\Hub\State\Crawler;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A active crawler state class
$this->partialStub('Unfinished method, executorInstance=' . $executorInstance->__toString());
}
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\State\Crawler;
+namespace Org\Shipsimu\Hub\State\Crawler;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A booting crawler state class
$this->partialStub('Unfinished method, executorInstance=' . $executorInstance->__toString());
}
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\Crawler\State;
+namespace Org\Shipsimu\Hub\Crawler\State;
// Import framework stuff
-use CoreFramework\State\BaseState;
+use Org\Mxchange\CoreFramework\State\BaseState;
/**
* A general crawler state class
namespace Hub\State\Crawler\;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A ??? crawler state class
<?php
// Own namespace
-namespace Hub\State\Crawler;
+namespace Org\Shipsimu\Hub\State\Crawler;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A init crawler state class
CrawlerStateFactory::createCrawlerStateInstanceByName('booting');
}
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\Cruncher\State;
+namespace Org\Shipsimu\Hub\Cruncher\State;
// Import framework stuff
-use CoreFramework\State\BaseState;
+use Org\Mxchange\CoreFramework\State\BaseState;
/**
* A general cruncher state class
namespace Hub\State\Cruncher\;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A ??? cruncher state class
<?php
// Own namespace
-namespace Hub\State\Cruncher;
+namespace Org\Shipsimu\Hub\State\Cruncher;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Init cruncher state class
CruncherStateFactory::createCruncherStateInstanceByName('virgin');
}
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\State\Cruncher;
+namespace Org\Shipsimu\Hub\State\Cruncher;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Virgin cruncher state class
$executorInstance->produceKeys($this);
}
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\State\Dht;
+namespace Org\Shipsimu\Hub\State\Dht;
// Import application-specific stuff
-use Hub\Dht\Distributable;
+use Org\Shipsimu\Hub\Dht\Distributable;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Active dht state class
<?php
// Own namespace
-namespace Hub\State\Dht;
+namespace Org\Shipsimu\Hub\State\Dht;
// Import application-specific stuff
-use Hub\Dht\Distributable;
+use Org\Shipsimu\Hub\Dht\Distributable;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Booting dht state class
<?php
// Own namespace
-namespace Hub\State\Dht;
+namespace Org\Shipsimu\Hub\State\Dht;
// Import framework stuff
-use CoreFramework\State\BaseState;
+use Org\Mxchange\CoreFramework\State\BaseState;
/**
* A general DHT state class
use Hub\Dht\Distributable;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A ??? dht state class
<?php
// Own namespace
-namespace Hub\State\Dht;
+namespace Org\Shipsimu\Hub\State\Dht;
// Import application-specific stuff
-use Hub\Dht\Distributable;
-use Hub\Factory\Dht\DhtObjectFactory;
-use Hub\Factory\State\Dht\DhtStateFactory;
+use Org\Shipsimu\Hub\Dht\Distributable;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\State\Dht\DhtStateFactory;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Init dht state class
<?php
// Own namespace
-namespace Hub\State\Dht;
+namespace Org\Shipsimu\Hub\State\Dht;
// Import application-specific stuff
-use Hub\Dht\Distributable;
-use Hub\Factory\Dht\DhtObjectFactory;
-use Hub\Factory\State\Dht\DhtStateFactory;
+use Org\Shipsimu\Hub\Dht\Distributable;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\State\Dht\DhtStateFactory;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Virgin dht state class
<?php
// Own namespace
-namespace Hub\State\Miner;
+namespace Org\Shipsimu\Hub\State\Miner;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Booting miner state class
<?php
// Own namespace
-namespace Hub\Miner\State;
+namespace Org\Shipsimu\Hub\Miner\State;
// Import framework stuff
-use CoreFramework\State\BaseState;
+use Org\Mxchange\CoreFramework\State\BaseState;
/**
* A general miner state class
namespace Hub\State\Miner\;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A ??? miner state class
<?php
// Own namespace
-namespace Hub\State\Miner;
+namespace Org\Shipsimu\Hub\State\Miner;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Init miner state class
MinerStateFactory::createMinerStateInstanceByName('virgin');
}
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\State\Miner;
+namespace Org\Shipsimu\Hub\State\Miner;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Virgin miner state class
$executorInstance->produceKeys($this);
}
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\State\Node;
+namespace Org\Shipsimu\Hub\State\Node;
// Import framework stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Factory\State\Node\NodeStateFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Factory\State\Node\NodeStateFactory;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* An active node state class
<?php
// Own namespace
-namespace Hub\State\Node;
+namespace Org\Shipsimu\Hub\State\Node;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A AnnouncementCompleted node state class
<?php
// Own namespace
-namespace Hub\State\Node;
+namespace Org\Shipsimu\Hub\State\Node;
// Import framework stuff
-use Hub\Factory\State\Node\NodeStateFactory;
+use Org\Shipsimu\Hub\Factory\State\Node\NodeStateFactory;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Announcing node state class
<?php
// Own namespace
-namespace Hub\State\Node;
+namespace Org\Shipsimu\Hub\State\Node;
// Import framework stuff
-use CoreFramework\State\BaseState;
+use Org\Mxchange\CoreFramework\State\BaseState;
/**
* A general node state class
use Hub\Helper\Node\NodeHelper;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A ??? node state class
<?php
// Own namespace
-namespace Hub\State\Node;
+namespace Org\Shipsimu\Hub\State\Node;
// Import framework stuff
-use Hub\Factory\State\Node\NodeStateFactory;
+use Org\Shipsimu\Hub\Factory\State\Node\NodeStateFactory;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A init node state class
<?php
// Own namespace
-namespace Hub\State\Node;
+namespace Org\Shipsimu\Hub\State\Node;
// Import framework stuff
-use Hub\Factory\State\Node\NodeStateFactory;
+use Org\Shipsimu\Hub\Factory\State\Node\NodeStateFactory;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Reachable node state class
<?php
// Own namespace
-namespace Hub\State\Node;
+namespace Org\Shipsimu\Hub\State\Node;
// Import framework stuff
-use Hub\Factory\State\Node\NodeStateFactory;
+use Org\Shipsimu\Hub\Factory\State\Node\NodeStateFactory;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A virgin node state class
use Hub\State\Peer\PeerStateable;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A ??? peer state class
<?php
// Own namespace
-namespace Hub\State\Peer;
+namespace Org\Shipsimu\Hub\State\Peer;
// Import framework stuff
-use CoreFramework\State\BaseState;
+use Org\Mxchange\CoreFramework\State\BaseState;
/**
* A general peer state class
<?php
// Own namespace
-namespace Hub\State\Peer;
+namespace Org\Shipsimu\Hub\State\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\State\Peer\PeerStateable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\State\Peer\PeerStateable;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Connected peer state class
<?php
// Own namespace
-namespace Hub\State\Peer;
+namespace Org\Shipsimu\Hub\State\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\State\Peer\PeerStateable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\State\Peer\PeerStateable;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A ConnectionRefused peer state class
<?php
// Own namespace
-namespace Hub\State\Peer;
+namespace Org\Shipsimu\Hub\State\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\State\Peer\PeerStateable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\State\Peer\PeerStateable;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A ConnectionTimedOut peer state class
<?php
// Own namespace
-namespace Hub\State\Peer;
+namespace Org\Shipsimu\Hub\State\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\State\Peer\PeerStateable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\State\Peer\PeerStateable;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A NoRouteToHost peer state class
<?php
// Own namespace
-namespace Hub\State\Peer;
+namespace Org\Shipsimu\Hub\State\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\State\Peer\PeerStateable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\State\Peer\PeerStateable;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A OperationAlreadyProgress peer state class
<?php
// Own namespace
-namespace Hub\State\Peer;
+namespace Org\Shipsimu\Hub\State\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\State\Peer\PeerStateable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\State\Peer\PeerStateable;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Problem peer state class
<?php
// Own namespace
-namespace Hub\State\Peer;
+namespace Org\Shipsimu\Hub\State\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\State\Peer\PeerStateable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\State\Peer\PeerStateable;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A TransportEndpointGone peer state class
<?php
// Own namespace
-namespace Hub\State\Peer;
+namespace Org\Shipsimu\Hub\State\Peer;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A Init peer state class
<?php
// Own namespace
-namespace Hub\Helper\Connection;
+namespace Org\Shipsimu\Hub\Helper\Connection;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
-use Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
/**
* A helper class for maintaining connection statistics, no instance is
<?php
// Own namespace
-namespace Hub\Stream\Network\Input\RawData;
+namespace Org\Shipsimu\Hub\Stream\Network\Input\RawData;
// Import application-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
// Import framework stuff
-use CoreFramework\Stream\BaseStream;
-use CoreFramework\Stream\Input\InputStream;
+use Org\Mxchange\CoreFramework\Stream\BaseStream;
+use Org\Mxchange\CoreFramework\Stream\Input\InputStream;
/**
* A class for handling incoming (encoded) raw data with start and end markers.
assert($this->ifStartEndMarkersSet($data));
// Count of start and end markers must be the same
- assert(substr_count($data, BaseRawDataHandler::STREAM_START_MARKER) == substr_count($data, BaseRawDataHandler::STREAM_END_MARKER));
+ assert(substr_count($data, HandleableRawData::STREAM_START_MARKER) == substr_count($data, HandleableRawData::STREAM_END_MARKER));
// Check if more than two start markers exist and if so, split it.
- if (substr_count($data, BaseRawDataHandler::STREAM_START_MARKER) > 1) {
+ if (substr_count($data, HandleableRawData::STREAM_START_MARKER) > 1) {
// Please do it outside this method
throw new MultipleMessageSentException(array($this, $data), BaseHubSystem::EXCEPTION_MULTIPLE_MESSAGE_SENT);
} // END - if
// Remove both
- $data = substr($data, strlen(BaseRawDataHandler::STREAM_START_MARKER), -1 * strlen(BaseRawDataHandler::STREAM_END_MARKER));
+ $data = substr($data, strlen(HandleableRawData::STREAM_START_MARKER), -1 * strlen(HandleableRawData::STREAM_END_MARKER));
// Can it be validated?
if ((strlen($data) % 4) != 0) {
<?php
// Own namespace
-namespace Hub\Stream\Network\Output\RawData;
+namespace Org\Shipsimu\Hub\Stream\Network\Output\RawData;
// Import application-specific stuff
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
+use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
// Import framework stuff
-use CoreFramework\Stream\BaseStream;
-use CoreFramework\Stream\Output\OutputStream;
+use Org\Mxchange\CoreFramework\Stream\BaseStream;
+use Org\Mxchange\CoreFramework\Stream\Output\OutputStream;
/**
* A RawDataOutputStream class
* @return $data The data (string mostly) to "stream"
*/
public function streamData ($data) {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-OUTPUT-STREAM: data()=%d - CALLED!', strlen($data)));
+
/*
* Encode the data with BASE64 encoding and put it in a "frame":
*
* [[S]] - Start marker
* [[E]] - End marker
*/
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-OUTPUT-STREAM: data()=' . strlen($data) . ' - BEFORE!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-OUTPUT-STREAM: data(%d)=%s - BEFORE!', strlen($data), $data));
$data = sprintf('%s%s%s',
- BaseRawDataHandler::STREAM_START_MARKER,
+ HandleableRawData::STREAM_START_MARKER,
base64_encode($data),
- BaseRawDataHandler::STREAM_END_MARKER
+ HandleableRawData::STREAM_END_MARKER
);
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAW-OUTPUT-STREAM: data(' . strlen($data) . ')=' . $data);
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-OUTPUT-STREAM: data(%d)=%s - AFTER!', strlen($data), $data));
+
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-OUTPUT-STREAM: data()=%d - EXIT!', strlen($data)));
// Return it
return $data;
<?php
// Own namespace
-namespace Hub\Tag;
+namespace Org\Shipsimu\Hub\Tag;
// Import hub-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A general Tags class
<?php
// Own namespace
-namespace Hub\Tag\Package;
+namespace Org\Shipsimu\Hub\Tag\Package;
// Import application-specific stuff
-use Hub\Factory\Handler\Protocol\ProtocolHandlerFactory;
-use Hub\Factory\Registry\Object\ObjectTypeRegistryFactory;
-use Hub\Listener\Listenable;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Tag\BaseTag;
-use Hub\Tag\Tagable;
-use Hub\Template\Engine\Xml\ObjectRegistry\XmlObjectRegistryTemplateEngine;
+use Org\Shipsimu\Hub\Factory\Handler\Protocol\ProtocolHandlerFactory;
+use Org\Shipsimu\Hub\Factory\Registry\Object\ObjectTypeRegistryFactory;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Tag\BaseTag;
+use Org\Shipsimu\Hub\Tag\Tagable;
+use Org\Shipsimu\Hub\Template\Engine\Xml\ObjectRegistry\XmlObjectRegistryTemplateEngine;
// Import framework stuff
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
/**
* A Package tags class
*/
private function extractTagsFromPackageData (array $packageData) {
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TAGS: packageData=' . print_r($packageData, TRUE));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TAGS: packageData=' . print_r($packageData, TRUE));
/*
* We take a look at the tags (in most cases only one is needed) so
// Extract the tags
$this->extractTagsFromPackageData($packageData);
- // Now we need to verify every single tag
+ // Now every single tag needs to be validated
$this->verifyAllTags($packageData);
// Now simply check it out
namespace Hub\Task\AptProxy\;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ??? task for apt-proxy consoles
<?php
// Own namespace
-namespace Hub\AptProxy\Task\Listener;
+namespace Org\Shipsimu\Hub\AptProxy\Task\Listener;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A proxy listener task for apt-proxy consoles
namespace Hub\Task\Chat\;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ??? task for chat consoles
<?php
// Own namespace
-namespace Hub\Chat\Task\Listener\Telnet;
+namespace Org\Shipsimu\Hub\Chat\Task\Listener\Telnet;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A TelnetListener task for chat consoles
<?php
// Own namespace
-namespace Hub\Task\Source\Url;
+namespace Org\Shipsimu\Hub\Task\Source\Url;
// Import application-specific stuff
-use Hub\Source\Url\UrlSourceObjectFactory;
+use Org\Shipsimu\Hub\Source\Url\UrlSourceObjectFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
/**
* A general URL source Task
namespace Hub\Task\Crawler\;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ??? task for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Task\Communicator\Node;
+namespace Org\Shipsimu\Hub\Crawler\Task\Communicator\Node;
// Import framework stuff
-use CoreFramework\Registry\Registry;
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A NodeCommunicator task for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Parser\Document;
+namespace Org\Shipsimu\Hub\Crawler\Parser\Document;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A DocumentParser task for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Sniffer\Mime;
+namespace Org\Shipsimu\Hub\Crawler\Sniffer\Mime;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A MimeSniffer task for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Ping;
+namespace Org\Shipsimu\Hub\Crawler\Ping;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A Ping task for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Publisher\Job\Remote;
+namespace Org\Shipsimu\Hub\Crawler\Publisher\Job\Remote;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A RemoteJobPublisher task for crawlers
namespace Hub\Task\Crawler\Scanner\;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ??? scanner task for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Task\Scanner\UploadedList;
+namespace Org\Shipsimu\Hub\Crawler\Task\Scanner\UploadedList;
// Import application-specific stuff
-use Hub\Factory\Scanner\ScannerObjectFactory;
+use Org\Shipsimu\Hub\Factory\Scanner\ScannerObjectFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A UploadedList scanner task for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\SnippetExtractor;
+namespace Org\Shipsimu\Hub\Crawler\SnippetExtractor;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A SnippetExtractor task for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Analyzer\DocumentStructure;
+namespace Org\Shipsimu\Hub\Crawler\Analyzer\DocumentStructure;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A StructureAnalyzer task for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Local;
+namespace Org\Shipsimu\Hub\Crawler\Local;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A LocalUrlCrawler task for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Remote;
+namespace Org\Shipsimu\Hub\Crawler\Remote;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A RemoteUrlCrawler task for crawlers
namespace Hub\Task\Crawler\Source\Url\;
// Import framework stuff
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* An URL source task for ??? for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Source\FoundRss;
+namespace Org\Shipsimu\Hub\Crawler\Source\FoundRss;
// Import framework stuff
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* An URL source task for FoundRss for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Source\LocalStart;
+namespace Org\Shipsimu\Hub\Crawler\Source\LocalStart;
// Import framework stuff
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* An URL source task for LocalStart for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Source\RssStart;
+namespace Org\Shipsimu\Hub\Crawler\Source\RssStart;
// Import framework stuff
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* An URL source task for RssStart for crawlers
<?php
// Own namespace
-namespace Hub\Crawler\Source\UploadedList;
+namespace Org\Shipsimu\Hub\Crawler\Source\UploadedList;
// Import framework stuff
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* An URL source task for UploadedList for crawlers
namespace Hub\Task\Cruncher\;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ??? task for crunchers
<?php
// Own namespace
-namespace Hub\Cruncher\Producer\Key;
+namespace Org\Shipsimu\Hub\Cruncher\Producer\Key;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A KeyProducer task for crunchers
<?php
// Own namespace
-namespace Hub\Cruncher\Task\Producer\Unit;
+namespace Org\Shipsimu\Hub\Cruncher\Task\Producer\Unit;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A TestUnitProducer task for crunchers
<?php
// Own namespace
-namespace Hub\Cruncher\Task\Fetcher\WorkUnit;
+namespace Org\Shipsimu\Hub\Cruncher\Task\Fetcher\WorkUnit;
// Import framework stuff
-use CoreFramework\Registry\Registry;
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A WorkUnitFetcher task for crunchers which asks the cruncher to fetch work
<?php
// Own namespace
-namespace Hub\Miner\Task\Fetcher\Block;
+namespace Org\Shipsimu\Hub\Miner\Task\Fetcher\Block;
// Import framework stuff
-use CoreFramework\Registry\Registry;
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A BlockFetcher task for miners which asks the network for new blocks and
<?php
// Own namespace
-namespace Hub\Miner\Task\Producer\GenesisBlock;
+namespace Org\Shipsimu\Hub\Miner\Task\Producer\GenesisBlock;
// Import framework stuff
-use CoreFramework\Registry\Registry;
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A RealGenesisBlockProducer task for miners
<?php
// Own namespace
-namespace Hub\Miner\Task\Producer\GenesisBlock;
+namespace Org\Shipsimu\Hub\Miner\Task\Producer\GenesisBlock;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A TestGenesisBlockProducer task for miners
namespace Hub\Task\Miner\;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ??? task for miners
<?php
// Own namespace
-namespace Hub\Miner\Task\Communicator\Node;
+namespace Org\Shipsimu\Hub\Miner\Task\Communicator\Node;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A MinerCommunicator task for miners
namespace Hub\Task\AptProxy\Task\Network\;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ??? task for NetworkPackage
<?php
// Own namespace
-namespace Hub\Task\Network\Reader;
+namespace Org\Shipsimu\Hub\Task\Network\Reader;
// Import application-specific stuff
-use Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A NetworkPackageReader task
<?php
// Own namespace
-namespace Hub\Task\Network\Writer;
+namespace Org\Shipsimu\Hub\Task\Network\Writer;
// Import application-specific stuff
-use Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A NetworkPackageWriter task
// Do we have something to deliver?
if ($packageInstance->isEncodedDataPending()) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->sendEncodedData() ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->sendEncodedData() ...');
// Sent encoded (raw) data
$packageInstance->sendEncodedData();
} elseif ($packageInstance->isPackageWaitingForDelivery()) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->sendWaitingPackage() ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->sendWaitingPackage() ...');
// Sent it finally out
$packageInstance->sendWaitingPackage();
} elseif ($packageInstance->isPackageDeclared()) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->processDeclaredPackage() ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->processDeclaredPackage() ...');
// Prepare package for delivery
$packageInstance->processDeclaredPackage();
} elseif ($packageInstance->isPackageEnqueued()) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->declareEnqueuedPackage() ...');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-WRITER-TASK: Calling packageInstance->declareEnqueuedPackage() ...');
// Okay, then deliver (better discover its recipients) this package
$packageInstance->declareEnqueuedPackage();
<?php
// Own namespace
-namespace Hub\Node\Task\Announcement;
+namespace Org\Shipsimu\Hub\Node\Task\Announcement;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A Announcement node-task
<?php
// Own namespace
-namespace Hub\Node\Task\Assembler;
+namespace Org\Shipsimu\Hub\Node\Task\Assembler;
// Import application-specific stuff
-use Hub\Factory\Handler\Chunk\ChunkHandlerFactory;
+use Org\Shipsimu\Hub\Factory\Handler\Chunk\ChunkHandlerFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ChunkAssembler node-task
namespace Hub\Node\Task\;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ??? node-task
<?php
// Own namespace
-namespace Hub\Node\Task\Decoder;
+namespace Org\Shipsimu\Hub\Node\Task\Decoder;
// Import application-specific stuff
-use Hub\Factory\Decoder\DecoderFactory;
+use Org\Shipsimu\Hub\Factory\Decoder\DecoderFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A PackageDecoder node-task
namespace Hub\Task\Node\Dht\;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ??? node DHT task
<?php
// Own namespace
-namespace Hub\Node\Task\Dht\Bootstrap;
+namespace Org\Shipsimu\Hub\Node\Task\Dht\Bootstrap;
// Import application-specific stuff
-use Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A DhtBootstrap node-task
<?php
// Own namespace
-namespace Hub\Node\Task\Dht\Initialization;
+namespace Org\Shipsimu\Hub\Node\Task\Dht\Initialization;
// Import application-specific stuff
-use Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A DhtInitialization node-task
<?php
// Own namespace
-namespace Hub\Node\Task\Dht\Bootstrap\Late;
+namespace Org\Shipsimu\Hub\Node\Task\Dht\Bootstrap\Late;
// Import application-specific stuff
-use Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A DhtBootstrap node-task
<?php
// Own namespace
-namespace Hub\Node\Task\Dht\Check\Publication;
+namespace Org\Shipsimu\Hub\Node\Task\Dht\Check\Publication;
// Import application-specific stuff
-use Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A DhtPublicationCheck node-task
<?php
// Own namespace
-namespace Hub\Node\Task\Dht\Publication;
+namespace Org\Shipsimu\Hub\Node\Task\Dht\Publication;
// Import application-specific stuff
-use Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A DhtPublication node-task
<?php
// Own namespace
-namespace Hub\Node\Task\Dht\Query;
+namespace Org\Shipsimu\Hub\Node\Task\Dht\Query;
// Import application-specific stuff
-use Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A DhtQuery node-task
<?php
// Own namespace
-namespace Hub\Node\Task\Listener\Socket;
+namespace Org\Shipsimu\Hub\Node\Task\Listener\Socket;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A HubSocketListener task
<?php
// Own namespace
-namespace Hub\Node\Ping;
+namespace Org\Shipsimu\Hub\Node\Ping;
// Import framework stuff
-use CoreFramework\Lists\Listable;
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A Ping node-task
<?php
// Own namespace
-namespace Hub\Node\Task\SelfConnect;
+namespace Org\Shipsimu\Hub\Node\Task\SelfConnect;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A SelfConnect node-task
<?php
// Own namespace
-namespace Hub\Node\Task\Initialization\Tag;
+namespace Org\Shipsimu\Hub\Node\Task\Initialization\Tag;
// Import application-specific stuff
-use Hub\Factory\Tag\Package\PackageTagsFactory;
+use Org\Shipsimu\Hub\Factory\Tag\Package\PackageTagsFactory;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A PackageTagsInit node-task
<?php
// Own namespace
-namespace Hub\Node\Check\Update;
+namespace Org\Shipsimu\Hub\Node\Check\Update;
// Import framework stuff
-use CoreFramework\Task\BaseTask;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\Visitable;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A UpdateCheck node-task
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\Announcement;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\Announcement;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An Announcement template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\Answer\Announcement;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\Answer\Announcement;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An AnnouncementAnswer template engine class for XML templates
use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An ??? answer template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\Network\Answer;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An generic answer template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\Answer\Dht\Bootstrap;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\Answer\Dht\Bootstrap;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An DhtBootstrapAnswer template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\Answer\Request\NodeList;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\Answer\Request\NodeList;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* A RequestNodeListAnswer template engine class for XML templates
use Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An ??? template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml;
// Import framework stuff
-use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Factory\Template\XmlTemplateEngineFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Template\Engine\BaseTemplateEngine;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Template\Engine\BaseTemplateEngine;
/**
* A generic XML template engine class
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\SelfConnect;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\SelfConnect;
// Import application-specific stuff
-use Hub\Tag\Tagable;
-use Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Shipsimu\Hub\Tag\Tagable;
+use Org\Shipsimu\Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An SelfConnect template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\Dht\Bootstrap;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Bootstrap;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An Bootstrap template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\Request\NodeList;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\Request\NodeList;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An RequestNodeListEntry template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\ObjectRegistry;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\ObjectRegistry;
// Import application-specific stuff
-use Hub\Factory\Registry\Object\ObjectTypeRegistryFactory;
-use Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Shipsimu\Hub\Factory\Registry\Object\ObjectTypeRegistryFactory;
+use Org\Shipsimu\Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registry;
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An ObjectRegistry template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Cruncher\Template\Engine\Xml\TestUnit;
+namespace Org\Shipsimu\Hub\Cruncher\Template\Engine\Xml\TestUnit;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An TestUnit template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\Dht\Publish;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Publish;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An PublishEntry template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\Request\NodeList;
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\Request\NodeList;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/**
* An RequestNodeList template engine class for XML templates
<?php
// Own namespace
-namespace Hub\Tools;
+namespace Org\Shipsimu\Hub\Tools;
// Import application-specific stuff
-use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
-use Hub\Factory\Dht\DhtObjectFactory;
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Generic\BaseHubSystem;
-use Hub\Locator\Node\LocateableNode;
-use Hub\Node\Data\InvalidSessionIdException;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Org\Shipsimu\Hub\Factory\Dht\DhtObjectFactory;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Generic\BaseHubSystem;
+use Org\Shipsimu\Hub\Locator\Node\LocateableNode;
+use Org\Shipsimu\Hub\Node\Data\InvalidSessionIdException;
// Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
-use CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
/**
* This class contains static helper functions for our hub
*/
public static function determineOwnExternalAddress () {
// Is the external_address config entry set?
- if (FrameworkConfiguration::getSelfInstance()->getConfigEntry('external_address') != '') {
+ if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('external_address') != '') {
// Use it as external address
- $unl = FrameworkConfiguration::getSelfInstance()->getConfigEntry('external_address');
+ $unl = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('external_address');
} else {
// Determine own external address by connecting to my (coder) server at 188.138.90.169
$unl = self::determineExternalUniversalNodeLocator();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: CALLED!');
// Is the internal_address config entry set?
- if (FrameworkConfiguration::getSelfInstance()->getConfigEntry('allow_publish_internal_address') == 'N') {
+ if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('allow_publish_internal_address') == 'N') {
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: Calling self::determineOwnExternalAddress() as allow_publish_internal_address=N is set ...');
// Not allowed to publish internal address, so use external
$unl = self::determineOwnExternalAddress();
- } elseif (FrameworkConfiguration::getSelfInstance()->getConfigEntry('internal_address') != '') {
+ } elseif (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('internal_address') != '') {
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: Getting config entry internal_address ...');
// Use it as internal address
- $unl = FrameworkConfiguration::getSelfInstance()->getConfigEntry('internal_address');
+ $unl = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('internal_address');
} else {
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE: Calling self::determineInternalUniversalNodeLocator() ...');
use Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
-use CoreFramework\Visitor\BaseVisitor;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ??? visitor
use Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
-use CoreFramework\Visitor\BaseVisitor;
+use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
/**
* A ??? handler visitor
<?php
// Own namespace
-namespace Hub\Visitor\Monitor\Pool;
+namespace Org\Shipsimu\Hub\Visitor\Monitor\Pool;
// Import application-specific stuff
-use Hub\Listener\Listenable;
-use Hub\Network\Receive\Receivable;
-use Hub\Pool\Poolable;
-use Hub\Visitor\Listener\ListenerVisitor;
-use Hub\Visitor\Pool\PoolVisitor;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Visitor\Listener\ListenerVisitor;
+use Org\Shipsimu\Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
-use CoreFramework\Generic\BaseDecorator;
-use CoreFramework\Visitor\BaseVisitor;
+use Org\Mxchange\CoreFramework\Generic\BaseDecorator;
+use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
/**
* A RawDataMonitor visitor
*/
public function visitPool (Poolable $poolInstance) {
// A pool doesn't normally have any raw data waiting
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: poolInstance=' . $poolInstance->__toString() . ' - CALLED!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: poolInstance=' . $poolInstance->__toString() . ' - CALLED!');
}
/**
* @return void
*/
public function visitListener (Listenable $listenerInstance) {
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: listenerInstance=' . $listenerInstance->__toString() . ' - CALLED!');
+
/*
- * The listener itself cannot distinguish between node and client
- * traffic. This is why its method monitorIncomingRawData() is not
- * called.
+ * The TCP/UDP listener have a socket registry instance set. These
+ * registered sockets needs to be checked for pending incoming data.
*/
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: listenerInstance=' . $listenerInstance->__toString() . ' - CALLED!');
+ $listenerInstance->monitorIncomingRawData();
+
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: EXIT!');
}
/**
*/
public function visitDecorator (BaseDecorator $decoratorInstance) {
// Do monitor here
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: Visiting decoratorInstance=' . $decoratorInstance->__toString() . ' - CALLED!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: Visiting decoratorInstance=' . $decoratorInstance->__toString() . ' - CALLED!');
$decoratorInstance->monitorIncomingRawData();
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: Visiting decoratorInstance=' . $decoratorInstance->__toString() . ' - EXIT!');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: EXIT!');
}
}
use Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
-use CoreFramework\Visitor\BaseVisitor;
+use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
/**
* A ??? shutdown visitor
<?php
// Own namespace
-namespace Hub\Visitor\Pool\Listener;
+namespace Org\Shipsimu\Hub\Visitor\Pool\Listener;
// Import application-specific stuff
-use Hub\Listener\Listenable;
-use Hub\Pool\Poolable;
-use Hub\Visitor\Pool\PoolVisitor;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
-use CoreFramework\Visitor\BaseVisitor;
+use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
/**
* A ListenerPool shutdown visitor
<?php
// Own namespace
-namespace Hub\Visitor\Shutdown\Socket;
+namespace Org\Shipsimu\Hub\Visitor\Shutdown\Socket;
// Import application-specific stuff
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Network\Deliver\Deliverable;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Network\Deliver\Deliverable;
// Import framework stuff
-use CoreFramework\Visitor\BaseVisitor;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A HalfShutdownSocket visitor
<?php
// Own namespace
-namespace Hub\Visitor\Shutdown\Socket;
+namespace Org\Shipsimu\Hub\Visitor\Shutdown\Socket;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Network\Deliver\Deliverable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Network\Deliver\Deliverable;
// Import framework stuff
-use CoreFramework\Visitor\BaseVisitor;
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* A ShutdownSocket visitor
<?php
// Own namespace
-namespace Hub\Visitor\Task\Active;
+namespace Org\Shipsimu\Hub\Visitor\Task\Active;
// Import application-specific stuff
-use Hub\Listener\Listenable;
-use Hub\Pool\Poolable;
-use Hub\Visitor\Listener\ListenerVisitor;
-use Hub\Visitor\Pool\PoolVisitor;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Visitor\Listener\ListenerVisitor;
+use Org\Shipsimu\Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
-use CoreFramework\Generic\BaseDecorator;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\BaseVisitor;
-use CoreFramework\Visitor\Decorator\DecoratorVisitor;
-use CoreFramework\Visitor\Task\TaskVisitor;
+use Org\Mxchange\CoreFramework\Generic\BaseDecorator;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
+use Org\Mxchange\CoreFramework\Visitor\Decorator\DecoratorVisitor;
+use Org\Mxchange\CoreFramework\Visitor\Task\TaskVisitor;
/**
* An ActiveTask visitor
<?php
// Own namespace
-namespace Hub\Visitor\Task\Shutdown;
+namespace Org\Shipsimu\Hub\Visitor\Task\Shutdown;
// Import application-specific stuff
-use Hub\Listener\Listenable;
-use Hub\Pool\Poolable;
-use Hub\Visitor\Pool\PoolVisitor;
-use Hub\Visitor\Listener\ListenerVisitor;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Visitor\Pool\PoolVisitor;
+use Org\Shipsimu\Hub\Visitor\Listener\ListenerVisitor;
// Import framework stuff
-use CoreFramework\Generic\BaseDecorator;
-use CoreFramework\Task\Taskable;
-use CoreFramework\Visitor\BaseVisitor;
-use CoreFramework\Visitor\Decorator\DecoratorVisitor;
-use CoreFramework\Visitor\Task\TaskVisitor;
+use Org\Mxchange\CoreFramework\Generic\BaseDecorator;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
+use Org\Mxchange\CoreFramework\Visitor\Decorator\DecoratorVisitor;
+use Org\Mxchange\CoreFramework\Visitor\Task\TaskVisitor;
/**
* An ShutdownTask visitor
<?php
// Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
/**
* Local configuration entries which you can customize. Please keep the
*/
// Some hub-specific configuration like port hostname where we will listen, etc.
-$cfg = FrameworkConfiguration::getSelfInstance();
+$cfg = FrameworkBootstrap::getConfigurationInstance();
// CFG: NODE-LISTEN-ADDR
$cfg->setConfigEntry('node_listen_addr', '0.0.0.0');
<?php
// Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
/**
* Configuration entries for this application only
*/
// Some hub-specific configuration like port hostname where we will listen, etc.
-$cfg = FrameworkConfiguration::getSelfInstance();
+$cfg = FrameworkBootstrap::getConfigurationInstance();
// CFG: HUB-BOOTSTRAP-NODES
$cfg->setConfigEntry('hub_bootstrap_nodes', 'tcp://188.138.90.169:9060');
$cfg->setConfigEntry('enable_feature_hubcoin_reward', 'Y');
// CFG: FEATURE-HUBCOIN-REWARD-CLASS
-$cfg->setConfigEntry('feature_hubcoin_reward_class', 'Hub\Feature\CoinReward\HubcoinRewardFeature');
+$cfg->setConfigEntry('feature_hubcoin_reward_class', 'Org\Shipsimu\Hub\Feature\CoinReward\HubcoinRewardFeature');
// CFG: TEMPLATE-ENGINE
$cfg->setConfigEntry('tpl_engine', 'ConsoleOutput');
$cfg->setConfigEntry('output_class', 'DebugConsoleOutput');
// CFG: NODE-INFO-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('node_info_db_wrapper_class', 'Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper');
+$cfg->setConfigEntry('node_info_db_wrapper_class', 'Org\Shipsimu\Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper');
// CFG: NODE-DHT-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('node_dht_db_wrapper_class', 'Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper');
+$cfg->setConfigEntry('node_dht_db_wrapper_class', 'Org\Shipsimu\Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper');
// CFG: NODE-DHT-LIST-LIMIT
$cfg->setConfigEntry('node_dht_list_limit', 20);
// CFG: PEER-LOOKUP-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('peer_state_lookup_db_wrapper_class', 'Hub\Database\Frontend\Node\PeerState\PeerStateLookupDatabaseWrapper');
+$cfg->setConfigEntry('peer_state_lookup_db_wrapper_class', 'Org\Shipsimu\Hub\Database\Frontend\Node\PeerState\PeerStateLookupDatabaseWrapper');
// CFG: WEB-CONTENT-TYPE
$cfg->setConfigEntry('web_content_type', '');
// CFG: LISTENER-POOL-CLAS
-$cfg->setConfigEntry('listener_pool_class', 'Hub\Pool\Listener\DefaultListenerPool');
+$cfg->setConfigEntry('listener_pool_class', 'Org\Shipsimu\Hub\Pool\Listener\DefaultListenerPool');
// CFG: TCP-LISTENER-CLASS
-$cfg->setConfigEntry('tcp_listener_class', 'Hub\Listener\Tcp\TcpListener');
+$cfg->setConfigEntry('tcp_listener_class', 'Org\Shipsimu\Hub\Listener\Tcp\TcpListener');
// CFG: UDP-LISTENER-CLASS
-$cfg->setConfigEntry('udp_listener_class', 'Hub\Listener\Udp\UdpListener');
+$cfg->setConfigEntry('udp_listener_class', 'Org\Shipsimu\Hub\Listener\Udp\UdpListener');
// CFG: SOCKET-FILE-LISTENER-CLASS
-$cfg->setConfigEntry('socket_file_listener_class', 'Hub\Listener\Socket\SocketFileListener');
+$cfg->setConfigEntry('socket_file_listener_class', 'Org\Shipsimu\Hub\Listener\Socket\SocketFileListener');
// CFG: SOCKET-FILE-DECORATOR-LISTENER-CLASS
-$cfg->setConfigEntry('socket_file_decorator_listener_class', 'Hub\Listener\Socket\SocketFileListenerDecorator');
+$cfg->setConfigEntry('socket_file_decorator_listener_class', 'Org\Shipsimu\Hub\Listener\Socket\SocketFileListenerDecorator');
// CFG: NODE-TCP-LISTENER-CLASS
-$cfg->setConfigEntry('node_tcp_listener_class', 'Hub\Listener\Hub\Tcp\HubTcpListenerDecorator');
+$cfg->setConfigEntry('node_tcp_listener_class', 'Org\Shipsimu\Hub\Listener\Hub\Tcp\HubTcpListenerDecorator');
// CFG: NODE-UDP-LISTENER-CLASS
-$cfg->setConfigEntry('node_udp_listener_class', 'Hub\Listener\Hub\Udp\HubUdpListenerDecorator');
+$cfg->setConfigEntry('node_udp_listener_class', 'Org\Shipsimu\Hub\Listener\Hub\Udp\HubUdpListenerDecorator');
// CFG: CLIENT-TCP-LISTENER-CLASS
-$cfg->setConfigEntry('client_tcp_listener_class', 'Hub\Listener\Client\Tcp\ClientTcpListenerDecorator');
+$cfg->setConfigEntry('client_tcp_listener_class', 'Org\Shipsimu\Hub\Listener\Client\Tcp\ClientTcpListenerDecorator');
// CFG: CLIENT-UDP-LISTENER-CLASS
-$cfg->setConfigEntry('client_udp_listener_class', 'Hub\Listener\Client\Udp\ClientUdpListenerDecorator');
+$cfg->setConfigEntry('client_udp_listener_class', 'Org\Shipsimu\Hub\Listener\Client\Udp\ClientUdpListenerDecorator');
// CFG: NODE-POOL-CLASS
-$cfg->setConfigEntry('node_pool_class', 'Hub\Pool\Peer\DefaultPeerPool');
+$cfg->setConfigEntry('node_pool_class', 'Org\Shipsimu\Hub\Pool\Peer\DefaultPeerPool');
// CFG: APPLICATION-POOL-CLASS
-$cfg->setConfigEntry('application_pool_class', 'Hub\Pool\Peer\DefaultPeerPool');
+$cfg->setConfigEntry('application_pool_class', 'Org\Shipsimu\Hub\Pool\Peer\DefaultPeerPool');
// CFG: POOL-ENTRIES-LIST-CLASS
-$cfg->setConfigEntry('pool_entries_list_class', 'Hub\Lists\Pool\PoolEntriesList');
+$cfg->setConfigEntry('pool_entries_list_class', 'Org\Shipsimu\Hub\Lists\Pool\PoolEntriesList');
// CFG: FILE-POOL-ITERATOR-CLASS
-$cfg->setConfigEntry('file_pool_iterator_class', 'CoreFramework\Iterator\DefaultIterator');
+$cfg->setConfigEntry('file_pool_iterator_class', 'Org\Mxchange\CoreFramework\Iterator\DefaultIterator');
// CFG: TCP-POOL-ITERATOR-CLASS
-$cfg->setConfigEntry('tcp_pool_iterator_class', 'CoreFramework\Iterator\DefaultIterator');
+$cfg->setConfigEntry('tcp_pool_iterator_class', 'Org\Mxchange\CoreFramework\Iterator\DefaultIterator');
// CFG: UDP-POOL-ITERATOR-CLASS
-$cfg->setConfigEntry('udp_pool_iterator_class', 'CoreFramework\Iterator\DefaultIterator');
+$cfg->setConfigEntry('udp_pool_iterator_class', 'Org\Mxchange\CoreFramework\Iterator\DefaultIterator');
// CFG: SHUTDOWN-POOL-ITERATOR-CLASS
$cfg->setConfigEntry('shutdown_pool_iterator_class', 'ShutdownPoolIterator');
$cfg->setConfigEntry('handler_pool_iterator_class', 'HandlerPoolIterator');
// CFG: NETWORK-LISTEN-ITERATOR-CLASS
-$cfg->setConfigEntry('network_listen_iterator_class', 'Hub\Iterator\Network\Listener\NetworkListenIterator');
+$cfg->setConfigEntry('network_listen_iterator_class', 'Org\Shipsimu\Hub\Iterator\Network\Listener\NetworkListenIterator');
// CFG: SOCKET-LISTEN-ITERATOR-CLASS
-$cfg->setConfigEntry('socket_listen_iterator_class', 'CoreFramework\Iterator\DefaultIterator');
+$cfg->setConfigEntry('socket_listen_iterator_class', 'Org\Mxchange\CoreFramework\Iterator\DefaultIterator');
// CFG: TCP-RAW-DATA-HANDLER-CLASS
-$cfg->setConfigEntry('tcp_raw_data_handler_class', 'Hub\Handler\Network\RawData\Tcp\TcpRawDataHandler');
+$cfg->setConfigEntry('tcp_raw_data_handler_class', 'Org\Shipsimu\Hub\Handler\Network\RawData\Tcp\TcpRawDataHandler');
// CFG: UDP-RAW-DATA-HANDLER-CLASS
-$cfg->setConfigEntry('udp_raw_data_handler_class', 'Hub\Handler\Network\RawData\Udp\UdpRawDataHandler');
+$cfg->setConfigEntry('udp_raw_data_handler_class', 'Org\Shipsimu\Hub\Handler\Network\RawData\Udp\UdpRawDataHandler');
// CFG: SOCKET-RAW-DATA-HANDLER-CLASS
-$cfg->setConfigEntry('socket_raw_data_handler_class', 'Hub\Handler\Network\Socket\RawData\SocketRawDataHandler');
+$cfg->setConfigEntry('socket_raw_data_handler_class', 'Org\Shipsimu\Hub\Handler\Network\Socket\RawData\SocketRawDataHandler');
// CFG: SHUTDOWN-LISTENER-POOL-VISITOR-CLASS
$cfg->setConfigEntry('shutdown_listener_pool_visitor_class', 'ShutdownListenerPoolVisitor');
// CFG: SHUTDOWN-SOCKET-VISITOR-CLASS
-$cfg->setConfigEntry('shutdown_socket_visitor_class', 'Hub\Visitor\Shutdown\Socket\ShutdownSocketVisitor');
+$cfg->setConfigEntry('shutdown_socket_visitor_class', 'Org\Shipsimu\Hub\Visitor\Shutdown\Socket\ShutdownSocketVisitor');
// CFG: HALF-SHUTDOWN-SOCKET-VISITOR-CLASS
-$cfg->setConfigEntry('half_shutdown_socket_visitor_class', 'Hub\Visitor\Shutdown\Socket\HalfShutdownSocketVisitor');
+$cfg->setConfigEntry('half_shutdown_socket_visitor_class', 'Org\Shipsimu\Hub\Visitor\Shutdown\Socket\HalfShutdownSocketVisitor');
// CFG: NODE-RAW-DATA-MONITOR-VISITOR-CLASS
-$cfg->setConfigEntry('node_raw_data_monitor_visitor_class', 'Hub\Visitor\Monitor\Pool\RawDataPoolMonitorVisitor');
+$cfg->setConfigEntry('node_raw_data_monitor_visitor_class', 'Org\Shipsimu\Hub\Visitor\Monitor\Pool\RawDataPoolMonitorVisitor');
// CFG: ACTIVE-TASK-VISITOR-CLASS
-$cfg->setConfigEntry('active_task_visitor_class', 'Hub\Visitor\Task\Active\ActiveTaskVisitor');
+$cfg->setConfigEntry('active_task_visitor_class', 'Org\Shipsimu\Hub\Visitor\Task\Active\ActiveTaskVisitor');
+
+// CFG: SHUTDOWN-TASK-VISITOR-CLASS
+$cfg->setConfigEntry('shutdown_task_visitor_class', 'Org\Shipsimu\Hub\Visitor\Task\Shutdown\ShutdownTaskVisitor');
// CFG: NODE-ANNOUNCEMENT-HELPER-CLASS
$cfg->setConfigEntry('node_announcement_helper_class', 'NodeAnnouncementHelper');
// CFG: NODE-SELF-CONNECT-HELPER-CLASS
-$cfg->setConfigEntry('node_self_connect_helper_class', 'Hub\Node\Helper\SelfConnect\NodeSelfConnectHelper');
+$cfg->setConfigEntry('node_self_connect_helper_class', 'Org\Shipsimu\Hub\Node\Helper\SelfConnect\NodeSelfConnectHelper');
// CFG: DHT-BOOTSTRAP-HELPER-CLASS
-$cfg->setConfigEntry('dht_bootstrap_helper_class', 'Hub\Helper\Dht\Bootstrap\DhtBootstrapHelper');
+$cfg->setConfigEntry('dht_bootstrap_helper_class', 'Org\Shipsimu\Hub\Helper\Dht\Bootstrap\DhtBootstrapHelper');
// CFG: DHT-PUBLISH-ENTRY-HELPER-CLASS
$cfg->setConfigEntry('dht_publish_entry_helper_class', 'DhtPublishEntryHelper');
$cfg->setConfigEntry('default_hub_console_command', 'main');
// CFG: HUB-CONSOLE-CMD-MAIN-RESOLVER-CLASS
-$cfg->setConfigEntry('hub_console_cmd_main_resolver_class', 'Hub\Resolver\Command\HubConsoleCommandResolver');
+$cfg->setConfigEntry('hub_console_cmd_main_resolver_class', 'Org\Shipsimu\Hub\Resolver\Command\HubConsoleCommandResolver');
// CFG: NETWORK-STATE-RESOLVER-CLASS
$cfg->setConfigEntry('network_state_resolver_class', 'NetworkStateResolver');
// CFG: NEWS-DOWNLOAD-FILTER
-$cfg->setConfigEntry('news_download_filter_class', 'CoreFramework\Filter\News\NewsDownloadFilter');
+$cfg->setConfigEntry('news_download_filter_class', 'Org\Mxchange\CoreFramework\Filter\News\NewsDownloadFilter');
// CFG: NEWS-PROCESS-FILTER
-$cfg->setConfigEntry('news_process_filter_class', 'CoreFramework\Filter\News\NewsProcessFilter');
+$cfg->setConfigEntry('news_process_filter_class', 'Org\Mxchange\CoreFramework\Filter\News\NewsProcessFilter');
// CFG: NODE-PHP-REQUIREMENTS-FILTER
-$cfg->setConfigEntry('node_php_requirements_filter_class', 'Hub\Filter\Node\Requirements\NodePhpRequirementsFilter');
+$cfg->setConfigEntry('node_php_requirements_filter_class', 'Org\Shipsimu\Hub\Filter\Node\Requirements\NodePhpRequirementsFilter');
// CFG: NODE-INITIALIZER-FILTER
-$cfg->setConfigEntry('node_initializer_filter_class', 'Hub\Filter\Node\Initialization\NodeInitializationFilter');
+$cfg->setConfigEntry('node_initializer_filter_class', 'Org\Shipsimu\Hub\Filter\Node\Initialization\NodeInitializationFilter');
// CFG: NODE-ACTIVATION-TASK-HANDLER-INITIALIZER-FILTER
-$cfg->setConfigEntry('node_activation_task_handler_initializer_filter_class', 'Hub\Filter\Initializer\Node\Handler\Task\NodeTaskHandlerInitializerFilter');
+$cfg->setConfigEntry('node_activation_task_handler_initializer_filter_class', 'Org\Shipsimu\Hub\Filter\Initializer\Node\Handler\Task\NodeTaskHandlerInitializerFilter');
// CFG: NODE-ACTIVATION-ANNOUNCEMENT-TASK-FILTER
$cfg->setConfigEntry('node_activation_announcement_task_filter_class', 'NodeActivationAnnouncementFilter');
// CFG: NODE-WELCOME-TEASER-FILTER
-$cfg->setConfigEntry('node_welcome_teaser_filter_class', 'Hub\Filter\Node\WelcomeTeaser\NodeWelcomeTeaserFilter');
+$cfg->setConfigEntry('node_welcome_teaser_filter_class', 'Org\Shipsimu\Hub\Filter\Node\WelcomeTeaser\NodeWelcomeTeaserFilter');
// CFG: NODE-BOOTSTRAP-GENERATE-NODEID-FILTER
-$cfg->setConfigEntry('node_bootstrap_generate_nodeid_filter_class', 'Hub\Filter\Bootstrap\Node\NodeId\NodeBootstrapGenerateNodeIdFilter');
+$cfg->setConfigEntry('node_bootstrap_generate_nodeid_filter_class', 'Org\Shipsimu\Hub\Filter\Bootstrap\Node\NodeId\NodeBootstrapGenerateNodeIdFilter');
// CFG: NODE-BOOTSTRAP-GENERATE-SESSIONID-FILTER
-$cfg->setConfigEntry('node_bootstrap_generate_sessionid_filter_class', 'Hub\Filter\Bootstrap\Node\SessionId\NodeBootstrapGenerateSessionIdFilter');
+$cfg->setConfigEntry('node_bootstrap_generate_sessionid_filter_class', 'Org\Shipsimu\Hub\Filter\Bootstrap\Node\SessionId\NodeBootstrapGenerateSessionIdFilter');
// CFG: NODE-BOOTSTRAP-GENERATE-PRIVATE-KEY-FILTER
-$cfg->setConfigEntry('node_bootstrap_generate_private_key_filter_class', 'Hub\Filter\Bootstrap\Node\PrivateKey\NodeBootstrapGeneratePrivateKeyFilter');
+$cfg->setConfigEntry('node_bootstrap_generate_private_key_filter_class', 'Org\Shipsimu\Hub\Filter\Bootstrap\Node\PrivateKey\NodeBootstrapGeneratePrivateKeyFilter');
// CFG: NODE-BOOTSTRAP-EXTRA-BOOTSTRAPPING-FILTER
-$cfg->setConfigEntry('node_bootstrap_extra_bootstrapping_filter_class', 'Hub\Filter\Bootstrap\Node\Extra\NodeBootstrapExtraBootstrappingFilter');
+$cfg->setConfigEntry('node_bootstrap_extra_bootstrapping_filter_class', 'Org\Shipsimu\Hub\Filter\Bootstrap\Node\Extra\NodeBootstrapExtraBootstrappingFilter');
// CFG: NODE-BOOTSTRAP-LISTENER-POOL-FILTER
-$cfg->setConfigEntry('node_bootstrap_listener_pool_filter_class', 'Hub\Filter\Bootstrap\Node\Pool\NodeBootstrapListenerPoolFilter');
+$cfg->setConfigEntry('node_bootstrap_listener_pool_filter_class', 'Org\Shipsimu\Hub\Filter\Bootstrap\Node\Pool\NodeBootstrapListenerPoolFilter');
// CFG: NODE-SHUTDOWN-FLUSH-NODE-LIST-FILTER
-$cfg->setConfigEntry('node_shutdown_flush_node_list_filter_class', 'Hub\Filter\Shutdown\Node\NodeList\NodeShutdownFlushNodeListFilter');
+$cfg->setConfigEntry('node_shutdown_flush_node_list_filter_class', 'Org\Shipsimu\Hub\Filter\Shutdown\Node\NodeList\NodeShutdownFlushNodeListFilter');
// CFG: NODE-SHUTDOWN-TASK-HANDLER-FILTER
-$cfg->setConfigEntry('node_shutdown_task_handler_filter_class', 'Hub\Filter\Shutdown\Node\Handler\Task\NodeShutdownTaskHandlerFilter');
+$cfg->setConfigEntry('node_shutdown_task_handler_filter_class', 'Org\Shipsimu\Hub\Filter\Shutdown\Node\Handler\Task\NodeShutdownTaskHandlerFilter');
// CFG: NODE-SHUTDOWN-NODE-FILTER
-$cfg->setConfigEntry('node_shutdown_node_filter_class', 'Hub\Filter\Shutdown\Node\NodeShutdownNodeFilter');
+$cfg->setConfigEntry('node_shutdown_node_filter_class', 'Org\Shipsimu\Hub\Filter\Shutdown\Node\NodeShutdownNodeFilter');
// CFG: PACKAGE-FILTER-CHAIN-CLASS
$cfg->setConfigEntry('package_filter_chain_class', 'PackageFilterChain');
$cfg->setConfigEntry('node_next_announcement_answer_okay_helper_class', 'NodeRequestNodeListHelper');
// CFG: NEWS-READER-MAIN-CLASS
-$cfg->setConfigEntry('news_reader_main_class', 'CoreFramework\Reader\News\Console\ConsoleNewsReader');
+$cfg->setConfigEntry('news_reader_main_class', 'Org\Mxchange\CoreFramework\Reader\News\Console\ConsoleNewsReader');
// CFG: NODE-ANNOUNCEMENT-TEMPLATE-CLASS
$cfg->setConfigEntry('node_announcement_template_class', 'XmlAnnouncementTemplateEngine');
$cfg->setConfigEntry('node_request_node_list_template_class', 'XmlRequestNodeListTemplateEngine');
// CFG: NODE-DHT-BOOTSTRAP-TEMPLATE-CLASS
-$cfg->setConfigEntry('node_dht_bootstrap_template_class', 'Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine');
+$cfg->setConfigEntry('node_dht_bootstrap_template_class', 'Org\Shipsimu\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', 'Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine');
+$cfg->setConfigEntry('dht_bootstrap_template_class', 'Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine');
// CFG: DHT-PUBLISH-ENTRY-TEMPLATE-CLASS
$cfg->setConfigEntry('dht_publish_entry_template_class', 'XmlDhtPublishEntryTemplateEngine');
$cfg->setConfigEntry('node_announcement_template_type', 'xml/announcement');
// CFG: NODE-ANNOUNCEMENT-STACKER-CLASS
-$cfg->setConfigEntry('node_announcement_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('node_announcement_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: NODE-ANNOUNCEMENT-ANSWER-STACKER-CLASS
-$cfg->setConfigEntry('node_announcement_answer_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('node_announcement_answer_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: NODE-DHT-BOOTSTRAP-STACKER-CLASS
-$cfg->setConfigEntry('node_dht_bootstrap_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('node_dht_bootstrap_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: NODE-DHT-BOOTSTRAP-ANSWER-STACKER-CLASS
-$cfg->setConfigEntry('node_dht_bootstrap_answer_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('node_dht_bootstrap_answer_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: NODE-REQUEST-NODE-LIST-ANSWER-STACKER-CLASS
-$cfg->setConfigEntry('node_request_node_list_answer_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('node_request_node_list_answer_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: NODE-REQUEST-NODE-LIST-ENTRY-STACKER-CLASS
-$cfg->setConfigEntry('node_request_node_list_entry_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('node_request_node_list_entry_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: DHT-STACKER-CLASS
-$cfg->setConfigEntry('dht_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('dht_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: RAW-DATA-STACKER-CLASS
-$cfg->setConfigEntry('raw_data_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('raw_data_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: MULTIPLE-MESSAGE-STACKER-CLASS
-$cfg->setConfigEntry('multiple_message_stacker_class', 'CoreFramework\Stacker\FiFoStacker');
+$cfg->setConfigEntry('multiple_message_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
// CFG: NODE-ANNOUNCEMENT-ANSWER-TEMPLATE-TYPE
$cfg->setConfigEntry('node_announcement_answer_template_type', 'xml/answer/announcement');
$cfg->setConfigEntry('node_request_node_list_answer_template_type', 'xml/answer/requests');
// CFG: NODE-SELF-CONNECT-TEMPLATE-CLASS
-$cfg->setConfigEntry('node_self_connect_template_class', 'Hub\Template\Engine\Xml\SelfConnect\XmlSelfConnectTemplateEngine');
+$cfg->setConfigEntry('node_self_connect_template_class', 'Org\Shipsimu\Hub\Template\Engine\Xml\SelfConnect\XmlSelfConnectTemplateEngine');
// CFG: NODE-SELF-CONNECT-TEMPLATE-TYPE
$cfg->setConfigEntry('node_self_connect_template_type', 'xml/self_connect');
$cfg->setConfigEntry('node_request_node_list_template_type', 'xml/requests');
// CFG: NODE-SELF-CONNECT-STACKER-CLASS
-$cfg->setConfigEntry('node_self_connect_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('node_self_connect_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: NODE-REQUEST-NODE_LIST-STACKER-CLASS
-$cfg->setConfigEntry('node_request_node_list_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('node_request_node_list_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: NODE-OBJECT-REGISTRY-TEMPLATE-CLASS
-$cfg->setConfigEntry('node_object_registry_template_class', 'Hub\Template\Engine\Xml\ObjectRegistry\XmlObjectRegistryTemplateEngine');
+$cfg->setConfigEntry('node_object_registry_template_class', 'Org\Shipsimu\Hub\Template\Engine\Xml\ObjectRegistry\XmlObjectRegistryTemplateEngine');
// CFG: NODE-OBJECT-REGISTRY-TEMPLATE-EXTENSION
$cfg->setConfigEntry('node_object_registry_template_extension', '.xml');
$cfg->setConfigEntry('node_object_registry_template_type', 'xml/object_registry');
// CFG: NODE-OBJECT-REGISTRY-STACKER-CLASS
-$cfg->setConfigEntry('node_object_registry_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('node_object_registry_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: NODE-OBJECT-TYPE-REGISTRY-CLASS
-$cfg->setConfigEntry('node_object_type_registry_class', 'Hub\Registry\Object\ObjectTypeRegistry');
+$cfg->setConfigEntry('node_object_type_registry_class', 'Org\Shipsimu\Hub\Registry\Object\ObjectTypeRegistry');
// CFG: DHT-BOOTSTRAP-TEMPLATE-TYPE
$cfg->setConfigEntry('node_dht_bootstrap_template_type', 'xml/dht_bootstrap');
$cfg->setConfigEntry('raw_template_extension', '.xml');
// CFG: PACKAGE-STACKER-CLASS
-$cfg->setConfigEntry('network_package_stacker_class', 'CoreFramework\Stacker\FiFoStacker');
+$cfg->setConfigEntry('network_package_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
// CFG: NODE-RAW-DATA-STACKER-CLASS
-$cfg->setConfigEntry('node_raw_data_stacker_class', 'CoreFramework\Stacker\FiFoStacker');
+$cfg->setConfigEntry('node_raw_data_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
// CFG: CHUNK-HANDLER-STACKER-CLASS
-$cfg->setConfigEntry('chunk_handler_stacker_class', 'CoreFramework\Stacker\FiFoStacker');
+$cfg->setConfigEntry('chunk_handler_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
// CFG: DHT-BOOTSTRAP-STACKER-CLASS
-$cfg->setConfigEntry('dht_bootstrap_stacker_class', 'CoreFramework\Stacker\FiFoStacker');
+$cfg->setConfigEntry('dht_bootstrap_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
// CFG: DHT-PUBLISH-STACKER-CLASS
-$cfg->setConfigEntry('dht_publish_stacker_class', 'CoreFramework\Stacker\FiFoStacker');
+$cfg->setConfigEntry('dht_publish_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
// CFG: PRODUCER-OUTGOING-QUEUE
-$cfg->setConfigEntry('producer_outgoing_queue', 'CoreFramework\Stacker\FiFoStacker');
+$cfg->setConfigEntry('producer_outgoing_queue', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
// CFG: PRODUCER-INCOMING-QUEUE
-$cfg->setConfigEntry('producer_incoming_queue', 'CoreFramework\Stacker\FiFoStacker');
+$cfg->setConfigEntry('producer_incoming_queue', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
// CFG: STACKER-NODE-ANNOUNCEMENT-MAX-SIZE
$cfg->setConfigEntry('stacker_node_announcement_max_size', 20);
$cfg->setConfigEntry('task_ping_max_runs', 0);
// CFG: NODE-PACKAGE-TAGS-INIT-TASK-CLASS
-$cfg->setConfigEntry('node_package_tags_init_task_class', 'Hub\Node\Task\Initialization\Tag\NodePackageTagsInitTask');
+$cfg->setConfigEntry('node_package_tags_init_task_class', 'Org\Shipsimu\Hub\Node\Task\Initialization\Tag\NodePackageTagsInitTask');
// CFG: NODE-SELFCONNECT-TASK-CLASS
-$cfg->setConfigEntry('node_selfconnect_task_class', 'Hub\Node\Task\SelfConnect\NodeSelfConnectTask');
+$cfg->setConfigEntry('node_selfconnect_task_class', 'Org\Shipsimu\Hub\Node\Task\SelfConnect\NodeSelfConnectTask');
// CFG: NODE-UPDATE-CHECK-TASK-CLASS
-$cfg->setConfigEntry('node_update_check_task_class', 'Hub\Node\Check\Update\NodeUpdateCheckTask');
+$cfg->setConfigEntry('node_update_check_task_class', 'Org\Shipsimu\Hub\Node\Check\Update\NodeUpdateCheckTask');
// CFG: NODE-PING-TASK-CLASS
-$cfg->setConfigEntry('node_ping_task_class', 'Hub\Node\Ping\NodePingTask');
+$cfg->setConfigEntry('node_ping_task_class', 'Org\Shipsimu\Hub\Node\Ping\NodePingTask');
// CFG: NODE-ANNOUNCEMENT-TASK-CLASS
$cfg->setConfigEntry('node_announcement_task_class', 'NodeAnnouncementTask');
// CFG: NODE-PACKAGE-WRITER-TASK-CLASS
-$cfg->setConfigEntry('node_package_writer_task_class', 'Hub\Task\Network\Writer\NetworkPackageWriterTask');
+$cfg->setConfigEntry('node_package_writer_task_class', 'Org\Shipsimu\Hub\Task\Network\Writer\NetworkPackageWriterTask');
// CFG: NODE-PACKAGE-READER-TASK-CLASS
-$cfg->setConfigEntry('node_package_reader_task_class', 'Hub\Task\Network\Reader\NetworkPackageReaderTask');
+$cfg->setConfigEntry('node_package_reader_task_class', 'Org\Shipsimu\Hub\Task\Network\Reader\NetworkPackageReaderTask');
// CFG: NODE-SOCKET-LISTENER-TASK-CLASS
-$cfg->setConfigEntry('node_socket_listener_task_class', 'Hub\Node\Task\Listener\Socket\NodeSocketListenerTask');
+$cfg->setConfigEntry('node_socket_listener_task_class', 'Org\Shipsimu\Hub\Node\Task\Listener\Socket\NodeSocketListenerTask');
// CFG: NODE-CHUNK-ASSEMBLER-TASK-CLASS
-$cfg->setConfigEntry('node_chunk_assembler_task_class', 'Hub\Node\Task\Assembler\NodeChunkAssemblerTask');
+$cfg->setConfigEntry('node_chunk_assembler_task_class', 'Org\Shipsimu\Hub\Node\Task\Assembler\NodeChunkAssemblerTask');
// CFG: NODE-PACKAGE-DECODER-TASK-CLASS
-$cfg->setConfigEntry('node_package_decoder_task_class', 'Hub\Node\Task\Decoder\NodePackageDecoderTask');
+$cfg->setConfigEntry('node_package_decoder_task_class', 'Org\Shipsimu\Hub\Node\Task\Decoder\NodePackageDecoderTask');
// CFG: NODE-DHT-INIT-TASK-CLASS
-$cfg->setConfigEntry('node_dht_init_task_class', 'Hub\Node\Task\Dht\Initialization\NodeDhtInitializationTask');
+$cfg->setConfigEntry('node_dht_init_task_class', 'Org\Shipsimu\Hub\Node\Task\Dht\Initialization\NodeDhtInitializationTask');
// CFG: NODE-DHT-BOOTSTRAP-TASK-CLASS
-$cfg->setConfigEntry('node_dht_bootstrap_task_class', 'Hub\Node\Task\Dht\Bootstrap\NodeDhtBootstrapTask');
+$cfg->setConfigEntry('node_dht_bootstrap_task_class', 'Org\Shipsimu\Hub\Node\Task\Dht\Bootstrap\NodeDhtBootstrapTask');
// CFG: NODE-DHT-LATE-BOOTSTRAP-TASK-CLASS
$cfg->setConfigEntry('node_dht_late_bootstrap_task_class', 'NodeDhtLateBootstrapTask');
// CFG: NODE-DHT-QUERY-TASK-CLASS
-$cfg->setConfigEntry('node_dht_query_task_class', 'Hub\Node\Task\Dht\Query\NodeDhtQueryTask');
+$cfg->setConfigEntry('node_dht_query_task_class', 'Org\Shipsimu\Hub\Node\Task\Dht\Query\NodeDhtQueryTask');
// CFG: NODE-DHT-PUBLICATION-CHECK-TASK-CLASS
-$cfg->setConfigEntry('node_dht_publication_check_task_class', 'Hub\Node\Task\Dht\Check\Publication\NodeDhtPublicationCheckTask');
+$cfg->setConfigEntry('node_dht_publication_check_task_class', 'Org\Shipsimu\Hub\Node\Task\Dht\Check\Publication\NodeDhtPublicationCheckTask');
// CFG: NODE-DHT-PUBLICATION-TASK-CLASS
-$cfg->setConfigEntry('node_dht_publication_task_class', 'Hub\Node\Task\Dht\Publication\NodeDhtPublicationTask');
+$cfg->setConfigEntry('node_dht_publication_task_class', 'Org\Shipsimu\Hub\Node\Task\Dht\Publication\NodeDhtPublicationTask');
// CFG: TASK-NETWORK-PACKAGE-WRITER-STARTUP-DELAY
$cfg->setConfigEntry('task_network_package_writer_startup_delay', 2500);
$cfg->setConfigEntry('task_dht_publication_max_runs', 0);
// CFG: TASK-POOL-ITERATOR-CLASS
-$cfg->setConfigEntry('task_pool_iterator_class', 'Hub\Iterator\Pool\Task\TaskPoolIterator');
+$cfg->setConfigEntry('task_pool_iterator_class', 'Org\Shipsimu\Hub\Iterator\Pool\Task\TaskPoolIterator');
// CFG: MONITOR-POOL-ITERATOR-CLASS
-$cfg->setConfigEntry('monitor_pool_iterator_class', 'Hub\Iterator\Pool\Monitor\MonitorPoolIterator');
+$cfg->setConfigEntry('monitor_pool_iterator_class', 'Org\Shipsimu\Hub\Iterator\Pool\Monitor\MonitorPoolIterator');
// CFG: QUERY-ITERATOR-CLASS
-$cfg->setConfigEntry('query_iterator_class', 'CoreFramework\Iterator\DefaultIterator');
+$cfg->setConfigEntry('query_iterator_class', 'Org\Mxchange\CoreFramework\Iterator\DefaultIterator');
// CFG: NODE-PING-ITERATOR-CLASS
-$cfg->setConfigEntry('node_ping_iterator_class', 'Hub\Iterator\Node\Ping\NodePingIterator');
+$cfg->setConfigEntry('node_ping_iterator_class', 'Org\Shipsimu\Hub\Iterator\Node\Ping\NodePingIterator');
// CFG: WEB-TEMPLATE-CLASS @OVERRIDE
$cfg->setConfigEntry('web_template_class', 'ConsoleTemplateEngine');
// CFG: NETWORK-PACKAGE-CLASS
-$cfg->setConfigEntry('network_package_class', 'Hub\Network\Package\NetworkPackage');
+$cfg->setConfigEntry('network_package_class', 'Org\Shipsimu\Hub\Network\Package\NetworkPackage');
// CFG: PACKAGE-COMPRESSOR-CLASS
-$cfg->setConfigEntry('deco_package_compressor_class', 'Hub\Network\Compressor\Package\NetworkPackageCompressorDecorator');
+$cfg->setConfigEntry('deco_package_compressor_class', 'Org\Shipsimu\Hub\Network\Compressor\Package\NetworkPackageCompressorDecorator');
// CFG: RAW-PACKAGE-COMPRESSOR-CLASS
-$cfg->setConfigEntry('raw_package_compressor_class', 'CoreFramework\Compressor\Zlib\ZlibCompressor');
+$cfg->setConfigEntry('raw_package_compressor_class', 'Org\Mxchange\CoreFramework\Compressor\Zlib\ZlibCompressor');
// CFG: SOCKET-REGISTRY-CLASS
-$cfg->setConfigEntry('socket_registry_class', 'Hub\Registry\Socket\SocketRegistry');
+$cfg->setConfigEntry('socket_registry_class', 'Org\Shipsimu\Hub\Registry\Socket\SocketRegistry');
// CFG: SOCKET-CONTAINER-CLASS
-$cfg->setConfigEntry('socket_container_class', 'Hub\Container\Socket\SocketContainer');
+$cfg->setConfigEntry('socket_container_class', 'Org\Shipsimu\Hub\Container\Socket\SocketContainer');
// CFG: IPC-SOCKET-FILE-NAME
$cfg->setConfigEntry('ipc_socket_file_name', 'php_hub_ipc_socket');
// CFG: PACKAGE-RECIPIENT-DISCOVERY-CLASS
-$cfg->setConfigEntry('package_recipient_discovery_class', 'Hub\Discovery\Network\Recipient\PackageRecipientDiscovery');
+$cfg->setConfigEntry('package_recipient_discovery_class', 'Org\Shipsimu\Hub\Discovery\Network\Recipient\PackageRecipientDiscovery');
// CFG: SOCKET-DISCOVERY-CLASS
-$cfg->setConfigEntry('socket_discovery_class', 'Hub\Network\Discovery\Socket\PackageSocketDiscovery');
+$cfg->setConfigEntry('socket_discovery_class', 'Org\Shipsimu\Hub\Network\Discovery\Socket\PackageSocketDiscovery');
// CFG: DHT-RECIPIENT-DISCOVERY-CLASS
-$cfg->setConfigEntry('dht_recipient_discovery_class', 'Hub\Discovery\Recipient\Dht\DhtRecipientDiscovery');
+$cfg->setConfigEntry('dht_recipient_discovery_class', 'Org\Shipsimu\Hub\Discovery\Recipient\Dht\DhtRecipientDiscovery');
// CFG: UNL-DISCOVERY-CLASS
-$cfg->setConfigEntry('unl_discovery_class', 'Hub\Discovery\Locator\UniversalNodeLocatorDiscovery');
+$cfg->setConfigEntry('unl_discovery_class', 'Org\Shipsimu\Hub\Discovery\Locator\UniversalNodeLocatorDiscovery');
// CFG: TCP-PROTOCOL-HANDLER-CLASS
-$cfg->setConfigEntry('tcp_protocol_handler_class', 'Hub\Handler\Protocol\Network\IpV4\Tcp\TcpProtocolHandler');
+$cfg->setConfigEntry('tcp_protocol_handler_class', 'Org\Shipsimu\Hub\Handler\Protocol\Network\IpV4\Tcp\TcpProtocolHandler');
// CFG: UNIVERSAL-NODE-LOCATOR-CLASS
-$cfg->setConfigEntry('universal_node_locator_class', 'Hub\Locator\Node\UniversalNodeLocator');
+$cfg->setConfigEntry('universal_node_locator_class', 'Org\Shipsimu\Hub\Locator\Node\UniversalNodeLocator');
// CFG: RECIPIENT-LIST-CLASS
-$cfg->setConfigEntry('recipient_list_class', 'Hub\Lists\Recipient\RecipientList');
+$cfg->setConfigEntry('recipient_list_class', 'Org\Shipsimu\Hub\Lists\Recipient\RecipientList');
// CFG: PACKAGE-TAGS-CLASS
-$cfg->setConfigEntry('package_tags_class', 'Hub\Tag\Package\PackageTags');
+$cfg->setConfigEntry('package_tags_class', 'Org\Shipsimu\Hub\Tag\Package\PackageTags');
// CFG: TCP-CONNECTION-HELPER-CLASS
-$cfg->setConfigEntry('tcp_connection_helper_class', 'Hub\Helper\Connection\Network\IpV4\Tcp\TcpConnectionHelper');
+$cfg->setConfigEntry('tcp_connection_helper_class', 'Org\Shipsimu\Hub\Helper\Connection\Network\IpV4\Tcp\TcpConnectionHelper');
// CFG: UDP-CONNECTION-HELPER-CLASS
-$cfg->setConfigEntry('udp_connection_helper_class', 'Hub\Helper\Connection\Network\IpV4\Udp\UdpConnectionHelper');
+$cfg->setConfigEntry('udp_connection_helper_class', 'Org\Shipsimu\Hub\Helper\Connection\Network\IpV4\Udp\UdpConnectionHelper');
// CFG: HUB-COMMUNICATION-PROTOCOL-TYPE
$cfg->setConfigEntry('hub_communication_protocol_type', 'tcp');
// CFG: TCP-PROTOCOL-RESOLVER-CLASS
-$cfg->setConfigEntry('tcp_protocol_resolver_class', 'Hub\Resolver\Protocol\Tcp\TcpProtocolResolver');
+$cfg->setConfigEntry('tcp_protocol_resolver_class', 'Org\Shipsimu\Hub\Resolver\Protocol\Tcp\TcpProtocolResolver');
// CFG: TCP-BUFFER-LENGTH
$cfg->setConfigEntry('tcp_buffer_length', 1024);
$cfg->setConfigEntry('node_status', 'invalid');
// CFG: PACKAGE-FRAGMENTER-CLASS
-$cfg->setConfigEntry('package_fragmenter_class', 'Hub\Network\Package\Fragment\PackageFragmenter');
+$cfg->setConfigEntry('package_fragmenter_class', 'Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter');
// CFG: PACKAGE-ASSEMBLER-CLASS
-$cfg->setConfigEntry('package_assembler_class', 'Hub\Network\Package\Assembler\PackageAssembler');
+$cfg->setConfigEntry('package_assembler_class', 'Org\Shipsimu\Hub\Network\Package\Assembler\PackageAssembler');
// CFG: PACKAGE-CHUNK-SIZE
$cfg->setConfigEntry('package_chunk_size', 256*8);
// CFG: NODE-RAW-DATA-OUTPUT-STREAM-CLASS
-$cfg->setConfigEntry('node_raw_data_output_stream_class', 'Hub\Stream\Network\Output\RawData\RawDataOutputStream');
+$cfg->setConfigEntry('node_raw_data_output_stream_class', 'Org\Shipsimu\Hub\Stream\Network\Output\RawData\RawDataOutputStream');
// CFG: NODE-RAW-DATA-INPUT-STREAM-CLASS
-$cfg->setConfigEntry('node_raw_data_input_stream_class', 'Hub\Stream\Network\Input\RawData\RawDataInputStream');
+$cfg->setConfigEntry('node_raw_data_input_stream_class', 'Org\Shipsimu\Hub\Stream\Network\Input\RawData\RawDataInputStream');
// CFG: SOCKET-TIMEOUT-SECONDS
$cfg->setConfigEntry('socket_timeout_seconds', 3);
$cfg->setConfigEntry('socket_select_timeout_usec', 50);
// CFG: CHUNK-HANDLER-CLASS
-$cfg->setConfigEntry('chunk_handler_class', 'Hub\Handler\Network\RawData\Chunks\ChunkHandler');
+$cfg->setConfigEntry('chunk_handler_class', 'Org\Shipsimu\Hub\Handler\Network\RawData\Chunks\ChunkHandler');
// CFG: PACKAGE-DECODER-CLASS
-$cfg->setConfigEntry('package_decoder_class', 'Hub\Network\Decoder\Package\PackageDecoder');
+$cfg->setConfigEntry('package_decoder_class', 'Org\Shipsimu\Hub\Network\Decoder\Package\PackageDecoder');
// CFG: PACKAGE-RECIPIENT-MAX-COUNT
// @TODO This is very static, rewrite it to more flexible
$cfg->setConfigEntry('package_recipient_max_count', 3);
// CFG: NODE-DHT-CLASS
-$cfg->setConfigEntry('node_dht_class', 'Hub\Dht\Node\NodeDhtFacade');
+$cfg->setConfigEntry('node_dht_class', 'Org\Shipsimu\Hub\Dht\Node\NodeDhtFacade');
// CFG: MAX-DHT-RECIPIENTS
$cfg->setConfigEntry('max_dht_recipients', 10);
// CFG: CONNECTION-INFO-CLASS
-$cfg->setConfigEntry('connection_info_class', 'Hub\Information\Connection\ConnectionInfo');
+$cfg->setConfigEntry('connection_info_class', 'Org\Shipsimu\Hub\Information\Connection\ConnectionInfo');
// CFG: DEFAULT-HUB-CONSOLE-CONTROLLER
$cfg->setConfigEntry('default_hub_console_controller', 'main');
///////////////////////////////////////////////////////////////////////////////
// CFG: NODE-INIT-STATE-CLASS
-$cfg->setConfigEntry('node_init_state_class', 'Hub\State\Node\NodeInitState');
+$cfg->setConfigEntry('node_init_state_class', 'Org\Shipsimu\Hub\State\Node\NodeInitState');
// CFG: NODE-VIRGIN-STATE-CLASS
-$cfg->setConfigEntry('node_virgin_state_class', 'Hub\State\Node\NodeVirginState');
+$cfg->setConfigEntry('node_virgin_state_class', 'Org\Shipsimu\Hub\State\Node\NodeVirginState');
// CFG: NODE-ACTIVE-STATE-CLASS
-$cfg->setConfigEntry('node_active_state_class', 'Hub\State\Node\NodeActiveState');
+$cfg->setConfigEntry('node_active_state_class', 'Org\Shipsimu\Hub\State\Node\NodeActiveState');
// CFG: NODE-ANNOUNCING-STATE-CLASS
-$cfg->setConfigEntry('node_announcing_state_class', 'Hub\State\Node\NodeAnnouncingState');
+$cfg->setConfigEntry('node_announcing_state_class', 'Org\Shipsimu\Hub\State\Node\NodeAnnouncingState');
// CFG: NODE-REACHABLE-STATE-CLASS
-$cfg->setConfigEntry('node_reachable_state_class', 'Hub\State\Node\NodeReachableState');
+$cfg->setConfigEntry('node_reachable_state_class', 'Org\Shipsimu\Hub\State\Node\NodeReachableState');
// CFG: NODE-ANNOUNCEMENT-COMPLETED-STATE-CLASS
-$cfg->setConfigEntry('node_announcement_completed_state_class', 'Hub\State\Node\NodeAnnouncementCompletedState');
+$cfg->setConfigEntry('node_announcement_completed_state_class', 'Org\Shipsimu\Hub\State\Node\NodeAnnouncementCompletedState');
///////////////////////////////////////////////////////////////////////////////
// Peer states
///////////////////////////////////////////////////////////////////////////////
// CFG: PEER-INIT-STATE-CLASS
-$cfg->setConfigEntry('peer_init_state_class', 'Hub\State\Peer\InitPeerState');
+$cfg->setConfigEntry('peer_init_state_class', 'Org\Shipsimu\Hub\State\Peer\InitPeerState');
// CFG: PEER-CONNECTED-STATE-CLASS
-$cfg->setConfigEntry('peer_connected_state_class', 'Hub\State\Peer\ConnectedPeerState');
+$cfg->setConfigEntry('peer_connected_state_class', 'Org\Shipsimu\Hub\State\Peer\ConnectedPeerState');
// CFG: PEER-PROBLEM-STATE-CLASS
-$cfg->setConfigEntry('peer_problem_state_class', 'Hub\State\Peer\ProblemPeerState');
+$cfg->setConfigEntry('peer_problem_state_class', 'Org\Shipsimu\Hub\State\Peer\ProblemPeerState');
// CFG: PEER-CONNECTION-REFUSED-STATE-CLASS
-$cfg->setConfigEntry('peer_connection_refused_state_class', 'Hub\State\Peer\ConnectionRefusedPeerState');
+$cfg->setConfigEntry('peer_connection_refused_state_class', 'Org\Shipsimu\Hub\State\Peer\ConnectionRefusedPeerState');
// CFG: PEER-CONNECTION-TIMED-OUT-STATE-CLASS
-$cfg->setConfigEntry('peer_connection_timed_out_state_class', 'Hub\State\Peer\ConnectionTimedOutPeerState');
+$cfg->setConfigEntry('peer_connection_timed_out_state_class', 'Org\Shipsimu\Hub\State\Peer\ConnectionTimedOutPeerState');
// CFG: PEER-TRANSPORT-ENDPOINT-STATE-CLASS
-$cfg->setConfigEntry('peer_transport_endpoint_state_class', 'Hub\State\Peer\TransportEndpointGonePeerState');
+$cfg->setConfigEntry('peer_transport_endpoint_state_class', 'Org\Shipsimu\Hub\State\Peer\TransportEndpointGonePeerState');
// CFG: PEER-OPERATION-ALREADY-PROGRESS-STATE-CLASS
-$cfg->setConfigEntry('peer_operation_already_progress_state_class', 'Hub\State\Peer\OperationAlreadyProgressPeerState');
+$cfg->setConfigEntry('peer_operation_already_progress_state_class', 'Org\Shipsimu\Hub\State\Peer\OperationAlreadyProgressPeerState');
// CFG: PEER-NO-ROUTE-TO-HOST-STATE-CLASS
-$cfg->setConfigEntry('peer_no_route_to_host_state_class', 'Hub\State\Peer\NoRouteToHostPeerState');
+$cfg->setConfigEntry('peer_no_route_to_host_state_class', 'Org\Shipsimu\Hub\State\Peer\NoRouteToHostPeerState');
///////////////////////////////////////////////////////////////////////////////
// DHT states
///////////////////////////////////////////////////////////////////////////////
// CFG: DHT-INIT-STATE-CLASS
-$cfg->setConfigEntry('dht_init_state_class', 'Hub\State\Dht\DhtInitState');
+$cfg->setConfigEntry('dht_init_state_class', 'Org\Shipsimu\Hub\State\Dht\DhtInitState');
// CFG: DHT-VIRGIN-STATE-CLASS
-$cfg->setConfigEntry('dht_virgin_state_class', 'Hub\State\Dht\DhtVirginState');
+$cfg->setConfigEntry('dht_virgin_state_class', 'Org\Shipsimu\Hub\State\Dht\DhtVirginState');
// CFG: DHT-BOOTING-STATE-CLASS
-$cfg->setConfigEntry('dht_booting_state_class', 'Hub\State\Dht\DhtBootingState');
+$cfg->setConfigEntry('dht_booting_state_class', 'Org\Shipsimu\Hub\State\Dht\DhtBootingState');
// CFG: DHT-ACTIVE-STATE-CLASS
-$cfg->setConfigEntry('dht_active_state_class', 'Hub\State\Dht\DhtActiveState');
+$cfg->setConfigEntry('dht_active_state_class', 'Org\Shipsimu\Hub\State\Dht\DhtActiveState');
///////////////////////////////////////////////////////////////////////////////
// Message answer-status handler
///////////////////////////////////////////////////////////////////////////////
// CFG: ANNOUNCEMENT-ANSWER-STATUS-OKAY-HANDLER-CLASS
-$cfg->setConfigEntry('announcement_answer_status_okay_handler_class', 'Hub\Handler\Node\Announcement\Answer\NodeAnnouncementAnswerOkayHandler');
+$cfg->setConfigEntry('announcement_answer_status_okay_handler_class', 'Org\Shipsimu\Hub\Handler\Node\Announcement\Answer\NodeAnnouncementAnswerOkayHandler');
// CFG: REQUEST-NODE-LIST-ANSWER-STATUS-OKAY-HANDLER-CLASS
$cfg->setConfigEntry('request_node_list_answer_status_okay_handler_class', 'RequestNodeListAnswerOkayHandler');
///////////////////////////////////////////////////////////////////////////////
// CFG: DIRECT-RECIPIENT-CLASS
-$cfg->setConfigEntry('direct_recipient_class', 'Hub\Network\Recipient\Direct\DirectRecipient');
+$cfg->setConfigEntry('direct_recipient_class', 'Org\Shipsimu\Hub\Network\Recipient\Direct\DirectRecipient');
// CFG: DHT-RECIPIENT-CLASS
-$cfg->setConfigEntry('dht_recipient_class', 'Hub\Network\Recipient\Dht\DhtRecipient');
+$cfg->setConfigEntry('dht_recipient_class', 'Org\Shipsimu\Hub\Network\Recipient\Dht\DhtRecipient');
// CFG: SELF-RECIPIENT-CLASS
-$cfg->setConfigEntry('self_recipient_class', 'Hub\Network\Recipient\Loopback\SelfRecipient');
+$cfg->setConfigEntry('self_recipient_class', 'Org\Shipsimu\Hub\Network\Recipient\Loopback\SelfRecipient');
// CFG: UPPER-RECIPIENT-CLASS
-$cfg->setConfigEntry('upper_recipient_class', 'Hub\Network\Recipient\Upper\UpperRecipient');
+$cfg->setConfigEntry('upper_recipient_class', 'Org\Shipsimu\Hub\Network\Recipient\Upper\UpperRecipient');
///////////////////////////////////////////////////////////////////////////////
// Miner configuration
$cfg->setConfigEntry('miner_default_mode', 'coin');
// CFG: MINER-BUFFER-STACKER-CLASS
-$cfg->setConfigEntry('miner_buffer_stacker_class', 'CoreFramework\Stacker\FiFoStacker');
+$cfg->setConfigEntry('miner_buffer_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
// CFG: HUB-CONSOLE-CMD-CRUNCHER-RESOLVER-CLASS
-$cfg->setConfigEntry('hub_console_cmd_miner_resolver_class', 'Hub\Resolver\Command\HubConsoleCommandResolver');
+$cfg->setConfigEntry('hub_console_cmd_miner_resolver_class', 'Org\Shipsimu\Hub\Resolver\Command\HubConsoleCommandResolver');
// CFG: MINER-PHP-REQUIREMENTS-FILTER
$cfg->setConfigEntry('miner_php_requirements_filter_class', 'MinerPhpRequirementsFilter');
$cfg->setConfigEntry('cruncher_default_mode', 'mcrypt');
// CFG: CRUNCHER-BUFFER-STACKER-CLASS
-$cfg->setConfigEntry('cruncher_buffer_stacker_class', 'CoreFramework\Stacker\FiFoStacker');
+$cfg->setConfigEntry('cruncher_buffer_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
// CFG: HUB-CONSOLE-CMD-CRUNCHER-RESOLVER-CLASS
-$cfg->setConfigEntry('hub_console_cmd_cruncher_resolver_class', 'Hub\Resolver\Command\HubConsoleCommandResolver');
+$cfg->setConfigEntry('hub_console_cmd_cruncher_resolver_class', 'Org\Shipsimu\Hub\Resolver\Command\HubConsoleCommandResolver');
// CFG: CRUNCHER-PHP-REQUIREMENTS-FILTER
$cfg->setConfigEntry('cruncher_php_requirements_filter_class', 'CruncherPhpRequirementsFilter');
$cfg->setConfigEntry('cruncher_test_unit_template_extension', '.xml');
// CFG: CRUNCHER-TEST-UNIT-STACKER-CLASS
-$cfg->setConfigEntry('cruncher_test_unit_stacker_class', 'CoreFramework\Stacker\FiLoStacker');
+$cfg->setConfigEntry('cruncher_test_unit_stacker_class', 'Org\Mxchange\CoreFramework\Stacker\FiLoStacker');
// CFG: CRUNCHER-TEST-UNIT-TEMPLATE-TYPE
$cfg->setConfigEntry('cruncher_test_unit_template_type', 'xml/cruncher/producer');
///////////////////////////////////////////////////////////////////////////////
// CFG: HUB-CONSOLE-CMD-CHAT-RESOLVER-CLASS
-$cfg->setConfigEntry('hub_console_cmd_chat_resolver_class', 'Hub\Resolver\Command\HubConsoleCommandResolver');
+$cfg->setConfigEntry('hub_console_cmd_chat_resolver_class', 'Org\Shipsimu\Hub\Resolver\Command\HubConsoleCommandResolver');
// CFG: CHAT-PHP-REQUIREMENTS-FILTER
$cfg->setConfigEntry('chat_php_requirements_filter_class', 'ChatPhpRequirementsFilter');
$cfg->setConfigEntry('index_extension', '.idx');
// CFG: HUB-CONSOLE-CMD-CHAT-RESOLVER-CLASS
-$cfg->setConfigEntry('hub_console_cmd_crawler_resolver_class', 'Hub\Resolver\Command\HubConsoleCommandResolver');
+$cfg->setConfigEntry('hub_console_cmd_crawler_resolver_class', 'Org\Shipsimu\Hub\Resolver\Command\HubConsoleCommandResolver');
// CFG: CRAWLER-PHP-REQUIREMENTS-FILTER
$cfg->setConfigEntry('crawler_php_requirements_filter_class', 'CrawlerPhpRequirementsFilter');
$cfg->setConfigEntry('crawler_node_communicator_task_class', 'CrawlerNodeCommunicatorTask');
// CFG: CRAWLER-URL-LOCAL-START-STACK-CLASS
-$cfg->setConfigEntry('crawler_url_local_start_stack_class', 'CoreFramework\Stack\Filesystem\FiFoFileStack');
+$cfg->setConfigEntry('crawler_url_local_start_stack_class', 'Org\Mxchange\CoreFramework\Stack\Filesystem\FiFoFileStack');
// CFG: CRAWLER-URL-UPLOADED-LIST-STACK-CLASS
-$cfg->setConfigEntry('crawler_url_uploaded_list_stack_class', 'CoreFramework\Stack\Filesystem\FiFoFileStack');
+$cfg->setConfigEntry('crawler_url_uploaded_list_stack_class', 'Org\Mxchange\CoreFramework\Stack\Filesystem\FiFoFileStack');
// CFG: CRAWLER-URL-RSS-START-STACK-CLASS
-$cfg->setConfigEntry('crawler_url_rss_start_stack_class', 'CoreFramework\Stack\Filesystem\FiFoFileStack');
+$cfg->setConfigEntry('crawler_url_rss_start_stack_class', 'Org\Mxchange\CoreFramework\Stack\Filesystem\FiFoFileStack');
// CFG: CRAWLER-URL-FOUND-RSS-STACK-CLASS
-$cfg->setConfigEntry('crawler_url_found_rss_stack_class', 'CoreFramework\Stack\Filesystem\FiFoFileStack');
+$cfg->setConfigEntry('crawler_url_found_rss_stack_class', 'Org\Mxchange\CoreFramework\Stack\Filesystem\FiFoFileStack');
// CFG: CRAWLER-URL-LOCAL-START-FILE-STACK-INDEX-CLASS
-$cfg->setConfigEntry('crawler_url_local_start_file_stack_index_class', 'CoreFramework\Index\Stack\FileStackIndex');
+$cfg->setConfigEntry('crawler_url_local_start_file_stack_index_class', 'Org\Mxchange\CoreFramework\Index\Stack\FileStackIndex');
// CFG: CRAWLER-URL-UPLOADED-LIST-FILE-STACK-INDEX-CLASS
-$cfg->setConfigEntry('crawler_url_uploaded_list_file_stack_index_class', 'CoreFramework\Index\Stack\FileStackIndex');
+$cfg->setConfigEntry('crawler_url_uploaded_list_file_stack_index_class', 'Org\Mxchange\CoreFramework\Index\Stack\FileStackIndex');
// CFG: CRAWLER-URL-RSS-START-FILE-STACK-INDEX-CLASS
-$cfg->setConfigEntry('crawler_url_rss_start_file_stack_index_class', 'CoreFramework\Index\Stack\FileStackIndex');
+$cfg->setConfigEntry('crawler_url_rss_start_file_stack_index_class', 'Org\Mxchange\CoreFramework\Index\Stack\FileStackIndex');
// CFG: CRAWLER-URL-FOUND-RSS-FILE-STACK-INDEX-CLASS
-$cfg->setConfigEntry('crawler_url_found_rss_file_stack_index_class', 'CoreFramework\Index\Stack\FileStackIndex');
+$cfg->setConfigEntry('crawler_url_found_rss_file_stack_index_class', 'Org\Mxchange\CoreFramework\Index\Stack\FileStackIndex');
// CFG: CRAWLER-URL-UPLOADED-LIST-URL-SOURCE-STACK-CLASS
-$cfg->setConfigEntry('crawler_uploaded_list_url_source_stack_class', 'CoreFramework\Stacker\FiFoStacker');
+$cfg->setConfigEntry('crawler_uploaded_list_url_source_stack_class', 'Org\Mxchange\CoreFramework\Stacker\FiFoStacker');
// CFG: STACKER-CSV-FILE-MAX-SIZE
$cfg->setConfigEntry('stacker_csv_file_max_size', 10);
///////////////////////////////////////////////////////////////////////////////
// CFG: HUB-CONSOLE-CMD-APT-PROXY-RESOLVER-CLASS
-$cfg->setConfigEntry('hub_console_cmd_apt_proxy_resolver_class', 'Hub\Resolver\Command\HubConsoleCommandResolver');
+$cfg->setConfigEntry('hub_console_cmd_apt_proxy_resolver_class', 'Org\Shipsimu\Hub\Resolver\Command\HubConsoleCommandResolver');
// CFG: APT-PROXY-PHP-REQUIREMENTS-FILTER
$cfg->setConfigEntry('apt_proxy_php_requirements_filter_class', 'AptProxyPhpRequirementsFilter');
$cfg->setConfigEntry('default_html_controller', 'index');
// CFG: HTML-CMD-INDEX-RESOLVER-CLASS
-$cfg->setConfigEntry('html_cmd_index_resolver_class', 'Hub\Resolver\Command\HubHtmlCommandResolver');
+$cfg->setConfigEntry('html_cmd_index_resolver_class', 'Org\Shipsimu\Hub\Resolver\Command\HubHtmlCommandResolver');
// CFG: NEWS-READER-INDEX-CLASS
$cfg->setConfigEntry('news_reader_index_class', 'DefaultNewsReader');
///////////////////////////////////////////////////////////////////////////////
// CFG: HUB-CONSOLE-CMD-FUSE-RESOLVER-CLASS
-$cfg->setConfigEntry('hub_console_cmd_fuse_resolver_class', 'CoreFramework\Resolver\Command\ConsoleCommandResolver');
+$cfg->setConfigEntry('hub_console_cmd_fuse_resolver_class', 'Org\Mxchange\CoreFramework\Resolver\Command\ConsoleCommandResolver');
// CFG: ENABLE-FEATURE-FUSE
$cfg->setConfigEntry('enable_feature_fuse', 'N');
<?php
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
-use CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
/**
* An include file for setting up the exception handler of test suite
<?php
// Own namespace
-namespace Hub\Node\Announcement;
+namespace Org\Shipsimu\Hub\Node\Announcement;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when an announcement from other nodes was received
<?php
// Own namespace
-namespace Hub\Node\Announcement;
+namespace Org\Shipsimu\Hub\Node\Announcement;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when an announcement from other nodes was received
<?php
// Own namespace
-namespace Hub\Connection;
+namespace Org\Shipsimu\Hub\Connection;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when an invalid connection type is being detected
<?php
// Own namespace
-namespace Hub\Dht\Bootstrap;
+namespace Org\Shipsimu\Hub\Dht\Bootstrap;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
+use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when a DHT bootstrap request from other nodes was
<?php
// Own namespace
-namespace Hub\Dht;
+namespace Org\Shipsimu\Hub\Dht;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
+use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when an DHT bootstrap answer comes but this node
<?php
// Own namespace
-namespace Hub\Factory\Parameter;
+namespace Org\Shipsimu\Hub\Factory\Parameter;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown if not all required parameter are given.
<?php
// Own namespace
-namespace Hub\Node\Data;
+namespace Org\Shipsimu\Hub\Node\Data;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when a hash is invalid
<?php
// Own namespace
-namespace Hub\Node\Announcement;
+namespace Org\Shipsimu\Hub\Node\Announcement;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when *this* (local) node has already been announced.
<?php
// Own namespace
-namespace Hub\Node\Verification;
+namespace Org\Shipsimu\Hub\Node\Verification;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when a provided session id in a message cannot be
<?php
// Own namespace
-namespace Hub\Node\Network\Chunk;
+namespace Org\Shipsimu\Hub\Node\Network\Chunk;
// Import application-specific stuff
-use Hub\Network\Package\Fragment\PackageFragmenter;
+use Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when the final (last) chunks does not contain the
<?php
// Own namespace
-namespace Hub\RawData;
+namespace Org\Shipsimu\Hub\RawData;
// Import application-specific stuff
-use Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when the checksum (sometimes called "hash") of the
<?php
// Own namespace
-namespace Hub\Node\Generic;
+namespace Org\Shipsimu\Hub\Node\Generic;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when a private key's hash is invalid (e.g. empty).
<?php
// Own namespace
-namespace Hub\Status\Package;
+namespace Org\Shipsimu\Hub\Status\Package;
// Import application-specific stuff
-use Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when an unexpected package status was detected.
<?php
// Own namespace
-namespace Hub\Handler\Network\PackageCode;
+namespace Org\Shipsimu\Hub\Handler\Network\PackageCode;
// Import application-specific stuff
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
+use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when an unexpected package status was detected.
$messageArray[0]->__toString(),
$this->getLine(),
$messageArray[1],
- $messageArray[2][BaseRawDataHandler::PACKAGE_ERROR_CODE]
+ $messageArray[2][HandleableRawData::PACKAGE_ERROR_CODE]
);
// Call parent exception constructor
<?php
// Own namespace
-namespace Hub\Peer;
+namespace Org\Shipsimu\Hub\Peer;
// Import application-specific stuff
-use Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when a peer is already registered
<?php
// Own namespace
-namespace Hub\Node\Messaging;
+namespace Org\Shipsimu\Hub\Node\Messaging;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when
<?php
// Own namespace
-namespace Hub\Node\Messaging;
+namespace Org\Shipsimu\Hub\Node\Messaging;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when an incoming request (e.g. node-list has been
<?php
// Own namespace
-namespace Hub\Socket;
+namespace Org\Shipsimu\Hub\Socket;
// Inport application-specific stuff
-use Hub\Handler\Protocol\HandleableProtocol;
+use Org\Shipsimu\Hub\Handler\Protocol\HandleableProtocol;
// Import framework stuff
-use CoreFramework\Socket\AbstractSocketException;
+use Org\Mxchange\CoreFramework\Socket\AbstractSocketException;
/**
* This exception is thrown when the requested socket is not thrown
<?php
// Own namespace
-namespace Hub\Socket;
+namespace Org\Shipsimu\Hub\Socket;
// Import application-specific stuff
-use Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
// Import framework stuff
-use CoreFramework\Socket\AbstractSocketException;
+use Org\Mxchange\CoreFramework\Socket\AbstractSocketException;
/**
* This exception is thrown if the socket cannot be shut down is not error 107
<?php
// Own namespace
-namespace Hub\Network\Message;
+namespace Org\Shipsimu\Hub\Network\Message;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when multiple messages are found in in-buffer.
<?php
// Own namespace
-namespace Hub\Node\Tagging;
+namespace Org\Shipsimu\Hub\Node\Tagging;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when a tag is invalid
<?php
// Own namespace
-namespace CoreFramework\Task;
+namespace Org\Mxchange\CoreFramework\Task;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when a task is invalid
<?php
// Own namespace
-namespace Hub\Unl;
+namespace Org\Shipsimu\Hub\Unl;
// Import application-specific stuff
-use Hub\Network\Package\NetworkPackage;
+use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when a protocol handler cannot validate given package data's recipient (UNL).
<?php
// Own namespace
-namespace Hub\Node\Registering;
+namespace Org\Shipsimu\Hub\Node\Registering;
// Import application-specific stuff
-use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when a node is already registered and registerNode() has been called again
<?php
// Own namespace
-namespace Hub\Node\Data;
+namespace Org\Shipsimu\Hub\Node\Data;
// Import application-specific stuff
-use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Org\Shipsimu\Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
// Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* This exception is thrown when a node is not yet registered and updateNode() has been called
<?php
// Own namespace
-namespace Hub\AptProxy;
+namespace Org\Shipsimu\Hub\AptProxy;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* An interface for apt-proxy classes
<?php
// Own namespace
-namespace Hub\Miner;
+namespace Org\Shipsimu\Hub\Miner;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for minable (blocks)
<?php
// Own namespace
-namespace Hub\Chatter;
+namespace Org\Shipsimu\Hub\Chatter;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* An interface for chatter classes
<?php
// Own namespace
-namespace Hub\Generic;
+namespace Org\Shipsimu\Hub\Generic;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
// Inport frameworks stuff
-use CoreFramework\Generic\FrameworkInterface;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
/**
* This is the top-level interface for all hub-based interfaces.
<?php
+// Own namespace
+namespace Org\ShipSimu\Hub\Communicator;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Executor\Executor;
+
/**
* An interface for communicators
*
*/
interface Communicator extends Executor {
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\Consumer;
+namespace Org\Shipsimu\Hub\Consumer;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for the producer/consumer implementation
<?php
// Own namespace
-namespace Hub\Container\Socket;
+namespace Org\Shipsimu\Hub\Container\Socket;
// Import application-related stuff
-use Hub\Information\ShareableInfo;
+use Org\Shipsimu\Hub\Information\ShareableInfo;
// Inport frameworks stuff
-use CoreFramework\Generic\FrameworkInterface;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
/**
* An interface for socket containers
const SOCKET_ARRAY_INDEX_FILE = 'socket_file';
const SOCKET_ARRAY_INDEX_ADDRESS = 'socket_address';
const SOCKET_ARRAY_INDEX_PORT = 'socket_port';
+ const SOCKET_ARRAY_INDEX_TYPE = 'socket_type';
// Socket protocols
const SOCKET_PROTOCOL_INVALID = 'invalid';
*/
function registerInfoInstance (ShareableInfo $infoInstance);
+ /**
+ * Reads (binary) data from socket instance
+ *
+ * @return $rawData Raw data being read
+ * @throws InvalidSocketException If the stored socket is not valid
+ */
+ function readDataFromSocket ();
+
}
<?php
// Own namespace
-namespace Hub\Crawler;
+namespace Org\Shipsimu\Hub\Crawler;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Response\Responseable;
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* An interface for crawler classes
<?php
// Own namespace
-namespace Hub\Helper\Cruncher;
+namespace Org\Shipsimu\Hub\Helper\Cruncher;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* An interface for "node-helper" classes
<?php
// Own namespace
-namespace Hub\Database\Frontend\Node\Dht;
+namespace Org\Shipsimu\Hub\Database\Frontend\Node\Dht;
// Import framework stuff
-use CoreFramework\Criteria\Local\LocalSearchCriteria;
-use CoreFramework\Database\Frontend\DatabaseWrapper;
-use CoreFramework\Handler\DataSet\HandleableDataSet;
+use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
+use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
+use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet;
/**
* An interface for distributed hash tables for nodes
<?php
// Own namespace
-namespace Hub\Database\Frontend\Node;
+namespace Org\Shipsimu\Hub\Database\Frontend\Node;
// Import application-specific stuff
-use Hub\Node\BaseHubNode;
+use Org\Shipsimu\Hub\Node\BaseHubNode;
// Import framework stuff
-use CoreFramework\Criteria\Local\LocalSearchCriteria;
-use CoreFramework\Database\Frontend\DatabaseWrapper;
-use CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
+use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
+use Org\Mxchange\CoreFramework\Request\Requestable;
/**
* An interface for node-information (database) wrapper
<?php
// Own namespace
-namespace Hub\Database\Frontend\Unit;
+namespace Org\Shipsimu\Hub\Database\Frontend\Unit;
// Import framework stuff
-use CoreFramework\Database\Frontend\DatabaseWrapper;
+use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
/**
* An interface for cruncher unit database wrappers
<?php
// Own namespace
-namespace Hub\Decoder;
+namespace Org\Shipsimu\Hub\Decoder;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for decoders
namespace Hub\Discovery\;
// Import framework stuff
-use CoreFramework\Discovery\Discoverable;
+use Org\Mxchange\CoreFramework\Discovery\Discoverable;
/**
* An interface for !!! discovery
<?php
// Own namespace
-namespace Hub\Discovery\Protocol;
+namespace Org\Shipsimu\Hub\Discovery\Protocol;
// Import framework stuff
-use CoreFramework\Discovery\Discoverable;
+use Org\Mxchange\CoreFramework\Discovery\Discoverable;
/**
* An interface for protocol discovery
<?php
// Own namespace
-namespace Hub\Discovery\Recipient;
+namespace Org\Shipsimu\Hub\Discovery\Recipient;
// Import framework stuff
-use CoreFramework\Discovery\Discoverable;
+use Org\Mxchange\CoreFramework\Discovery\Discoverable;
/**
* An interface for recipient discovery
<?php
// Own namespace
-namespace Hub\Discovery\Recipient\Dht;
+namespace Org\Shipsimu\Hub\Discovery\Recipient\Dht;
// Import application-specific stuff
-use Hub\Discovery\Recipient\DiscoverableRecipient;
+use Org\Shipsimu\Hub\Discovery\Recipient\DiscoverableRecipient;
/**
* An interface for DHT recipient discovery
<?php
// Own namespace
-namespace Hub\Discovery\Recipient\Node;
+namespace Org\Shipsimu\Hub\Discovery\Recipient\Node;
// Import application-specific stuff
-use Hub\Discovery\Recipient\DiscoverableRecipient;
+use Org\Shipsimu\Hub\Discovery\Recipient\DiscoverableRecipient;
/**
* An interface for node recipient discovery
<?php
// Own namespace
-namespace Hub\Discovery\Socket;
+namespace Org\Shipsimu\Hub\Discovery\Socket;
// Import application-specific stuff
-use Hub\Discovery\Recipient\DiscoverableRecipient;
-use Hub\Handler\Protocol\HandleableProtocol;
+use Org\Shipsimu\Hub\Discovery\Recipient\DiscoverableRecipient;
+use Org\Shipsimu\Hub\Handler\Protocol\HandleableProtocol;
/**
* An interface for socket discovery
* matching socket resource.
*
* @param $packageData Raw package data array
- * @param $connectionType Type of connection, can be 'incoming' or 'outgoing', *NEVER* 'server'!
+ * @param $connectionType Type of connection, can be either 'incoming' or 'outgoing', but *NEVER* 'server'!
* @return $socketInstance An instance of a StorableSocket class
* @throws NoListGroupException If the procol group is not found in peer list
* @throws NullPointerException If listenerInstance is NULL
<?php
// Own namespace
-namespace Hub\Discovery\Locator;
+namespace Org\Shipsimu\Hub\Discovery\Locator;
// Import application-specific stuff
-use Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
// Import framework stuff
-use CoreFramework\Discovery\Discoverable;
+use Org\Mxchange\CoreFramework\Discovery\Discoverable;
/**
* An interface for UNL discovery
<?php
// Own namespace
-namespace Hub\Dht;
+namespace Org\Shipsimu\Hub\Dht;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for DHTs
<?php
// Own namespace
-namespace Hub\Dht\Node;
+namespace Org\Shipsimu\Hub\Dht\Node;
// Import application-specific stuff
-use Hub\Dht\Distributable;
+use Org\Shipsimu\Hub\Dht\Distributable;
// Import framework stuff
-use CoreFramework\Handler\DataSet\HandleableDataSet;
+use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet;
/**
* An interface for DHTs
+++ /dev/null
-Deny from all
+++ /dev/null
-<?php
-// Own namespace
-namespace Hub\Executor;
-
-// Import application-specific stuff
-use Hub\Generic\HubInterface;
-
-// Import framework stuff
-use CoreFramework\State\Stateable;
-
-/**
- * A Executor interface
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-interface Executor extends HubInterface {
- /**
- * Initializes the executor, whatever it does.
- *
- * @return void
- */
- function initExecutor (Stateable $stateInstance);
-}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\Filter\Network;
+namespace Org\Shipsimu\Hub\Filter\Network;
// Import application-specific stuff
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Filter\Filterable;
/**
* A class for package filters
<?php
// Own namespace
-namespace Hub\AnswerStatus\Node;
+namespace Org\Shipsimu\Hub\AnswerStatus\Node;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Criteria\Storing\StoreableCriteria;
-use CoreFramework\Handler\DataSet\HandleableDataSet;
+use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
+use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet;
/**
* A HandleableAnswerStatus interface
<?php
// Own namespace
-namespace Hub\Handler\Network\RawData\Chunks;
+namespace Org\Shipsimu\Hub\Handler\Network\RawData\Chunks;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
// Import framework stuff
-use CoreFramework\Handler\Handleable;
+use Org\Mxchange\CoreFramework\Handler\Handleable;
/**
* An interface for chunk handlers
<?php
// Own namespace
-namespace Hub\Handler\Message;
+namespace Org\Shipsimu\Hub\Handler\Message;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Handler\DataSet\HandleableDataSet;
+use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet;
/**
* An interface for message handlers
<?php
// Own namespace
-namespace Hub\Network;
+namespace Org\Shipsimu\Hub\Network;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Handler\Network\RawData\HandleableRawData;
// Import framework stuff
-use CoreFramework\Handler\DataSet\HandleableDataSet;
+use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet;
/**
* A Networkable interface
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-interface Networkable extends HandleableDataSet, HubInterface {
+interface Networkable extends HandleableDataSet, HandleableRawData {
/**
* Processes raw data from given socket instance. This is mostly useful for
* package handling and is implemented in the TcpListener class.
*
- * @param $socketData A valid socket resource array
+ * @param $socketInstance An instance of a StorableSocket class
* @return void
* @throws InvalidResourceException If the given resource is invalid
*/
- function processRawDataFromSocketArray (array $socketData);
+ function processRawDataFromSocketInstance (StorableSocket $socketInstance);
/**
* Checks whether decoded data is pending for further processing.
<?php
// Own namespace
-namespace Hub\Handler\Protocol;
+namespace Org\Shipsimu\Hub\Handler\Protocol;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
// Import framework stuff
-use CoreFramework\Handler\Handleable;
+use Org\Mxchange\CoreFramework\Handler\Handleable;
/**
* An interface for protocol handlers
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Handler\Network\RawData;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Generic\HubInterface;
+
+/**
+ * An interface for raw-data handler
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface HandleableRawData extends HubInterface {
+ // - Package errors
+ const PACKAGE_ERROR_INVALID_DATA = 'invalid_data'; // Invalid data in package found
+ const PACKAGE_ERROR_INCOMPLETE_DATA = 'incomplete_data'; // Incomplete data sent (e.g. field is missing)
+ const PACKAGE_ERROR_INVALID_CONTENT = 'invalid_content'; // Content is invalid (e.g. not well-formed)
+ const PACKAGE_ERROR_RECIPIENT_MISMATCH = 'recipient_error'; // Recipient is not us
+ const PACKAGE_LEVEL_CHECK_OKAY = 'checked_package'; // Package is fine
+
+ // Package data
+ const PACKAGE_RAW_DATA = 'raw_data';
+ const PACKAGE_ERROR_CODE = 'error_code';
+
+ // Start/end marker
+ const STREAM_START_MARKER = '[[S]]';
+ const STREAM_END_MARKER = '[[E]]';
+
+ /**
+ * Stacker for raw data
+ */
+ const STACKER_NAME_RAW_DATA = 'raw_data';
+
+ /**
+ * Checks whether raw data is pending for further processing.
+ *
+ * @return $isPending Whether raw data is pending
+ */
+ function isRawDataPending ();
+
+ /**
+ * "Getter" for next raw data from the stacker
+ *
+ * @return $rawData Raw data from the stacker
+ */
+ function getNextRawData ();
+
+ /**
+ * Setter for error code
+ *
+ * @param $errorCode The error code we shall set
+ * @return void
+ */
+ function setErrorCode ($errorCode);
+
+ /**
+ * Getter for error code
+ *
+ * @return $errorCode The error code
+ */
+ function getErrorCode ();
+
+}
<?php
// Own namespace
-namespace Hub\Helper\Connection;
+namespace Org\Shipsimu\Hub\Helper\Connection;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Helper\HubHelper;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Helper\HubHelper;
/**
* An interface for connection helper classes
<?php
// Own namespace
-namespace Hub\Helper\Dht;
+namespace Org\Shipsimu\Hub\Helper\Dht;
// Import application-specific stuff
-use Hub\Dht\Distributable;
-use Hub\Helper\HubHelper;
+use Org\Shipsimu\Hub\Dht\Distributable;
+use Org\Shipsimu\Hub\Helper\HubHelper;
/**
* An interface for hub helper classes
<?php
// Own namespace
-namespace Hub\Helper;
+namespace Org\Shipsimu\Hub\Helper;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
// Import framework stuff
-use CoreFramework\Helper\Helper;
+use Org\Mxchange\CoreFramework\Helper\Helper;
/**
* An general interface for hub helper classes
<?php
// Own namespace
-namespace Hub\Helper\Message;
+namespace Org\Shipsimu\Hub\Helper\Message;
// Import framework stuff
-use CoreFramework\Helper\Helper;
+use Org\Mxchange\CoreFramework\Helper\Helper;
/**
* An interface for message helper
<?php
// Own namespace
-namespace Hub\Node\Helper;
+namespace Org\Shipsimu\Hub\Node\Helper;
// Import application-specific stuff
-use Hub\Helper\HubHelper;
-use Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Helper\HubHelper;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
/**
* An interface for node helper classes
<?php
// Own namespace
-namespace Hub\Helper\Node;
+namespace Org\Shipsimu\Hub\Helper\Node;
// Import application-specific stuff
-use Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
// Import framework stuff
-use CoreFramework\Criteria\Add\AddableCriteria;
-use CoreFramework\Handler\Task\HandleableTask;
-use CoreFramework\Helper\Helper;
-use CoreFramework\Request\Requestable;
-use CoreFramework\Response\Responseable;
-use CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Criteria\Add\AddableCriteria;
+use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
+use Org\Mxchange\CoreFramework\Helper\Helper;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Task\Taskable;
/**
* An interface for "node-helper" classes
<?php
// Own namespace
-namespace Hub\Listener;
+namespace Org\Shipsimu\Hub\Listener;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for listeners
<?php
// Own namespace
-namespace Hub\Locator\Node;
+namespace Org\Shipsimu\Hub\Locator\Node;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for node locators (UNL mostly)
<?php
// Own namespace
-namespace Hub\LookupTable;
+namespace Org\Shipsimu\Hub\LookupTable;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for lookup tables
<?php
// Own namespace
-namespace Hub\State\Node\Lookup;
+namespace Org\Shipsimu\Hub\State\Node\Lookup;
// Import application-specific stuff
-use Hub\LookupTable\Lookupable;
+use Org\Shipsimu\Hub\LookupTable\Lookupable;
/**
* An interface for node-state lookup tables
<?php
// Own namespace
-namespace Hub\State\Peer\Lookup;
+namespace Org\Shipsimu\Hub\State\Peer\Lookup;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\LookupTable\Lookupable;
-use Hub\State\Peer\PeerStateable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\LookupTable\Lookupable;
+use Org\Shipsimu\Hub\State\Peer\PeerStateable;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* An interface for peer-state lookup table wrappers
<?php
// Own namespace
-namespace Hub\Helper\Miner;
+namespace Org\Shipsimu\Hub\Helper\Miner;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
// Import framework stuff
-use CoreFramework\Controller\Controller;
-use CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Response\Responseable;
/**
* An interface for "node-helper" classes
<?php
// Own namespace
-namespace Hub\Network\Package\Assembler;
+namespace Org\Shipsimu\Hub\Network\Package\Assembler;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for a package assembler
<?php
// Own namespace
-namespace Hub\Network\Deliver;
+namespace Org\Shipsimu\Hub\Network\Deliver;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
-use Hub\Helper\HubHelper;
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Helper\HubHelper;
/**
* An interface for package delivery boys... ;-)
<?php
// Own namespace
-namespace Hub\Network\Receive;
+namespace Org\Shipsimu\Hub\Network\Receive;
// Import application-specific stuff
-use Hub\Network\Networkable;
+use Org\Shipsimu\Hub\Network\Networkable;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for package receivers
<?php
// Own namespace
-namespace Hub\Network\Package\Fragment;
+namespace Org\Shipsimu\Hub\Network\Package\Fragment;
// Import application-specific stuff
-use Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for a package fragmenter
<?php
// Own namespace
-namespace Hub\Pool;
+namespace Org\Shipsimu\Hub\Pool;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* A Poolable interface
<?php
// Own namespace
-namespace Hub\Pool\Listener;
+namespace Org\Shipsimu\Hub\Pool\Listener;
// Import application-specific stuff
-use Hub\Listener\Listenable;
-use Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Pool\Poolable;
// Import framework stuff
<?php
// Own namespace
-namespace Hub\Pool\Peer;
+namespace Org\Shipsimu\Hub\Pool\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Pool\Poolable;
-use Hub\Tag\Socket\SocketTag;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Pool\Poolable;
+use Org\Shipsimu\Hub\Tag\Socket\SocketTag;
/**
* An interface for peer pools
<?php
// Own namespace
-namespace Hub\Producer\Block;
+namespace Org\Shipsimu\Hub\Producer\Block;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* An interface for the producer/consumer implementation, especially for block
*/
function prepareBlockProduction (Stateable $stateInstance);
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\Producer;
+namespace Org\Shipsimu\Hub\Producer;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for the producer/consumer implementation
<?php
// Own namespace
-namespace Hub\Producer\Key;
+namespace Org\Shipsimu\Hub\Producer\Key;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* An interface for the producer/consumer implementation, especially for key
*/
function produceKeys (Stateable $stateInstance);
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\Producer\Unit;
+namespace Org\Shipsimu\Hub\Producer\Unit;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* An interface for the producer/consumer implementation, especially for work/
*/
function initUnitProduction (Stateable $stateInstance);
}
-
-// [EOF]
-?>
<?php
// Own namespace
-namespace Hub\Network\Recipient;
+namespace Org\Shipsimu\Hub\Network\Recipient;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
// Import framework stuff
-use CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Lists\Listable;
/**
* An interface for recipients
<?php
// Own namespace
-namespace Hub\Registry\Socket;
+namespace Org\Shipsimu\Hub\Registry\Socket;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Information\ShareableInfo;
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Information\ShareableInfo;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import framework stuff
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A class for registerable socket classes
*/
function getInfoInstanceFromPackageData (array $packageData);
+ /**
+ * Checks whether a socket of a connection type 'incoming' is registered.
+ *
+ * @return $isRegistered Whether such a socket is registered
+ */
+ function isIncomingSocketRegistered ();
+
}
<?php
// Own namespace
-namespace Hub\Resolver\Protocol;
+namespace Org\Shipsimu\Hub\Resolver\Protocol;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
-use Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
/**
<?php
// Own namespace
-namespace Hub\Resolver\State;
+namespace Org\Shipsimu\Hub\Resolver\State;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
// Import framework stuff
-use CoreFramework\Resolver\Resolver;
+use Org\Mxchange\CoreFramework\Resolver\Resolver;
/**
* An instance for state resolver classes
<?php
// Own namespace
-namespace Hub\Scanner;
+namespace Org\Shipsimu\Hub\Scanner;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for scanners
<?php
// Own namespace
-namespace Hub\Information;
+namespace Org\Shipsimu\Hub\Information;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\Helper\Connection\ConnectionHelper;
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Container\Socket\StorableSocket;
+use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
// Import framework stuff
*/
function fillWithSocketPeerInformation (StorableSocket $socketInstance);
+ /**
+ * Getter for connection type
+ *
+ * @return $connectionType Connection type
+ */
+ function getConnectionType ();
+
}
<?php
// Own namespace
-namespace Hub\Tag\Socket;
+namespace Org\Shipsimu\Hub\Tag\Socket;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface/tag for socket classes
<?php
// Own namespace
-namespace Hub\Source;
+namespace Org\Shipsimu\Hub\Source;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for sources
<?php
// Own namespace
-namespace Hub\State\Client;
+namespace Org\Shipsimu\Hub\State\Client;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* An interface for client states
<?php
// Own namespace
-namespace Hub\State;
+namespace Org\Shipsimu\Hub\State;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* An interface for hub states
<?php
// Own namespace
-namespace Hub\State\Peer;
+namespace Org\Shipsimu\Hub\State\Peer;
// Import framework stuff
-use CoreFramework\State\Stateable;
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* An interface for Peer states
<?php
// Own namespace
-namespace Hub\Tag;
+namespace Org\Shipsimu\Hub\Tag;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import framework stuff
<?php
// Own namespace
-namespace Hub\Visitor\Listener;
+namespace Org\Shipsimu\Hub\Visitor\Listener;
// Import application-specific stuff
-use Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Listener\Listenable;
// Import framework stuff
-use CoreFramework\Visitor\Visitor;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* An interface for the visitor implementation for listeners
<?php
// Own namespace
-namespace Hub\Visitor\Pool;
+namespace Org\Shipsimu\Hub\Visitor\Pool;
// Import framework stuff
-use Hub\Pool\Poolable;
-use CoreFramework\Visitor\Visitor;
+use Org\Shipsimu\Hub\Pool\Poolable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
/**
* An interface for the visitor implementation for pools
<?php
// Own namespace
-namespace Hub\Visitor\Pool\Listener;
+namespace Org\Shipsimu\Hub\Visitor\Pool\Listener;
// Import application-specific stuff
-use Hub\Listener\Listenable;
-use Hub\Visitor\Pool\PoolVisitor;
+use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Visitor\Pool\PoolVisitor;
/**
* An interface for the visitor implementation for pools
<?php
// Own namespace
-namespace Hub\Helper\Unit;
+namespace Org\Shipsimu\Hub\Helper\Unit;
// Import application-specific stuff
-use Hub\Generic\HubInterface;
+use Org\Shipsimu\Hub\Generic\HubInterface;
/**
* An interface for work/test/foo unit helper
-Subproject commit e72033bed456c820815feeb2d25335245499448e
+Subproject commit 14dcd1503b3965144b5450299f3208d9b052cfc0
<?php
// Own namespace (watch out: core)
-namespace CoreFramework\EntryPoint;
+namespace Org\Mxchange\CoreFramework\EntryPoint;
// Import framework stuff
-use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Configuration\FrameworkConfiguration;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Filesystem\FileNotFoundException;
-use CoreFramework\Helper\Application\ApplicationHelper;
-use CoreFramework\Localization\LanguageSystem;
-use CoreFramework\Loader\ClassLoader;
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException;
+use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
+use Org\Mxchange\CoreFramework\Localization\LanguageSystem;
+use Org\Mxchange\CoreFramework\Loader\ClassLoader;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
// Import SPL stuff
use \Exception;
*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.shipsimu.org
*
* @return void
* @todo This method is old code and needs heavy rewrite and should be moved to ApplicationHelper
*/
- public static final function app_exit ($message = '', $code = false, $extraData = '', $silentMode = false) {
+ public static final function exitApplication ($message = '', $code = false, $extraData = '', $silentMode = false) {
// Is this method already called?
if (isset($GLOBALS['app_die_called'])) {
// Then output the text directly
} // END - if
// Get config instance
- $configInstance = FrameworkConfiguration::getSelfInstance();
+ $configInstance = FrameworkBootstrap::getConfigurationInstance();
// Do we have debug installation?
if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === true)) {
$applicationInstance = NULL;
// Is the class there?
- if (class_exists('CoreFramework\Helper\Application\ApplicationHelper')) {
+ if (class_exists('Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper')) {
// Get application instance
$applicationInstance = ApplicationHelper::getSelfInstance();
// Is it not set?
if (empty(self::$frameworkPath)) {
// Auto-detect core path (first application-common)
- foreach (array('core', '.', '/usr/local/share/php/core', '/usr/share/php/core') as $possiblePath) {
+ foreach (array('core', __DIR__, '/usr/local/share/php/core', '/usr/share/php/core') as $possiblePath) {
// Create full path for testing
$realPath = realpath($possiblePath);
continue;
} // END - if
+ // Append framework path
+ $frameworkPath = sprintf('%s%sframework%s', $realPath, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR);
+
// First create full-qualified file name (FQFN) to framework/config-global.php
- $fqfn = sprintf(
- '%s%sframework%sconfig-global.php',
- $realPath,
- DIRECTORY_SEPARATOR,
- DIRECTORY_SEPARATOR,
- $possiblePath
- );
+ $configFile = $frameworkPath . 'config-global.php';
// Debug message
- //* NOISY-DEBUG: */ printf('[%s:%d]: fqfn=%s' . PHP_EOL, __METHOD__, __LINE__, $fqfn);
+ //* NOISY-DEBUG: */ printf('[%s:%d]: configFile=%s' . PHP_EOL, __METHOD__, __LINE__, $configFile);
// Is it readable?
- if (is_readable($fqfn)) {
+ if (is_readable($configFile)) {
// Found one
- self::$frameworkPath = $realPath . '/framework/';
+ self::$frameworkPath = $frameworkPath;
// Abort here
break;