* @version 0.0.0 * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.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 . */ interface Deliverable extends FrameworkInterface { /** * "Enqueues" raw content into this delivery class by reading the raw content * from given template instance and pushing it on the 'undeclared' stack. * * @param $helperInstance A BaseHubHelper instance * @return void */ function enqueueRawDataFromTemplate (BaseHubHelper $helperInstance); /** * Checks wether a package has been enqueued for delivery. * * @return $isEnqueued Wether a package is enqueued */ function isPackageEnqueued (); /** * Checks wether a package has been declared * * @return $isDeclared Wether a package is declared */ function isPackageDeclared (); /** * Checks wether a package should be sent out * * @return $isWaitingDelivery Wether a package is waiting for delivery */ function isPackageWaitingDelivery (); /** * Delivers an enqueued package to the stated destination. If a non-session * id is provided, recipient resolver is being asked (and instanced once). * This allows that a single package is being delivered to multiple targets * without enqueueing it for every target. If no target is provided or it * can't be determined a NoTargetException is being thrown. * * @return void * @throws NoTargetException If no target can't be determined */ function declareEnqueuedPackage (); /** * Delivers the next declared package. Only one package per time will be sent * because this may take time and slows down the whole delivery * infrastructure. * * @return void */ function deliverDeclaredPackage (); /** * Sends waiting packages out for delivery * * @return void */ function sendWaitingPackage (); } // [EOF] ?>