001    /** 
002     * 
003     * Copyright 2004 Protique Ltd
004     * 
005     * Licensed under the Apache License, Version 2.0 (the "License"); 
006     * you may not use this file except in compliance with the License. 
007     * You may obtain a copy of the License at 
008     * 
009     * http://www.apache.org/licenses/LICENSE-2.0
010     * 
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS, 
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
014     * See the License for the specific language governing permissions and 
015     * limitations under the License. 
016     * 
017     **/
018    
019    package org.activemq.message;
020    
021    /**
022     * Command to remove a Durable Subscription
023     *
024     * @version $Revision: 1.1.1.1 $
025     */
026    
027    public class DurableUnsubscribe extends AbstractPacket {
028    
029        private String clientId;
030        private String subscriberName;
031    
032    
033        /**
034         * Return the type of Packet
035         *
036         * @return integer representation of the type of Packet
037         */
038    
039        public int getPacketType() {
040            return DURABLE_UNSUBSCRIBE;
041        }
042    
043    
044        /**
045         * @return Returns the clientId.
046         */
047        public String getClientId() {
048            return clientId;
049        }
050    
051        /**
052         * @param clientId The clientId to set.
053         */
054        public void setClientId(String clientId) {
055            this.clientId = clientId;
056        }
057    
058        /**
059         * @return Returns the subscriberName.
060         */
061        public String getSubscriberName() {
062            return subscriberName;
063        }
064    
065        /**
066         * @param subscriberName The subscriberName to set.
067         */
068        public void setSubscriberName(String subscriberName) {
069            this.subscriberName = subscriberName;
070        }
071    
072        public String toString() {
073            return super.toString() + " DurableUnsubscribe{ " +
074                    "clientId = '" + clientId + "' " +
075                    ", subscriberName = '" + subscriberName + "' " +
076                    " }";
077        }
078    }