| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
|
| 18 | |
|
| 19 | |
|
| 20 | |
|
| 21 | |
|
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
package argos.deploy; |
| 32 | |
|
| 33 | |
import java.io.File; |
| 34 | |
import java.lang.management.ManagementFactory; |
| 35 | |
import java.util.ArrayList; |
| 36 | |
import java.util.Collections; |
| 37 | |
import java.util.HashMap; |
| 38 | |
import java.util.List; |
| 39 | |
import java.util.Map; |
| 40 | |
import java.util.logging.Level; |
| 41 | |
import java.util.logging.Logger; |
| 42 | |
|
| 43 | |
import javax.management.MBeanNotificationInfo; |
| 44 | |
import javax.management.MBeanServer; |
| 45 | |
import javax.management.Notification; |
| 46 | |
import javax.management.ObjectName; |
| 47 | |
|
| 48 | |
import argos.Argos; |
| 49 | |
import argos.annotation.Description; |
| 50 | |
import argos.annotation.Impact; |
| 51 | |
import argos.annotation.NotificationInfo; |
| 52 | |
import argos.annotation.NotificationSender; |
| 53 | |
import argos.config.Config; |
| 54 | |
import argos.metadata.CircleException; |
| 55 | |
import argos.metadata.ComponentMetaInfo; |
| 56 | |
import argos.metadata.DependencyMissingException; |
| 57 | |
import argos.metadata.Running; |
| 58 | |
import argos.metadata.ServiceMetaInfo; |
| 59 | |
import argos.naming.NamingService; |
| 60 | |
import argos.proxy.NotificationProxy; |
| 61 | |
import argos.util.graph.Graph; |
| 62 | |
import argos.util.graph.Node; |
| 63 | |
|
| 64 | |
|
| 65 | |
|
| 66 | |
|
| 67 | |
|
| 68 | |
|
| 69 | |
|
| 70 | |
|
| 71 | |
|
| 72 | |
|
| 73 | |
|
| 74 | |
|
| 75 | |
|
| 76 | |
|
| 77 | |
|
| 78 | |
|
| 79 | |
|
| 80 | |
|
| 81 | |
|
| 82 | |
|
| 83 | |
|
| 84 | |
|
| 85 | |
@Description("This mbean is responsible to loading and stoping components, in the right order") |
| 86 | |
public class ComponentManager { |
| 87 | 0 | private static final Logger logger = Logger.getLogger(ComponentManager.class.getName()); |
| 88 | 0 | private static ComponentManager singelton = new ComponentManager(); |
| 89 | |
|
| 90 | |
|
| 91 | |
|
| 92 | |
|
| 93 | |
|
| 94 | |
|
| 95 | |
public static final String SERVICE_STARTED = "SERVICE_STARTED"; |
| 96 | |
|
| 97 | |
|
| 98 | |
|
| 99 | |
|
| 100 | |
|
| 101 | |
public static final String SERVICE_STOPPED = "SERVICE_STOPPED"; |
| 102 | |
|
| 103 | |
|
| 104 | |
|
| 105 | |
|
| 106 | |
|
| 107 | |
|
| 108 | |
public static final String SERVICE_LOADING = "SERVICE_LOADING"; |
| 109 | |
|
| 110 | |
|
| 111 | |
|
| 112 | |
|
| 113 | |
|
| 114 | |
public static final String SERVICE_FAILED = "SERVICE_FAILED"; |
| 115 | |
|
| 116 | |
|
| 117 | |
public static final String COMPONENT_STOPPED = "COMPONENT_STOPPED"; |
| 118 | |
|
| 119 | |
public static final String STOPPING_COMPONENT = "STOPPING_COMPONENT"; |
| 120 | |
|
| 121 | |
public static final String STOPPING_SERVICE = "STOPPING_SERVICE"; |
| 122 | |
|
| 123 | |
|
| 124 | |
|
| 125 | |
|
| 126 | |
|
| 127 | |
@NotificationSender public NotificationProxy proxy; |
| 128 | |
|
| 129 | |
private Map<ComponentMetaInfo, ComponentRunner> runners; |
| 130 | |
private long sequence; |
| 131 | |
|
| 132 | |
private ComponentManager() { |
| 133 | 0 | super(); |
| 134 | 0 | runners = new HashMap<ComponentMetaInfo, ComponentRunner>(); |
| 135 | 0 | sequence = 0; |
| 136 | |
|
| 137 | 0 | ServiceMetaInfo.cleanUpTempFolder(); |
| 138 | 0 | File dir = new File(Argos.TEMP_DIR); |
| 139 | 0 | dir.mkdir(); |
| 140 | 0 | } |
| 141 | |
|
| 142 | |
@Description("Loads a list of services.") |
| 143 | |
@Impact(Impact.ACTION) |
| 144 | |
public void deploy(List<File> files) { |
| 145 | 0 | List<ServiceMetaInfo> services = new ArrayList<ServiceMetaInfo>(); |
| 146 | 0 | for(File file : files) { |
| 147 | |
try { |
| 148 | 0 | ServiceMetaInfo meta = new ServiceMetaInfo(file); |
| 149 | 0 | services.add(meta); |
| 150 | |
} |
| 151 | 0 | catch (Exception e) { |
| 152 | 0 | logger.log(Level.SEVERE, "Unable to deploy file " + file.getName() + ": " + |
| 153 | |
e.getMessage(), e); |
| 154 | 0 | HotDeployer.getInstance().addIgnore(file); |
| 155 | 0 | } |
| 156 | |
} |
| 157 | |
|
| 158 | 0 | deployServices(services); |
| 159 | 0 | } |
| 160 | |
|
| 161 | |
private void deployServices(List<ServiceMetaInfo> services) { |
| 162 | |
|
| 163 | 0 | for(ServiceMetaInfo service : services) { |
| 164 | 0 | service.resetDependencies(); |
| 165 | |
} |
| 166 | |
|
| 167 | |
|
| 168 | 0 | for(ServiceMetaInfo service : services) { |
| 169 | |
try { |
| 170 | 0 | service.setupDependencies(services); |
| 171 | |
} |
| 172 | 0 | catch(DependencyMissingException e) { |
| 173 | 0 | services.remove(service); |
| 174 | 0 | service.resetDependencies(); |
| 175 | 0 | HotDeployer.getInstance().addIgnore(service.getFile()); |
| 176 | 0 | logger.log(Level.SEVERE, "Loading " + service.getName() + |
| 177 | |
" failed: " + e.getMessage(), e); |
| 178 | |
|
| 179 | 0 | deployServices(services); |
| 180 | 0 | return; |
| 181 | 0 | } |
| 182 | |
} |
| 183 | |
|
| 184 | |
|
| 185 | 0 | List<Node> circle = Graph.findCircle(services); |
| 186 | 0 | if(circle != null) { |
| 187 | 0 | logger.severe(CircleException.createExceptionMessage(circle)); |
| 188 | 0 | for(Node node : circle) { |
| 189 | 0 | ServiceMetaInfo service = (ServiceMetaInfo) node; |
| 190 | 0 | HotDeployer.getInstance().addIgnore(service.getFile()); |
| 191 | 0 | service.resetDependencies(); |
| 192 | 0 | logger.log(Level.SEVERE, "Loading " + service.getName() + " failed."); |
| 193 | 0 | } |
| 194 | |
|
| 195 | 0 | services.removeAll(circle); |
| 196 | 0 | deployServices(services); |
| 197 | 0 | return; |
| 198 | |
} |
| 199 | |
|
| 200 | |
|
| 201 | 0 | for(ServiceMetaInfo service : services) { |
| 202 | 0 | circle = Graph.findCircle(service.getComponentMetaInfo()); |
| 203 | 0 | if(circle != null) { |
| 204 | 0 | logger.severe(CircleException.createExceptionMessage(circle)); |
| 205 | |
|
| 206 | 0 | for(Node node : circle) { |
| 207 | 0 | ComponentMetaInfo comp = (ComponentMetaInfo) node; |
| 208 | 0 | HotDeployer.getInstance().addIgnore(comp.getService().getFile()); |
| 209 | 0 | services.remove(comp.getService()); |
| 210 | 0 | comp.getService().resetDependencies(); |
| 211 | 0 | } |
| 212 | 0 | logger.log(Level.SEVERE, "Loading " + service.getName() + "failed."); |
| 213 | 0 | deployServices(services); |
| 214 | 0 | return; |
| 215 | |
} |
| 216 | |
} |
| 217 | |
|
| 218 | |
|
| 219 | 0 | Collections.sort(services); |
| 220 | |
|
| 221 | |
|
| 222 | 0 | for(int i = 0; i < services.size(); i++) { |
| 223 | 0 | ServiceMetaInfo service = services.get(i); |
| 224 | 0 | if(!start(service)) { |
| 225 | 0 | List<ServiceMetaInfo> deploy = new ArrayList<ServiceMetaInfo>(); |
| 226 | 0 | for(int j = i + 1; j < services.size(); j++) { |
| 227 | 0 | deploy.add(services.get(j)); |
| 228 | |
} |
| 229 | 0 | HotDeployer.getInstance().addIgnore(service.getFile()); |
| 230 | 0 | service.resetDependencies(); |
| 231 | 0 | deployServices(deploy); |
| 232 | 0 | return; |
| 233 | |
} |
| 234 | |
} |
| 235 | 0 | } |
| 236 | |
|
| 237 | |
@Impact(Impact.ACTION) |
| 238 | |
@Description("Starts the given service.") |
| 239 | |
public boolean start(ServiceMetaInfo meta) { |
| 240 | 0 | if(meta.isRunning()) { |
| 241 | 0 | logger.warning("Tried starting service " + meta.getName() + " which is already running."); |
| 242 | |
} |
| 243 | |
else { |
| 244 | |
|
| 245 | 0 | if(!meta.createTempFile()) { |
| 246 | 0 | return false; |
| 247 | |
} |
| 248 | |
|
| 249 | 0 | setupClassLoader(meta); |
| 250 | 0 | send(SERVICE_LOADING, meta); |
| 251 | |
|
| 252 | |
|
| 253 | 0 | List<ComponentMetaInfo> started = new ArrayList<ComponentMetaInfo>(); |
| 254 | 0 | List<ComponentMetaInfo> components = meta.getComponentMetaInfo(); |
| 255 | 0 | Collections.sort(components); |
| 256 | 0 | for(ComponentMetaInfo comp : components) { |
| 257 | |
|
| 258 | 0 | if(start(comp)) { |
| 259 | 0 | started.add(comp); |
| 260 | |
} |
| 261 | |
else { |
| 262 | |
|
| 263 | 0 | logger.severe("Starting " + comp.getName() + " failed."); |
| 264 | 0 | for(ComponentMetaInfo stopComp : started) { |
| 265 | 0 | logger.severe("Stopping " + stopComp.getName() + "."); |
| 266 | 0 | stop(stopComp); |
| 267 | |
} |
| 268 | 0 | HotDeployer.getInstance().addIgnore(meta.getFile()); |
| 269 | 0 | send(SERVICE_FAILED, meta); |
| 270 | 0 | return false; |
| 271 | |
} |
| 272 | |
} |
| 273 | 0 | NamingService.getInstance().addService(meta); |
| 274 | 0 | meta.setRunning(true); |
| 275 | 0 | send(SERVICE_STARTED, meta); |
| 276 | |
|
| 277 | |
String logMsg; |
| 278 | 0 | if(meta.getName().startsWith(Config.BANG_BANG)) { |
| 279 | 0 | logMsg = "BangBang service " + meta + " started."; |
| 280 | |
} |
| 281 | |
else { |
| 282 | 0 | logMsg = "Service " + meta + " was started."; |
| 283 | |
} |
| 284 | 0 | logger.info(logMsg); |
| 285 | |
} |
| 286 | 0 | return true; |
| 287 | |
} |
| 288 | |
|
| 289 | |
private boolean start(ComponentMetaInfo meta) { |
| 290 | 0 | if(meta.isRunning()) { |
| 291 | 0 | logger.warning("Tried starting component " + meta.getName() + " which is already running."); |
| 292 | 0 | return true; |
| 293 | |
|
| 294 | |
} |
| 295 | |
else { |
| 296 | 0 | ComponentRunner runner = new ComponentRunner(meta); |
| 297 | 0 | Object component = runner.start(); |
| 298 | 0 | if(component == null) { |
| 299 | 0 | return false; |
| 300 | |
} |
| 301 | |
else { |
| 302 | 0 | runners.put(meta, runner); |
| 303 | 0 | NamingService.getInstance().addComponent(meta, component); |
| 304 | 0 | meta.setRunning(true); |
| 305 | 0 | return true; |
| 306 | |
} |
| 307 | |
} |
| 308 | |
} |
| 309 | |
|
| 310 | |
private void setupClassLoader(ServiceMetaInfo meta) { |
| 311 | 0 | List<ServiceMetaInfo> services = new ArrayList<ServiceMetaInfo>(); |
| 312 | 0 | for(String service : meta.getDependencies()) { |
| 313 | 0 | ServiceMetaInfo depends = NamingService.getInstance().getServiceByName(service); |
| 314 | 0 | if(depends == null) { |
| 315 | 0 | logger.severe("Unable to create class loader for service " + meta.getName() + |
| 316 | |
" dependencies not in place, bug?"); |
| 317 | |
} |
| 318 | |
else { |
| 319 | 0 | services.add(depends); |
| 320 | |
} |
| 321 | 0 | } |
| 322 | |
|
| 323 | |
|
| 324 | 0 | for(int i = 0; i < services.size(); i++) { |
| 325 | 0 | ServiceMetaInfo s1 = services.get(i); |
| 326 | 0 | for(int j = 0; i < services.size(); j++) { |
| 327 | 0 | ServiceMetaInfo s2 = services.get(j); |
| 328 | 0 | if(i == j) { |
| 329 | 0 | break; |
| 330 | |
} |
| 331 | 0 | if(s1.dependsOn(s2)) { |
| 332 | 0 | services.remove(j); |
| 333 | 0 | if(j <= i) { |
| 334 | 0 | i--; |
| 335 | |
} |
| 336 | 0 | j--; |
| 337 | |
} |
| 338 | |
} |
| 339 | |
} |
| 340 | |
|
| 341 | 0 | List<OpenClassLoader> loaders = new ArrayList<OpenClassLoader>(); |
| 342 | 0 | for(ServiceMetaInfo service: services) { |
| 343 | 0 | loaders.add(new OpenClassLoader(service.getClassLoader())); |
| 344 | |
} |
| 345 | |
|
| 346 | 0 | if(loaders.isEmpty()) { |
| 347 | 0 | meta.setClassLoader(JarClassloader.getInstance(meta)); |
| 348 | |
} |
| 349 | 0 | else if(loaders.size() == 1) { |
| 350 | 0 | meta.setClassLoader(JarClassloader.getInstance(meta, loaders.get(0))); |
| 351 | |
} |
| 352 | |
else { |
| 353 | |
|
| 354 | 0 | meta.setClassLoader(JarClassloader.getInstance(meta, new ChainClassLoader(loaders))); |
| 355 | 0 | logger.info("Service " + meta.getName() + " using chain classloader."); |
| 356 | |
} |
| 357 | 0 | } |
| 358 | |
|
| 359 | |
|
| 360 | |
|
| 361 | |
|
| 362 | |
|
| 363 | |
|
| 364 | |
|
| 365 | |
@Description("Redeployes the given services") |
| 366 | |
@Impact(Impact.ACTION) |
| 367 | |
public void redeploy(List<File> files) { |
| 368 | 0 | List<ServiceMetaInfo> metas = new ArrayList<ServiceMetaInfo>(); |
| 369 | 0 | for(File file : files) { |
| 370 | 0 | ServiceMetaInfo meta = NamingService.getInstance().getServiceByFile(file); |
| 371 | 0 | if(meta == null) { |
| 372 | 0 | logger.warning("Cant redploy not loaded file " + file.getName() + "."); |
| 373 | |
} |
| 374 | |
else { |
| 375 | 0 | metas.add(meta); |
| 376 | |
} |
| 377 | 0 | } |
| 378 | 0 | List<File> stopped = stop(metas); |
| 379 | 0 | List<File> stopped2 = new ArrayList<File>(); |
| 380 | 0 | for(File file : stopped) { |
| 381 | 0 | stopped2.add(new File(Config.get(Config.DEFAULT_DEPLOY_FOLDER) + "/" + |
| 382 | |
file.getName())); |
| 383 | |
} |
| 384 | 0 | deploy(stopped2); |
| 385 | 0 | } |
| 386 | |
|
| 387 | |
|
| 388 | |
|
| 389 | |
|
| 390 | |
|
| 391 | |
|
| 392 | |
|
| 393 | |
@Description("Stops the given services") |
| 394 | |
@Impact(Impact.ACTION) |
| 395 | |
public List<File> stop(List<ServiceMetaInfo> services) { |
| 396 | 0 | List<File> stopped = new ArrayList<File>(); |
| 397 | 0 | for(ServiceMetaInfo meta : services) { |
| 398 | 0 | stop(meta, stopped); |
| 399 | |
} |
| 400 | 0 | return stopped; |
| 401 | |
} |
| 402 | |
|
| 403 | |
private void stop(ServiceMetaInfo service, List<File> files) { |
| 404 | 0 | for(Node node : service.dependsOnThis) { |
| 405 | 0 | stop((ServiceMetaInfo) node, files); |
| 406 | |
} |
| 407 | 0 | stop(service); |
| 408 | 0 | files.add(service.getTempFile()); |
| 409 | 0 | } |
| 410 | |
|
| 411 | |
@Impact(Impact.ACTION) |
| 412 | |
@Description("Stops the given service.") |
| 413 | |
public void stop(ServiceMetaInfo service) { |
| 414 | 0 | if(service.isRunning()) { |
| 415 | 0 | send(STOPPING_SERVICE, service); |
| 416 | 0 | stop(service.getComponentMetaInfo()); |
| 417 | 0 | service.cleanUp(); |
| 418 | 0 | NamingService.getInstance().removeService(service); |
| 419 | 0 | service.setRunning(false); |
| 420 | |
|
| 421 | 0 | MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer(); |
| 422 | |
try { |
| 423 | 0 | ObjectName classLoaderName = new ObjectName("Classloaders:name=" + service.getName()); |
| 424 | 0 | if(!mbeanServer.isRegistered(classLoaderName)) { |
| 425 | 0 | mbeanServer.unregisterMBean(classLoaderName); |
| 426 | |
} |
| 427 | |
} |
| 428 | 0 | catch(Exception e) { |
| 429 | 0 | logger.log(Level.WARNING, "Unable to remove classloader for service " + |
| 430 | |
service.getName(), e); |
| 431 | 0 | } |
| 432 | |
|
| 433 | 0 | send(SERVICE_STOPPED, service); |
| 434 | 0 | logger.info("Stopped service " + service.getName()); |
| 435 | 0 | } |
| 436 | |
else { |
| 437 | 0 | logger.warning("Trying to stop service " + service.getName() + " that is not running."); |
| 438 | |
} |
| 439 | 0 | } |
| 440 | |
|
| 441 | |
@Impact(Impact.ACTION) |
| 442 | |
@Description("Stops the given component.") |
| 443 | |
public void stop(ComponentMetaInfo component) { |
| 444 | 0 | if(component.isRunning()) { |
| 445 | 0 | ComponentRunner runner = runners.get(component); |
| 446 | 0 | if(runner != null) { |
| 447 | 0 | send(STOPPING_COMPONENT, component); |
| 448 | 0 | for(Node temp : component.dependsOnThis) { |
| 449 | 0 | stop((ComponentMetaInfo) temp); |
| 450 | |
} |
| 451 | 0 | runner.stop(); |
| 452 | 0 | runners.remove(component); |
| 453 | 0 | NamingService.getInstance().removeComponent(component); |
| 454 | 0 | component.setRunning(false); |
| 455 | 0 | logger.info("Stopped component: " + component.getName()); |
| 456 | 0 | send(COMPONENT_STOPPED, component); |
| 457 | |
} |
| 458 | 0 | } |
| 459 | |
else { |
| 460 | 0 | logger.warning("Trying to stop component " + component.getName() + " that is not running."); |
| 461 | |
} |
| 462 | 0 | } |
| 463 | |
|
| 464 | |
private void stop(List<ComponentMetaInfo> components) { |
| 465 | 0 | for(ComponentMetaInfo component : components) { |
| 466 | 0 | stop(component); |
| 467 | |
} |
| 468 | 0 | } |
| 469 | |
|
| 470 | |
|
| 471 | |
|
| 472 | |
|
| 473 | |
|
| 474 | |
|
| 475 | |
@Description("Stops a service by service name.") |
| 476 | |
@Impact(Impact.ACTION) |
| 477 | |
public boolean stopService(String name) { |
| 478 | 0 | ServiceMetaInfo service = NamingService.getInstance().getServiceByName(name); |
| 479 | 0 | if(service == null) { |
| 480 | 0 | return false; |
| 481 | |
} |
| 482 | |
else { |
| 483 | 0 | HotDeployer.getInstance().addIgnore(service.getFile()); |
| 484 | 0 | stop(service); |
| 485 | 0 | return true; |
| 486 | |
} |
| 487 | |
} |
| 488 | |
|
| 489 | |
|
| 490 | |
|
| 491 | |
|
| 492 | |
|
| 493 | |
|
| 494 | |
@Description("Starts a service by filename.") |
| 495 | |
@Impact(Impact.ACTION) |
| 496 | |
public boolean startService(String name) { |
| 497 | 0 | String filename = Config.get(Config.DEFAULT_DEPLOY_FOLDER) + "/" + name; |
| 498 | 0 | return HotDeployer.getInstance().removeIgnore(new File(filename)); |
| 499 | |
} |
| 500 | |
|
| 501 | |
|
| 502 | |
|
| 503 | |
|
| 504 | |
@Description("Stops all loaded services") |
| 505 | |
@Impact(Impact.INFO) |
| 506 | |
public void shutdown() { |
| 507 | 0 | HotDeployer.getInstance().stopDeployer(); |
| 508 | 0 | stop(NamingService.getInstance().getAllServices()); |
| 509 | 0 | } |
| 510 | |
|
| 511 | |
|
| 512 | |
|
| 513 | |
|
| 514 | |
|
| 515 | |
|
| 516 | |
@NotificationInfo |
| 517 | |
public MBeanNotificationInfo[] getNotificationInfo() { |
| 518 | 0 | MBeanNotificationInfo[] not = new MBeanNotificationInfo[7]; |
| 519 | 0 | not[0] = new MBeanNotificationInfo(new String[]{SERVICE_STARTED}, |
| 520 | |
Notification.class.getClass().getName(), "Emitted when a new service is started."); |
| 521 | 0 | not[1] = new MBeanNotificationInfo(new String[]{SERVICE_STOPPED}, |
| 522 | |
Notification.class.getClass().getName(), "Emitted when a service is stopped."); |
| 523 | 0 | not[2] = new MBeanNotificationInfo(new String[]{SERVICE_LOADING}, |
| 524 | |
Notification.class.getClass().getName(), "Emitted when a service is loading."); |
| 525 | 0 | not[3] = new MBeanNotificationInfo(new String[]{SERVICE_FAILED}, |
| 526 | |
Notification.class.getClass().getName(), "Emitted when a service failed loading."); |
| 527 | 0 | not[4] = new MBeanNotificationInfo(new String[]{COMPONENT_STOPPED}, |
| 528 | |
Notification.class.getClass().getName(), "Emitted when a component has been stopped."); |
| 529 | 0 | not[5] = new MBeanNotificationInfo(new String[]{STOPPING_COMPONENT}, |
| 530 | |
Notification.class.getClass().getName(), "Emitted when a component is being stopped."); |
| 531 | 0 | not[6] = new MBeanNotificationInfo(new String[]{STOPPING_SERVICE}, |
| 532 | |
Notification.class.getClass().getName(), "Emitted when a service is being stopped."); |
| 533 | 0 | return not; |
| 534 | |
|
| 535 | |
} |
| 536 | |
|
| 537 | |
|
| 538 | |
|
| 539 | |
|
| 540 | |
|
| 541 | |
public static ComponentManager getInstance() { |
| 542 | 0 | return singelton; |
| 543 | |
} |
| 544 | |
|
| 545 | |
private void send(String type, Running metadata) { |
| 546 | 0 | Notification not = new Notification(type, Notification.class.getClass().getName(), |
| 547 | |
sequence++, metadata.getName()); |
| 548 | 0 | not.setUserData(metadata); |
| 549 | 0 | proxy.send(not); |
| 550 | 0 | } |
| 551 | |
} |