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: FrameInterface.php 16971 2009-07-22 18:05:45Z mikaelkael $
24 * This class represents a Stomp Frame Interface
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_FrameInterface
35 * Get the status of the auto content length
37 * If AutoContentLength is true this code will automatically put the
38 * content-length header in, even if it is already set by the user.
40 * This is done to make the message sending more reliable.
44 public function getAutoContentLength();
47 * setAutoContentLength()
49 * Set the value on or off.
51 * @param boolean $auto
53 * @throws Zend_Queue_Exception
55 public function setAutoContentLength($auto);
62 public function getHeaders();
67 * Throws an exception if the array values are not strings.
69 * @param array $headers
71 * @throws Zend_Queue_Exception
73 public function setHeaders(array $headers);
76 * Returns a value for a header
77 * returns false if the header does not exist
79 * @param string $header
81 * @throws Zend_Queue_Exception
83 public function getHeader($header);
86 * Returns a value for a header
87 * returns false if the header does not exist
89 * @param string $header
90 * @param string $value
92 * @throws Zend_Queue_Exception
94 public function setHeader($header, $value);
97 * Return the body for this frame
98 * returns false if the body does not exist
102 public function getBody();
105 * Set the body for this frame
106 * returns false if the body does not exist
108 * Set to null for no body.
110 * @param string|null $body
112 * @throws Zend_Queue_Exception
114 public function setBody($body);
117 * Return the command for this frame
118 * return false if the command does not exist
122 public function getCommand();
125 * Set the body for this frame
126 * returns false if the body does not exist
129 * @throws Zend_Queue_Exception
131 public function setCommand($command);
135 * Takes the current parameters and returns a Stomp Frame
137 * @throws Zend_Queue_Exception
140 public function toFrame();
145 public function __toString();
148 * Accepts a frame and deconstructs the frame into its' component parts
150 * @param string $frame - a stomp frame
153 public function fromFrame($frame);