}
private void createDestination(DestinationSettings destSettings, Service service, ServiceSettings svcSettings)
{
String destId = destSettings.getId();
Destination destination = service.createDestination(destId);
// Channels
List chanSettings = destSettings.getChannelSettings();
if (chanSettings.size() > 0)
{
List channelIds = new ArrayList(2);
for (Iterator iter = chanSettings.iterator(); iter.hasNext();) {
ChannelSettings cs = (ChannelSettings) iter.next();
channelIds.add(cs.getId());
}
destination.setChannels(channelIds);
}
// Security
SecurityConstraint constraint = destSettings.getConstraint();
destination.setSecurityConstraint(constraint);
// Initialize with service, adapter and destination properties
destination.initialize(destId, svcSettings.getProperties());
destination.initialize(destId, destSettings.getAdapterSettings().getProperties());
destination.initialize(destId, destSettings.getProperties());
// Service Adapter
createAdapter(destination, destSettings, svcSettings);
}