コード例 #1
0
 protected void testDataFormat(String format) throws Exception {
   long max = System.currentTimeMillis() + 10000;
   while (true) {
     try {
       DataFormatDefinition dataFormatDefinition = createDataformatDefinition(format);
       assertNotNull(dataFormatDefinition);
       assertNotNull(
           dataFormatDefinition.getDataFormat(new DefaultRouteContext(createCamelContext())));
       return;
     } catch (Exception t) {
       if (System.currentTimeMillis() < max) {
         Thread.sleep(1000);
         continue;
       } else {
         throw t;
       }
     }
   }
 }
コード例 #2
0
 private void findDataFormat(DataFormatDefinition dfd, Set<String> dataformats) {
   if (dfd != null && dfd.getDataFormatName() != null) {
     dataformats.add(dfd.getDataFormatName());
   }
 }