/** 
 * 
 * Copyright 2004 Protique Ltd
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License. 
 * 
 **/

package org.activemq.message;

import java.util.Properties;

/**
 * Information about a connected Broker
 */

public class BrokerInfo extends AbstractPacket {

    private String brokerName;
    private String clusterName;
    private long startTime;
    private Properties properties;
    private boolean remote;

    
    /**
     * Return the type of Packet
     *
     * @return integer representation of the type of Packet
     */

    public int getPacketType() {
        return ACTIVEMQ_BROKER_INFO;
    }


    /**
     * @return Returns the brokerName.
     */
    public String getBrokerName() {
        return this.brokerName;
    }

    /**
     * @param newBrokerName The brokerName to set.
     */
    public void setBrokerName(String newBrokerName) {
        this.brokerName = newBrokerName;
    }

    /**
     * @return Returns the clusterName.
     */
    public String getClusterName() {
        return this.clusterName;
    }

    /**
     * @param newClusterName The clusterName to set.
     */
    public void setClusterName(String newClusterName) {
        this.clusterName = newClusterName;
    }

    /**
     * @return Returns the properties.
     */
    public Properties getProperties() {
        return this.properties;
    }

    /**
     * @param newProperties The properties to set.
     */
    public void setProperties(Properties newProperties) {
        this.properties = newProperties;
    }

    /**
     * @return Returns the startTime.
     */
    public long getStartTime() {
        return this.startTime;
    }

    /**
     * @param newStartTime The startTime to set.
     */
    public void setStartTime(long newStartTime) {
        this.startTime = newStartTime;
    }
    
    /**
     * @return Returns the boondocks.
     */
    public boolean isRemote() {
        return remote;
    }
    /**
     * @param boondocks The boondocks to set.
     */
    public void setRemote(boolean boondocks) {
        this.remote = boondocks;
    }


    public String toString() {
        return super.toString() + " BrokerInfo{ " +
                "brokerName = '" + brokerName + "' " +
                ", clusterName = '" + clusterName + "' " +
                ", startTime = " + startTime +
                ", properties = " + properties +
                " }";
    }
}
