@ Override public Vector execute ( TypedVector < ActivityInfo > infos ) throws ActivityException { if ( infos != null && ! infos . isEmpty ( ) ) { logger . trace ( "executing {} activities..." , infos . size ( ) ) ; int i = 0 ; TypedVector < Future < ActivityData > > futures = new TypedVector < Future < ActivityData > > ( ) ; for ( ActivityInfo info : infos ) { ActivityCallable callable = new ActivityCallable ( i ++ , queue , info ) ; futures . add ( submit ( callable ) ) ; } return wait ( futures ) ; } else { logger . warn ( "no activities to execute" ) ; } return null ; }
Submits a set of activities to the underlying asynchornous execution mechanism .