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    import java.util.Properties;
022    
023    /**
024     * Information about a connected Broker
025     */
026    
027    public class BrokerInfo extends AbstractPacket {
028    
029        private String brokerName;
030        private String clusterName;
031        private long startTime;
032        private Properties properties;
033        private boolean remote;
034    
035        
036        /**
037         * Return the type of Packet
038         *
039         * @return integer representation of the type of Packet
040         */
041    
042        public int getPacketType() {
043            return ACTIVEMQ_BROKER_INFO;
044        }
045    
046    
047        /**
048         * @return Returns the brokerName.
049         */
050        public String getBrokerName() {
051            return this.brokerName;
052        }
053    
054        /**
055         * @param newBrokerName The brokerName to set.
056         */
057        public void setBrokerName(String newBrokerName) {
058            this.brokerName = newBrokerName;
059        }
060    
061        /**
062         * @return Returns the clusterName.
063         */
064        public String getClusterName() {
065            return this.clusterName;
066        }
067    
068        /**
069         * @param newClusterName The clusterName to set.
070         */
071        public void setClusterName(String newClusterName) {
072            this.clusterName = newClusterName;
073        }
074    
075        /**
076         * @return Returns the properties.
077         */
078        public Properties getProperties() {
079            return this.properties;
080        }
081    
082        /**
083         * @param newProperties The properties to set.
084         */
085        public void setProperties(Properties newProperties) {
086            this.properties = newProperties;
087        }
088    
089        /**
090         * @return Returns the startTime.
091         */
092        public long getStartTime() {
093            return this.startTime;
094        }
095    
096        /**
097         * @param newStartTime The startTime to set.
098         */
099        public void setStartTime(long newStartTime) {
100            this.startTime = newStartTime;
101        }
102        
103        /**
104         * @return Returns the boondocks.
105         */
106        public boolean isRemote() {
107            return remote;
108        }
109        /**
110         * @param boondocks The boondocks to set.
111         */
112        public void setRemote(boolean boondocks) {
113            this.remote = boondocks;
114        }
115    
116    
117        public String toString() {
118            return super.toString() + " BrokerInfo{ " +
119                    "brokerName = '" + brokerName + "' " +
120                    ", clusterName = '" + clusterName + "' " +
121                    ", startTime = " + startTime +
122                    ", properties = " + properties +
123                    " }";
124        }
125    }