private void submit(final ActiveContext context, final String command) {
    try {
      LOG.log(Level.INFO, "Send command {0} to context: {1}", new Object[]{command, context});
      final JavaConfigurationBuilder cb = Tang.Factory.getTang().newConfigurationBuilder();
      cb.addConfiguration(
          TaskConfiguration.CONF
              .set(TaskConfiguration.IDENTIFIER, context.getId() + "_task")
              .set(TaskConfiguration.TASK, ShellTask.class)
              .build()
      );
      cb.bindNamedParameter(Command.class, command);
      context.submitTask(cb.build());
    } catch (final BindException ex) {
      LOG.log(Level.SEVERE, "Bad Task configuration for context: " + context.getId(), ex);
      context.close();
      throw new RuntimeException(ex);
    }
  }
private void submit ( final ActiveContext context , final String command ) { try { LOG . log ( Level . INFO , "Send command {0} to context: {1}" , new Object [ ] { command , context } ) ; final JavaConfigurationBuilder cb = Tang . Factory . getTang ( ) . newConfigurationBuilder ( ) ; cb . addConfiguration ( TaskConfiguration . CONF . set ( TaskConfiguration . IDENTIFIER , context . getId ( ) + "_task" ) . set ( TaskConfiguration . TASK , ShellTask . class ) . build ( ) ) ; cb . bindNamedParameter ( Command . class , command ) ; context . submitTask ( cb . build ( ) ) ; } catch ( final BindException ex ) { LOG . log ( Level . SEVERE , "Bad Task configuration for context: " + context . getId ( ) , ex ) ; context . close ( ) ; throw new RuntimeException ( ex ) ; } }
Submit a Task that execute the command to a single Evaluator.
This method is called from <code>submitTask(cmd)</code>.