/** * Sets the id of the <code>Destination</code>. If the <code>Destination</code> * has a <code>Service</code> assigned, it also updates the id in the * <code>Service</code>. * * @param id The id of the <code>Destination</code>. */ @Override public void setId(String id) { String oldId = getId(); super.setId(id); // Update the destination id in the service and MessageBroker Service service = getService(); if (service != null) { service.removeDestination(oldId); service.addDestination(this); } }
/** * Sets the id of the <code>Destination</code>. If the <code>Destination</code> * has a <code>Service</code> assigned, it also updates the id in the * <code>Service</code>. * * @param id The id of the <code>Destination</code>. */ @Override public void setId(String id) { String oldId = getId(); super.setId(id); // Update the destination id in the service and MessageBroker Service service = getService(); if (service != null) { service.removeDestination(oldId); service.addDestination(this); } }
protected void createJavaBeanDestination(Service service, Class clazz) { String destinationId = StringUtils.uncapitalize(ClassUtils.getShortName(clazz)); RemotingDestination destination = (RemotingDestination) service.createDestination(destinationId); destination.setSource(clazz.getName()); if(destFactory != null) destination.setFactory(destFactory); if(destAdapter != null) destination.createAdapter(destAdapter); if(destScope != null) destination.setScope(destScope); if(destSecurityConstraint != null) destination.setSecurityConstraint(destSecurityConstraint); if(destChannel != null) destination.addChannel(destChannel); service.addDestination(destination); }
/** * Sets the <code>Service</code> managing this <code>Destination</code>. * Removes the <code>Destination</code> from the old service * (if there was one) and adds to the list of destination in the new service. * * @param service The <code>Service</code> managing this <code>Destination</code>. */ public void setService(Service service) { Service oldService = getService(); setParent(service); if (oldService != null) oldService.removeDestination(getId()); // Add the destination to the service if needed if (service.getDestination(getId()) != this) service.addDestination(this); }
/** * Sets the <code>Service</code> managing this <code>Destination</code>. * Removes the <code>Destination</code> from the old service * (if there was one) and adds to the list of destination in the new service. * * @param service The <code>Service</code> managing this <code>Destination</code>. */ public void setService(Service service) { Service oldService = getService(); setParent(service); if (oldService != null) oldService.removeDestination(getId()); // Add the destination to the service if needed if (service.getDestination(getId()) != this) service.addDestination(this); }
/** * Sets the <code>Service</code> managing this <code>Destination</code>. * Removes the <code>Destination</code> from the old service * (if there was one) and adds to the list of destination in the new service. * * @param service The <code>Service</code> managing this <code>Destination</code>. */ public void setService(Service service) { Service oldService = getService(); setParent(service); if (oldService != null) oldService.removeDestination(getId()); // Add the destination to the service if needed if (service.getDestination(getId()) != this) service.addDestination(this); }
protected void createSpringDestination(Service service, String destinationId) { flex.messaging.services.remoting.RemotingDestination destination = (flex.messaging.services.remoting.RemotingDestination)service.createDestination(destinationId); destination.setSource(destinationId); destination.setFactory(destFactory); if(destAdapter != null) destination.createAdapter(destAdapter); if(destScope != null) destination.setScope(destScope); if(destSecurityConstraint != null) destination.setSecurityConstraint(destSecurityConstraint); if(destChannel != null) destination.addChannel(destChannel); service.addDestination(destination); }