Queue/Stomp/Client.php
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Queue
- Subpackage
- Stomp
- Version
- $Id: Client.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Queue_Stomp_Client
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
Methods


__construct(string $scheme = null, string $host = null, integer $port = null, $connectionClass = 'Zend_Queue_Stomp_Client_Connection', $frameClass = 'Zend_Queue_Stomp_Frame') : void
Add a server to connections
Name | Type | Description |
---|---|---|
$scheme | string | scheme |
$host | string | host |
$port | integer | port |
$connectionClass | ||
$frameClass |


addConnection(string $scheme, string $host, integer $port, string $class = 'Zend_Queue_Stomp_Client_Connection') : boolean
Add a connection to this client.
Attempts to add this class to the client. Returns a boolean value indicating success of operation.
You cannot add more than 1 connection to the client at this time.
Name | Type | Description |
---|---|---|
$scheme | string | ['tcp', 'udp'] |
$host | string | host |
$port | integer | port |
$class | string | class - create a connection with this class; class must support Zend_Queue_Stomp_Client_ConnectionInterface |
Type | Description |
---|---|
boolean |


createFrame() : \Zend_Queue_Stomp_FrameInterface
creates a frame class
Type | Description |
---|---|
\Zend_Queue_Stomp_FrameInterface |


getConnection() : \Zend_Queue_Stomp_Client_ConnectionInterface | null
Get client connection
Type | Description |
---|---|
\Zend_Queue_Stomp_Client_ConnectionInterface | null |


receive() : \Zend_Queue_Stomp_FrameInterface | boolean
Receive a frame
Returns a frame or false if none were to be read.
Type | Description |
---|---|
\Zend_Queue_Stomp_FrameInterface | boolean |


send(\Zend_Queue_Stomp_FrameInterface $frame) : boolean
Send a stomp frame
Returns true if the frame was successfully sent.
Name | Type | Description |
---|---|---|
$frame | \Zend_Queue_Stomp_FrameInterface |
Type | Description |
---|---|
boolean |


setConnection(\Zend_Queue_Stomp_Client_ConnectionInterface $connection) : void
Set client connection
Name | Type | Description |
---|---|---|
$connection | \Zend_Queue_Stomp_Client_ConnectionInterface |