private List < GeneratorTask > createWaiterClassTasks ( ) throws IOException { Metadata metadata = model . getMetadata ( ) ; final String className = metadata . getSyncInterface ( ) + "Waiters" ; Map < String , Object > dataModel = ImmutableMapParameter . of ( "fileHeader" , model . getFileHeader ( ) , "className" , className , "waiters" , model . getWaiters ( ) , "operation" , model . getOperations ( ) , "metadata" , metadata ) ; return Collections . singletonList ( new FreemarkerGeneratorTask ( waiterClassDir , className , freemarker . getWaiterTemplate ( ) , dataModel ) ) ; }
Constructs the data model and submits tasks for every generating synchronous waiter and asynchronous waiter for each waiter in the intermediate model .