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