/** * Sets the channel list of the <code>AbstractService</code>. * <code>MessageBroker</code> has to know the channels, otherwise they * are not added to the list. * * @param ids List of channel ids. */ public void setDefaultChannels(List ids) { if (ids != null && isStarted()) { List channelIds = getMessageBroker().getChannelIds(); for (Iterator iter = ids.iterator(); iter.hasNext();) { String id = (String) iter.next(); if (channelIds == null || !channelIds.contains(id)) { iter.remove(); if (Log.isWarn()) { Log.getLogger(getLogCategory()).warn("No channel with id '{0}' is known by the MessageBroker." + " Not adding the channel.", new Object[]{id}); } } } } // Otherwise, channels will be checked before startup defaultChannels = ids; }
/** * Sets the channel list of the <code>AbstractService</code>. * <code>MessageBroker</code> has to know the channels, otherwise they * are not added to the list. * * @param ids List of channel ids. */ public void setDefaultChannels(List<String> ids) { if (ids != null && isStarted()) { List<String> channelIds = getMessageBroker().getChannelIds(); for (Iterator<String> iter = ids.iterator(); iter.hasNext();) { String id = iter.next(); if (channelIds == null || !channelIds.contains(id)) { iter.remove(); if (Log.isWarn()) { Log.getLogger(getLogCategory()).warn("No channel with id '{0}' is known by the MessageBroker." + " Not adding the channel.", new Object[]{id}); } } } } // Otherwise, channels will be checked before startup defaultChannels = ids; }
/** * Sets the channel list of the <code>AbstractService</code>. * <code>MessageBroker</code> has to know the channels, otherwise they * are not added to the list. * * @param ids List of channel ids. */ public void setDefaultChannels(List<String> ids) { if (ids != null && isStarted()) { List<String> channelIds = getMessageBroker().getChannelIds(); for (Iterator<String> iter = ids.iterator(); iter.hasNext();) { String id = iter.next(); if (channelIds == null || !channelIds.contains(id)) { iter.remove(); if (Log.isWarn()) { Log.getLogger(getLogCategory()).warn("No channel with id '{0}' is known by the MessageBroker." + " Not adding the channel.", new Object[]{id}); } } } } // Otherwise, channels will be checked before startup defaultChannels = ids; }
return; if (isStarted())
return; if (isStarted())
return; if (isStarted())
/** * The default implementation of this method stops all of the destinations * of the service. * If subclasses override, they must call <code>super.stop()</code>. */ @Override public void stop() { if (!isStarted()) { return; } stopDestinations(); super.stop(); // Remove management if (isManaged() && getMessageBroker().isManaged()) { if (getControl() != null) { getControl().unregister(); setControl(null); } setManaged(false); } }
/** * The default implementation of this method stops all of the destinations * of the service. * If subclasses override, they must call <code>super.stop()</code>. */ public void stop() { if (!isStarted()) { return; } stopDestinations(); super.stop(); // Remove management if (isManaged() && getMessageBroker().isManaged()) { if (getControl() != null) { getControl().unregister(); setControl(null); } setManaged(false); } }
/** * The default implementation of this method stops all of the destinations * of the service. * If subclasses override, they must call <code>super.stop()</code>. */ @Override public void stop() { if (!isStarted()) { return; } stopDestinations(); super.stop(); // Remove management if (isManaged() && getMessageBroker().isManaged()) { if (getControl() != null) { getControl().unregister(); setControl(null); } setManaged(false); } }
public void start() if (isStarted())
public void start() if (isStarted())