API Documentation

Zend/Queue/Stomp/Client/Connection.php

Show: inherited
Table of Contents

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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Queue  
Subpackage
Stomp  
Version
$Id: Connection.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Queue_Stomp_Client_Connection

Package: Zend\Queue\Stomp

The Stomp client interacts with a Stomp server.

Implements
\Zend_Queue_Stomp_Client_ConnectionInterface
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  READ_TIMEOUT_DEFAULT_USEC = 0
Constant  READ_TIMEOUT_DEFAULT_SEC = 5

Properties

Propertyprotectedarray  $_options= ''

Connection options

Details
Type
array
Propertyprotectedresource  $_socket= 'false'

tcp/udp socket

Default valuefalseDetails
Type
resource

Methods

methodpublic__destruct( ) : void

Close the socket explicitly when destructed

methodpubliccanRead( ) : boolean

Tests the socket to see if there is data for us

Returns
Type Description
boolean
methodpublicclose( boolean $destructor = false ) : void

Close connection

Parameters
Name Type Description
$destructor boolean
methodpubliccreateFrame( ) : \Zend_Queue_Stomp_FrameInterface

Create an empty frame

Returns
Type Description
\Zend_Queue_Stomp_FrameInterface
methodpublicgetFrameClass( ) : string

Get the frameClass

Returns
Type Description
string
methodpublicopen( string $scheme, string $host, int $port, array|array $options = array() ) : \true;

open() opens a socket to the Stomp server

Parameters
Name Type Description
$scheme string
$host string
$port int
$options array|array

('scheme', 'host', 'port')

Returns
Type Description
\true;
Throws
Exception Description
\Zend_Queue_Exception
methodpublicping( ) : true

Check whether we are connected to the server

Returns
Type Description
true
Throws
Exception Description
\Zend_Queue_Exception
methodpublicread( ) : \Zend_Queue_Stomp_FrameInterface|false

Reads in a frame from the socket or returns false.

Returns
Type Description
\Zend_Queue_Stomp_FrameInterface|false
Throws
Exception Description
\Zend_Queue_Exception
methodpublicsetFrameClass( string $classname ) : \$this;

Set the frameClass to be used

This must be a Zend_Queue_Stomp_FrameInterface.

Parameters
Name Type Description
$classname string
  • class is an instance of Zend_Queue_Stomp_FrameInterface
Returns
Type Description
\$this;
methodpublicwrite( \Zend_Queue_Stom_FrameInterface $frame ) : \Zend_Queue_Stomp_Client_Connection

Write a frame to the stomp server

example: $response = $client->write($frame)->read();

Parameters
Name Type Description
$frame \Zend_Queue_Stom_FrameInterface
Returns
Type Description
\Zend_Queue_Stomp_Client_Connection
Details
Fluent
This method is part of a fluent interface and will return the same instance  
Documentation was generated by DocBlox 0.15.1.