run method
Runs the container by instantiating and running components inside the container.
It reads the container configuration, creates, configures, references and opens components. On process exit it closes, unreferences and destroys components to gracefully shutdown.
- args command line arguments
Implementation
void run(List<String> args) async {
if (_showHelp(args)) {
_printHelp();
return;
}
var correlationId = info?.name;
try {
var path = _getConfigPath(args);
var parameters = _getParameters(args);
await readConfigFromFile(correlationId, path, parameters);
_captureExit(correlationId);
await open(correlationId);
} catch (ex) {
// Log uncaught exceptions
var err = ApplicationException().wrap(ex);
logger.fatal(correlationId, err, 'Process is terminated', []);
exit(1);
}
}