3 * StatusNet - the distributed open-source microblogging tool
4 * Copyright (C) 2010, StatusNet, Inc.
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * Queue handler for pre-processed outgoing XMPP messages.
22 * Formatted XML stanzas will have been pushed into the queue
23 * via the Queued_XMPP connection proxy, probably from some
24 * other queue processor.
26 * Here, the XML stanzas are simply pulled out of the queue and
27 * pushed out over the wire; an XmppManager is needed to set up
28 * and maintain the actual server connection.
30 * This queue will be run via XmppDaemon rather than QueueDaemon.
32 * @author Brion Vibber <brion@status.net>
34 class XmppOutQueueHandler extends QueueHandler
36 function transport() {
41 * Take a previously-queued XMPP stanza and send it out ot the server.
43 * @return boolean true on success
47 assert(is_string($msg));
49 $xmpp = XmppManager::get();
50 $ok = $xmpp->send($msg);