File indexing completed on 2024-06-23 05:55:02

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Amf
0017  * @subpackage Value
0018  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0019  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0020  * @version    $Id$
0021  */
0022 
0023 /**
0024  * @see Zend_Amf_Value_Messaging_AsyncMessage
0025  */
0026 // require_once 'Zend/Amf/Value/Messaging/AsyncMessage.php';
0027 
0028 /**
0029  * A message that represents an infrastructure command passed between
0030  * client and server. Subscribe/unsubscribe operations result in
0031  * CommandMessage transmissions, as do polling operations.
0032  *
0033  * Corresponds to flex.messaging.messages.CommandMessage
0034  *
0035  * Note: THESE VALUES MUST BE THE SAME ON CLIENT AND SERVER
0036  *
0037  * @package    Zend_Amf
0038  * @subpackage Value
0039  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0040  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0041  */
0042 class Zend_Amf_Value_Messaging_CommandMessage extends Zend_Amf_Value_Messaging_AsyncMessage
0043 {
0044     /**
0045      *  This operation is used to subscribe to a remote destination.
0046      */
0047     const SUBSCRIBE_OPERATION = 0;
0048 
0049     /**
0050      * This operation is used to unsubscribe from a remote destination.
0051      */
0052     const UNSUSBSCRIBE_OPERATION = 1;
0053 
0054     /**
0055      * This operation is used to poll a remote destination for pending,
0056      * undelivered messages.
0057      */
0058     const POLL_OPERATION = 2;
0059 
0060     /**
0061      * This operation is used by a remote destination to sync missed or cached messages
0062      * back to a client as a result of a client issued poll command.
0063      */
0064     const CLIENT_SYNC_OPERATION = 4;
0065 
0066     /**
0067      * This operation is used to test connectivity over the current channel to
0068      * the remote endpoint.
0069      */
0070     const CLIENT_PING_OPERATION = 5;
0071 
0072     /**
0073      * This operation is used to request a list of failover endpoint URIs
0074      * for the remote destination based on cluster membership.
0075      */
0076     const CLUSTER_REQUEST_OPERATION = 7;
0077 
0078     /**
0079      * This operation is used to send credentials to the endpoint so that
0080      * the user can be logged in over the current channel.
0081      * The credentials need to be Base64 encoded and stored in the <code>body</code>
0082      * of the message.
0083      */
0084     const LOGIN_OPERATION = 8;
0085 
0086     /**
0087      * This operation is used to log the user out of the current channel, and
0088      * will invalidate the server session if the channel is HTTP based.
0089      */
0090     const LOGOUT_OPERATION = 9;
0091 
0092     /**
0093      * This operation is used to indicate that the client's subscription to a
0094      * remote destination has been invalidated.
0095      */
0096     const SESSION_INVALIDATE_OPERATION = 10;
0097 
0098     /**
0099      * This operation is used by the MultiTopicConsumer to subscribe/unsubscribe
0100      * from multiple subtopics/selectors in the same message.
0101      */
0102     const MULTI_SUBSCRIBE_OPERATION = 11;
0103 
0104     /**
0105      * This operation is used to indicate that a channel has disconnected
0106      */
0107     const DISCONNECT_OPERATION = 12;
0108 
0109     /**
0110      * This is the default operation for new CommandMessage instances.
0111      */
0112     const UNKNOWN_OPERATION = 10000;
0113 
0114     /**
0115      * The operation to execute for messages of this type
0116      * @var int
0117      */
0118     public $operation = self::UNKNOWN_OPERATION;
0119 }