/** * 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; }
Log.getLogger(getLogCategory()).warn("No channel with id '{0}' is known by the MessageBroker." + " Not adding the channel.", new Object[]{id});
Log.getLogger(getLogCategory()).warn("No channel with id '{0}' is known by the MessageBroker." + " Not adding the channel.", new Object[]{id});
Log.getLogger(getLogCategory()).warn("No channel with id '{0}' is known by the MessageBroker." + " Not adding the channel.", new Object[]{id});
/** * Verifies that the <code>AbstractService</code> is in valid state before * it is started. If subclasses override, they must call <code>super.validate()</code>. */ protected void validate() { if (isValid()) return; super.validate(); if (defaultChannels != null) { for (Iterator iter = defaultChannels.iterator(); iter.hasNext();) { String id = (String) iter.next(); if (!getMessageBroker().getChannelIds().contains(id)) { iter.remove(); if (Log.isWarn()) { Log.getLogger(getLogCategory()).warn("Removing the Channel "+id+" from Destination "+getId()+ "as MessageBroker does not know the channel"); } } } } else { defaultChannels = getMessageBroker().getDefaultChannels(); } }
if (Log.isWarn()) Log.getLogger(getLogCategory()).warn("Removing the Channel "+id+" from Destination "+getId()+ "as MessageBroker does not know the channel");
if (Log.isWarn()) Log.getLogger(getLogCategory()).warn("Removing the Channel "+id+" from Destination "+getId()+ "as MessageBroker does not know the channel");
Log.getLogger(getLogCategory()).warn("Service with id '{0}' cannot be started" + " when the MessageBroker is not started.", new Object[]{getId()});
Log.getLogger(getLogCategory()).warn("Service with id '{0}' cannot be started" + " when the MessageBroker is not started.", new Object[]{getId()});
Log.getLogger(getLogCategory()).warn("Service with id '{0}' cannot be started" + " when the MessageBroker is not started.", new Object[]{getId()});