void onNextJVM ( final AllocatedEvaluator allocatedEvaluator ) { try { final Configuration contextConfiguration = ContextConfiguration . CONF . set ( ContextConfiguration . IDENTIFIER , "HelloREEFContext" ) . build ( ) ; final Configuration taskConfiguration = TaskConfiguration . CONF . set ( TaskConfiguration . IDENTIFIER , "HelloREEFTask" ) . set ( TaskConfiguration . TASK , HelloTask . class ) . build ( ) ; allocatedEvaluator . submitContextAndTask ( contextConfiguration , taskConfiguration ) ; } catch ( final BindException ex ) { final String message = "Unable to setup Task or Context configuration." ; LOG . log ( Level . SEVERE , message , ex ) ; throw new RuntimeException ( message , ex ) ; } }
Uses the AllocatedEvaluator to launch a JVM task .