7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: ConnectionInterface.php 17241 2009-07-28 13:01:20Z matthew $
24 * The Stomp client interacts with a Stomp server.
29 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
30 * @license http://framework.zend.com/license/new-bsd New BSD License
32 interface Zend_Queue_Stomp_Client_ConnectionInterface
35 * @param string $scheme ['tcp', 'udp']
38 * @param string class - create a connection with this class; class must support Zend_Queue_Stomp_Client_Connection_Interface
41 public function open($scheme, $host, $port);
44 * @param boolean $destructor
47 public function close($destructor = false);
50 * Check whether we are connected to the server
53 * @throws Zend_Queue_Exception
55 public function ping();
58 * write a frame to the stomp server
60 * @example $response = $client->write($frame)->read();
62 * @param Zend_Queue_Stomp_FrameInterface $frame
65 public function write(Zend_Queue_Stomp_FrameInterface
$frame);
68 * tests the socket to see if there is data for us
70 public function canRead();
73 * reads in a frame from the socket or returns false.
75 * @return Zend_Queue_Stomp_Frame|false
76 * @throws Zend_Queue_Exception
78 public function read();
81 * Set the frame class to be used
83 * This must be a Zend_Queue_Stomp_FrameInterface.
85 * @param string $class
86 * @return Zend_Queue_Stomp_Client_ConnectionInterface;
88 public function setFrameClass($class);
95 public function getFrameClass();
98 * create an empty frame
100 * @return Zend_Queue_Stomp_FrameInterface class
102 public function createFrame();