* @param context the context
*/
private void addDelegateEngine(AggregateDelegateEngine containingAggregate, List<DelegateConfiguration> delegates, DelegatesType dt, ServiceContext context) {
for( DelegateConfiguration delegate : delegates ) {
if ( delegate.isRemote() ) {
RemoteAnalysisEngineType draet = dt.addNewRemoteAnalysisEngine();
draet.setKey(delegate.getKey());
containingAggregate.addDelegate( new RemoteDelegateEngineImpl( draet, (RemoteDelegateConfiguration)delegate, context) );
} else {
AnalysisEngineType dcaet = dt.addNewAnalysisEngine();
dcaet.setKey(delegate.getKey());
// colocated delegate, either nested aggregate or primitive