PageRenderTime 41ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/Amf/Value/Messaging/CommandMessage.php

https://bitbucket.org/bigstylee/zend-framework
PHP | 119 lines | 18 code | 14 blank | 87 comment | 0 complexity | a239af33b61bf2d51bb107d279bd5ac1 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_Amf
  17. * @subpackage Value
  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: CommandMessage.php 24593 2012-01-05 20:35:02Z matthew $
  21. */
  22. /**
  23. * @see Zend_Amf_Value_Messaging_AsyncMessage
  24. */
  25. require_once 'Zend/Amf/Value/Messaging/AsyncMessage.php';
  26. /**
  27. * A message that represents an infrastructure command passed between
  28. * client and server. Subscribe/unsubscribe operations result in
  29. * CommandMessage transmissions, as do polling operations.
  30. *
  31. * Corresponds to flex.messaging.messages.CommandMessage
  32. *
  33. * Note: THESE VALUES MUST BE THE SAME ON CLIENT AND SERVER
  34. *
  35. * @package Zend_Amf
  36. * @subpackage Value
  37. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  38. * @license http://framework.zend.com/license/new-bsd New BSD License
  39. */
  40. class Zend_Amf_Value_Messaging_CommandMessage extends Zend_Amf_Value_Messaging_AsyncMessage
  41. {
  42. /**
  43. * This operation is used to subscribe to a remote destination.
  44. */
  45. const SUBSCRIBE_OPERATION = 0;
  46. /**
  47. * This operation is used to unsubscribe from a remote destination.
  48. */
  49. const UNSUSBSCRIBE_OPERATION = 1;
  50. /**
  51. * This operation is used to poll a remote destination for pending,
  52. * undelivered messages.
  53. */
  54. const POLL_OPERATION = 2;
  55. /**
  56. * This operation is used by a remote destination to sync missed or cached messages
  57. * back to a client as a result of a client issued poll command.
  58. */
  59. const CLIENT_SYNC_OPERATION = 4;
  60. /**
  61. * This operation is used to test connectivity over the current channel to
  62. * the remote endpoint.
  63. */
  64. const CLIENT_PING_OPERATION = 5;
  65. /**
  66. * This operation is used to request a list of failover endpoint URIs
  67. * for the remote destination based on cluster membership.
  68. */
  69. const CLUSTER_REQUEST_OPERATION = 7;
  70. /**
  71. * This operation is used to send credentials to the endpoint so that
  72. * the user can be logged in over the current channel.
  73. * The credentials need to be Base64 encoded and stored in the <code>body</code>
  74. * of the message.
  75. */
  76. const LOGIN_OPERATION = 8;
  77. /**
  78. * This operation is used to log the user out of the current channel, and
  79. * will invalidate the server session if the channel is HTTP based.
  80. */
  81. const LOGOUT_OPERATION = 9;
  82. /**
  83. * This operation is used to indicate that the client's subscription to a
  84. * remote destination has been invalidated.
  85. */
  86. const SESSION_INVALIDATE_OPERATION = 10;
  87. /**
  88. * This operation is used by the MultiTopicConsumer to subscribe/unsubscribe
  89. * from multiple subtopics/selectors in the same message.
  90. */
  91. const MULTI_SUBSCRIBE_OPERATION = 11;
  92. /**
  93. * This operation is used to indicate that a channel has disconnected
  94. */
  95. const DISCONNECT_OPERATION = 12;
  96. /**
  97. * This is the default operation for new CommandMessage instances.
  98. */
  99. const UNKNOWN_OPERATION = 10000;
  100. /**
  101. * The operation to execute for messages of this type
  102. * @var int
  103. */
  104. public $operation = self::UNKNOWN_OPERATION;
  105. }