API Documentation

Queue/Stomp/Client.php

Zend Framework

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Queue  
subpackage
Stomp  
version
$Id: Client.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Queue_Stomp_Client

The Stomp client interacts with a Stomp server.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Queue  
subpackage
Stomp  

Properties

Propertyprotectedarray  $_connection= ''

Array of $client Zend_Queue_Stomp_Client_Interface

Details
Type
array

Methods

methodpublic__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

Parameters
Name Type Description
$scheme string scheme
$host string host
$port integer port
$connectionClass
$frameClass
methodpublic__destruct( ) : void

Shutdown

methodpublicaddConnection( 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.

Parameters
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

Returns
Type Description
boolean
methodpubliccanRead( ) : boolean

canRead()

Returns
Type Description
boolean
methodpubliccreateFrame( ) : \Zend_Queue_Stomp_FrameInterface

creates a frame class

Returns
Type Description
\Zend_Queue_Stomp_FrameInterface
methodpublicgetConnection( ) : \Zend_Queue_Stomp_Client_ConnectionInterface|null

Get client connection

Returns
Type Description
\Zend_Queue_Stomp_Client_ConnectionInterfacenull
methodpublicreceive( ) : \Zend_Queue_Stomp_FrameInterface|boolean

Receive a frame

Returns a frame or false if none were to be read.

Returns
Type Description
\Zend_Queue_Stomp_FrameInterfaceboolean
methodpublicsend( \Zend_Queue_Stomp_FrameInterface $frame ) : boolean

Send a stomp frame

Returns true if the frame was successfully sent.

Parameters
Name Type Description
$frame \Zend_Queue_Stomp_FrameInterface
Returns
Type Description
boolean
methodpublicsetConnection( \Zend_Queue_Stomp_Client_ConnectionInterface $connection ) : void

Set client connection

Parameters
Name Type Description
$connection \Zend_Queue_Stomp_Client_ConnectionInterface
Documentation was generated by DocBlox 0.13.3.