PageRenderTime 51ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/concrete/libraries/3rdparty/Zend/Queue/Stomp/Client/ConnectionInterface.php

https://bitbucket.org/selfeky/xclusivescardwebsite
PHP | 103 lines | 13 code | 9 blank | 81 comment | 0 complexity | 02491901fc69cd6e97028107bd25d733 MD5 | raw file
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  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.
  14. *
  15. * @category Zend
  16. * @package Zend_Queue
  17. * @subpackage Stomp
  18. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id: ConnectionInterface.php 24593 2012-01-05 20:35:02Z matthew $
  21. */
  22. /**
  23. * The Stomp client interacts with a Stomp server.
  24. *
  25. * @category Zend
  26. * @package Zend_Queue
  27. * @subpackage Stomp
  28. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  29. * @license http://framework.zend.com/license/new-bsd New BSD License
  30. */
  31. interface Zend_Queue_Stomp_Client_ConnectionInterface
  32. {
  33. /**
  34. * @param string $scheme ['tcp', 'udp']
  35. * @param string host
  36. * @param integer port
  37. * @param string class - create a connection with this class; class must support Zend_Queue_Stomp_Client_Connection_Interface
  38. * @return boolean
  39. */
  40. public function open($scheme, $host, $port);
  41. /**
  42. * @param boolean $destructor
  43. * @return void
  44. */
  45. public function close($destructor = false);
  46. /**
  47. * Check whether we are connected to the server
  48. *
  49. * @return true
  50. * @throws Zend_Queue_Exception
  51. */
  52. public function ping();
  53. /**
  54. * write a frame to the stomp server
  55. *
  56. * example: $response = $client->write($frame)->read();
  57. *
  58. * @param Zend_Queue_Stomp_FrameInterface $frame
  59. * @return $this
  60. */
  61. public function write(Zend_Queue_Stomp_FrameInterface $frame);
  62. /**
  63. * tests the socket to see if there is data for us
  64. */
  65. public function canRead();
  66. /**
  67. * reads in a frame from the socket or returns false.
  68. *
  69. * @return Zend_Queue_Stomp_Frame|false
  70. * @throws Zend_Queue_Exception
  71. */
  72. public function read();
  73. /**
  74. * Set the frame class to be used
  75. *
  76. * This must be a Zend_Queue_Stomp_FrameInterface.
  77. *
  78. * @param string $class
  79. * @return Zend_Queue_Stomp_Client_ConnectionInterface;
  80. */
  81. public function setFrameClass($class);
  82. /**
  83. * Get the frameClass
  84. *
  85. * @return string
  86. */
  87. public function getFrameClass();
  88. /**
  89. * create an empty frame
  90. *
  91. * @return Zend_Queue_Stomp_FrameInterface class
  92. */
  93. public function createFrame();
  94. }