Source code: org/activemq/message/BrokerInfo.java
1 /**
2 *
3 * Copyright 2004 Protique Ltd
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 **/
18
19 package org.activemq.message;
20
21 import java.util.Properties;
22
23 /**
24 * Information about a connected Broker
25 */
26
27 public class BrokerInfo extends AbstractPacket {
28
29 private String brokerName;
30 private String clusterName;
31 private long startTime;
32 private Properties properties;
33 private boolean remote;
34
35
36 /**
37 * Return the type of Packet
38 *
39 * @return integer representation of the type of Packet
40 */
41
42 public int getPacketType() {
43 return ACTIVEMQ_BROKER_INFO;
44 }
45
46
47 /**
48 * @return Returns the brokerName.
49 */
50 public String getBrokerName() {
51 return this.brokerName;
52 }
53
54 /**
55 * @param newBrokerName The brokerName to set.
56 */
57 public void setBrokerName(String newBrokerName) {
58 this.brokerName = newBrokerName;
59 }
60
61 /**
62 * @return Returns the clusterName.
63 */
64 public String getClusterName() {
65 return this.clusterName;
66 }
67
68 /**
69 * @param newClusterName The clusterName to set.
70 */
71 public void setClusterName(String newClusterName) {
72 this.clusterName = newClusterName;
73 }
74
75 /**
76 * @return Returns the properties.
77 */
78 public Properties getProperties() {
79 return this.properties;
80 }
81
82 /**
83 * @param newProperties The properties to set.
84 */
85 public void setProperties(Properties newProperties) {
86 this.properties = newProperties;
87 }
88
89 /**
90 * @return Returns the startTime.
91 */
92 public long getStartTime() {
93 return this.startTime;
94 }
95
96 /**
97 * @param newStartTime The startTime to set.
98 */
99 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 }