/** * Destroys a proxy. * * @param name The name of the proxy to destroy. * @param publishEvent true if this destroy should be published. */ void destroyProxy(String name, boolean publishEvent) { final DistributedObjectFuture proxyFuture = proxies.remove(name); if (proxyFuture == null) { return; } DistributedObject proxy; try { proxy = proxyFuture.get(); } catch (Throwable t) { proxyService.logger.warning("Cannot destroy proxy [" + serviceName + ":" + name + "], since its creation is failed with " + t.getClass().getName() + ": " + t.getMessage()); return; } InternalEventService eventService = proxyService.nodeEngine.getEventService(); ProxyEventProcessor callback = new ProxyEventProcessor(proxyService.listeners.values(), DESTROYED, serviceName, name, proxy); eventService.executeEventCallback(callback); if (publishEvent) { publish(new DistributedObjectEventPacket(DESTROYED, serviceName, name)); } }
/** * Destroys a proxy. * * @param name The name of the proxy to destroy. * @param publishEvent true if this destroy should be published. */ void destroyProxy(String name, boolean publishEvent) { final DistributedObjectFuture proxyFuture = proxies.remove(name); if (proxyFuture == null) { return; } DistributedObject proxy; try { proxy = proxyFuture.get(); } catch (Throwable t) { proxyService.logger.warning("Cannot destroy proxy [" + serviceName + ":" + name + "], since its creation is failed with " + t.getClass().getName() + ": " + t.getMessage()); return; } InternalEventService eventService = proxyService.nodeEngine.getEventService(); ProxyEventProcessor callback = new ProxyEventProcessor(proxyService.listeners.values(), DESTROYED, serviceName, name, proxy); eventService.executeEventCallback(callback); if (publishEvent) { publish(new DistributedObjectEventPacket(DESTROYED, serviceName, name)); } }
ProxyEventProcessor callback = new ProxyEventProcessor(proxyService.listeners.values(), CREATED, serviceName, name, proxy); eventService.executeEventCallback(callback);
ProxyEventProcessor callback = new ProxyEventProcessor(proxyService.listeners.values(), CREATED, serviceName, name, proxy); eventService.executeEventCallback(callback);