*prechod na novsiu verziu ZF
[sport-group.git] / library / Zend / Queue / Stomp / Client / ConnectionInterface.php
blob9d5e0f247ed59d0d2da346221ceeb06b98b813a0
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
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.
15 * @category Zend
16 * @package Zend_Queue
17 * @subpackage Stomp
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 $
23 /**
24 * The Stomp client interacts with a Stomp server.
26 * @category Zend
27 * @package Zend_Queue
28 * @subpackage Stomp
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
34 /**
35 * @param string $scheme ['tcp', 'udp']
36 * @param string host
37 * @param integer port
38 * @param string class - create a connection with this class; class must support Zend_Queue_Stomp_Client_Connection_Interface
39 * @return boolean
41 public function open($scheme, $host, $port);
43 /**
44 * @param boolean $destructor
45 * @return void
47 public function close($destructor = false);
49 /**
50 * Check whether we are connected to the server
52 * @return true
53 * @throws Zend_Queue_Exception
55 public function ping();
57 /**
58 * write a frame to the stomp server
60 * @example $response = $client->write($frame)->read();
62 * @param Zend_Queue_Stomp_FrameInterface $frame
63 * @return $this
65 public function write(Zend_Queue_Stomp_FrameInterface $frame);
67 /**
68 * tests the socket to see if there is data for us
70 public function canRead();
72 /**
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();
80 /**
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);
90 /**
91 * Get the frameClass
93 * @return string
95 public function getFrameClass();
97 /**
98 * create an empty frame
100 * @return Zend_Queue_Stomp_FrameInterface class
102 public function createFrame();