1 21 22 package org.objectweb.jonas.discovery; 23 24 import javax.management.remote.JMXServiceURL ; 25 26 30 public class DiscEvent extends DiscMessage { 31 34 public static final String RUNNING = "running"; 35 38 public static final String STOPPING = "stopping"; 39 42 private String state = RUNNING; 43 46 private String serverName = null; 47 50 private String domainName = null; 51 52 private String serverId = null; 53 54 57 private String [] urls = null; 58 59 65 public DiscEvent(String sourceAddress, int sourcePort, String serverId) { 66 super(sourceAddress, sourcePort); 67 } 68 69 84 public DiscEvent(String sourceAddress, int sourcePort, String serverName, 85 String domainName, String serverId, String [] connectorURLs) { 86 super(sourceAddress, sourcePort); 87 this.serverName = serverName; 88 this.domainName = domainName; 89 this.serverId = serverId; 90 this.urls = connectorURLs; 91 } 92 93 98 public String getServerName() { 99 return serverName; 100 } 101 102 107 public String getDomainName() { 108 return domainName; 109 } 110 111 116 public void setDomainName(String domainName) { 117 this.domainName = domainName; 118 } 119 120 125 public void setServerName(String serverName) { 126 this.serverName = serverName; 127 } 128 129 132 public String [] getConnectorURL() { 133 return urls; 134 } 135 136 139 public void setConnectorURL(String [] connectorURLs) { 140 this.urls = connectorURLs; 141 } 142 143 146 public String getState() { 147 return state; 148 } 149 150 155 public void setState(String state) { 156 this.state = state; 157 } 158 159 163 public String toString() { 164 String str = super.getSourceAddress() + ": " + super.getSourcePort() + " State=" 165 + state + " DomainName=" + domainName + " ServerName= " + serverName + " Serverid = " + serverId; 166 if (urls != null) { 167 str = str + " URLs= "; 168 for (int i = 0; i < urls.length; i++) { 169 str = str + urls[i] + " "; 170 } 171 } 172 return str; 173 174 } 175 176 public String getServerId() { 177 return serverId; 178 } 179 180 public void setServerId(String serverId) { 181 this.serverId = serverId; 182 } 183 184 } | Popular Tags |