예제 #1
0
 public Collection<Class<?>> getObjectTypes() {
   List<DataTransferPipe> dataPipes = getDataPipes();
   Set<Class<?>> objectTypes = new HashSet<>();
   for (DataTransferPipe transferPipe : dataPipes) {
     if (transferPipe.getProducer() != null) {
       objectTypes.add(transferPipe.getProducer().getSourceObject().getClass());
     }
   }
   return objectTypes;
 }
예제 #2
0
 void selectConsumer(
     DataTransferNodeDescriptor consumer, DataTransferProcessorDescriptor processor) {
   this.consumer = consumer;
   this.processor = processor;
   if (consumer != null && processor != null) {
     if (!processorPropsHistory.containsKey(processor)) {
       processorPropsHistory.put(processor, new HashMap<>());
     }
   }
   // Configure pipes
   for (DataTransferPipe pipe : dataPipes) {
     if (consumer != null) {
       try {
         pipe.setConsumer((IDataTransferConsumer) consumer.createNode());
       } catch (DBException e) {
         log.error(e);
         pipe.setConsumer(null);
       }
     } else {
       pipe.setConsumer(null);
     }
   }
 }