public String getId() { return service.getId(); }
public String getId() { return service.getId(); }
public String getId() { return service.getId(); }
/** * Start all of the broker's services. * * @exclude */ private void startServices() { for (Iterator iter=services.values().iterator(); iter.hasNext(); ) { Service svc = (Service) iter.next(); long timeBeforeStartup = 0; if (Log.isDebug()) { timeBeforeStartup = System.currentTimeMillis(); Log.getLogger(LOG_CATEGORY_STARTUP_SERVICE).debug("Service with id '{0}' is starting.", new Object[]{svc.getId()}); } svc.start(); if (Log.isDebug()) { long timeAfterStartup = System.currentTimeMillis(); Long diffMillis = new Long(timeAfterStartup - timeBeforeStartup); Log.getLogger(LOG_CATEGORY_STARTUP_SERVICE).debug("Service with id '{0}' is ready (startup time: '{1}' ms)", new Object[]{svc.getId(), diffMillis}); } } }
/** * Error checking is done on the started MessageBroker to ensure configuration was successful. * * @see MessageBrokerConfigProcessor#processAfterStartup(MessageBroker) */ public MessageBroker processAfterStartup(MessageBroker broker) { // Eagerly detect possible problems with the Service Service service = broker.getServiceByType(getServiceClassName()); Assert.notNull(service, "The MessageBroker with id '" + broker.getId() + "' does not have a service of type " + getServiceClassName() + " configured."); Assert.isTrue(service.isStarted(), "The Service with id '" + service.getId() + "' of MessageBroker with id '" + broker.getId() + "' was not started as expected."); return broker; }
/** * Start all of the broker's services. * * */ private void startServices() { for (Service svc : services.values() ) { long timeBeforeStartup = 0; if (Log.isDebug()) { timeBeforeStartup = System.currentTimeMillis(); Log.getLogger(LOG_CATEGORY_STARTUP_SERVICE).debug("Service with id '{0}' is starting.", new Object[]{svc.getId()}); } svc.start(); if (Log.isDebug()) { long timeAfterStartup = System.currentTimeMillis(); Long diffMillis = timeAfterStartup - timeBeforeStartup; Log.getLogger(LOG_CATEGORY_STARTUP_SERVICE).debug("Service with id '{0}' is ready (startup time: '{1}' ms)", new Object[]{svc.getId(), diffMillis}); } } }
/** * Start all of the broker's services. * * */ private void startServices() { for (Service svc : services.values() ) { long timeBeforeStartup = 0; if (Log.isDebug()) { timeBeforeStartup = System.currentTimeMillis(); Log.getLogger(LOG_CATEGORY_STARTUP_SERVICE).debug("Service with id '{0}' is starting.", new Object[]{svc.getId()}); } svc.start(); if (Log.isDebug()) { long timeAfterStartup = System.currentTimeMillis(); Long diffMillis = timeAfterStartup - timeBeforeStartup; Log.getLogger(LOG_CATEGORY_STARTUP_SERVICE).debug("Service with id '{0}' is ready (startup time: '{1}' ms)", new Object[]{svc.getId(), diffMillis}); } } }
/** * 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>. */ 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.getMessageBroker().unregisterDestination(oldId); service.getDestinations().remove(oldId); service.getMessageBroker().registerDestination(id, service.getId()); service.getDestinations().put(id, this); } }
String id = service.getId();
String id = service.getId();
String id = service.getId();
ex.setMessage(ConfigurationConstants.UNREGISTERED_ADAPTER, new Object[]{id, getService().getId()}); throw ex;
ex.setMessage(ConfigurationConstants.UNREGISTERED_ADAPTER, new Object[]{id, getService().getId()}); throw ex;
ex.setMessage(ConfigurationConstants.UNREGISTERED_ADAPTER, new Object[]{id, getService().getId()}); throw ex;
/** * * Check that the destination permits access over the endpoint, the security * constraint of the destination permits the operation, and the service and * the destination the message is targeting are running, * * @param message The incoming message. * @param destination The destination to check against. */ public void inspectOperation(Message message, Destination destination) { inspectChannel(message, destination); loginManager.checkConstraint(destination.getSecurityConstraint()); Service service = destination.getService(); if (!service.isStarted()) { // {0} ''{1}'' cannot service message ''{2}'' in stopped state. MessageException me = new MessageException(); me.setMessage(ERR_MSG_CANNOT_SERVICE_STOPPED, new Object[]{SERVICE, service.getId(), message.getMessageId()}); throw me; } if (!destination.isStarted()) { // {0} ''{1}'' cannot service message ''{2}'' in stopped state. MessageException me = new MessageException(); me.setMessage(ERR_MSG_CANNOT_SERVICE_STOPPED, new Object[]{"Destination", destination.getId(), message.getMessageId()}); throw me; } }
/** * * Check that the destination permits access over the endpoint, the security * constraint of the destination permits the operation, and the service and * the destination the message is targeting are running, * * @param message The incoming message. * @param destination The destination to check against. */ public void inspectOperation(Message message, Destination destination) { inspectChannel(message, destination); loginManager.checkConstraint(destination.getSecurityConstraint()); Service service = destination.getService(); if (!service.isStarted()) { // {0} ''{1}'' cannot service message ''{2}'' in stopped state. MessageException me = new MessageException(); me.setMessage(ERR_MSG_CANNOT_SERVICE_STOPPED, new Object[]{SERVICE, service.getId(), message.getMessageId()}); throw me; } if (!destination.isStarted()) { // {0} ''{1}'' cannot service message ''{2}'' in stopped state. MessageException me = new MessageException(); me.setMessage(ERR_MSG_CANNOT_SERVICE_STOPPED, new Object[]{"Destination", destination.getId(), message.getMessageId()}); throw me; } }
new Object[]{getId(), service.getId()});
new Object[]{getId(), service.getId()});
new Object[]{getId(), service.getId()});