. * * @category QueueManager * @package StatusNet * @author Evan Prodromou * @author Sarven Capadisli * @author Brion Vibber * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ class UnQueueManager extends QueueManager { /** * Dummy queue storage manager: instead of saving events for later, * we just process them immediately. This is only suitable for events * that can be processed quickly and don't need polling or long-running * connections to another server such as XMPP. * * @param Notice $object * @param string $queue */ function enqueue($object, $queue) { $notice = $object; $handler = $this->getHandler($queue); if ($handler) { $handler->handle($notice); } else { if (Event::handle('UnqueueHandleNotice', array(&$notice, $queue))) { throw new ServerException("UnQueueManager: Unknown queue: $queue"); } } } }