Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Zend_Queue_Stomp_Client_Connection Class Reference

Public Member Functions

 open ($scheme, $host, $port, array $options=array())
 open() opens a socket to the Stomp server
 
 __destruct ()
 Close the socket explicitly when destructed.
 
 close ($destructor=false)
 Close connection.
 
 ping ()
 Check whether we are connected to the server.
 
 write (Zend_Queue_Stomp_FrameInterface $frame)
 Write a frame to the stomp server.
 
 canRead ()
 Tests the socket to see if there is data for us.
 
 read ()
 Reads in a frame from the socket or returns false.
 
 setFrameClass ($classname)
 Set the frameClass to be used.
 
 getFrameClass ()
 Get the frameClass.
 
 createFrame ()
 Create an empty frame.
 
- Public Member Functions inherited from Zend_Queue_Stomp_Client_ConnectionInterface
 open ($scheme, $host, $port)
 

Public Attributes

const READ_TIMEOUT_DEFAULT_USEC = 0
 
const READ_TIMEOUT_DEFAULT_SEC = 5
 

Protected Attributes

 $_options
 
 $_socket = false
 

Constructor & Destructor Documentation

__destruct ( )

Close the socket explicitly when destructed.

Returns
void

Member Function Documentation

canRead ( )

Tests the socket to see if there is data for us.

Returns
boolean

Implements Zend_Queue_Stomp_Client_ConnectionInterface.

close (   $destructor = false)

Close connection.

Parameters
boolean$destructor
Returns
void

Implements Zend_Queue_Stomp_Client_ConnectionInterface.

createFrame ( )
getFrameClass ( )

Get the frameClass.

Returns
string

Implements Zend_Queue_Stomp_Client_ConnectionInterface.

open (   $scheme,
  $host,
  $port,
array  $options = array() 
)

open() opens a socket to the Stomp server

Parameters
array$options('scheme', 'host', 'port')
string$scheme
string$host
int$port
array$optionsAccepts "timeout_sec" and "timeout_usec" keys
Returns
true;
Exceptions
Zend_Queue_Exception
ping ( )

Check whether we are connected to the server.

Returns
true
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Stomp_Client_ConnectionInterface.

read ( )

Reads in a frame from the socket or returns false.

Returns
Zend_Queue_Stomp_FrameInterface|false
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Stomp_Client_ConnectionInterface.

setFrameClass (   $classname)

Set the frameClass to be used.

This must be a Zend_Queue_Stomp_FrameInterface.

Parameters
string$classname- class is an instance of Zend_Queue_Stomp_FrameInterface
Returns
$this;

Implements Zend_Queue_Stomp_Client_ConnectionInterface.

Write a frame to the stomp server.

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

Parameters
Zend_Queue_Stom_FrameInterface$frame
Returns
$this

Implements Zend_Queue_Stomp_Client_ConnectionInterface.

Member Data Documentation

$_options
protected
$_socket = false
protected
const READ_TIMEOUT_DEFAULT_SEC = 5
const READ_TIMEOUT_DEFAULT_USEC = 0