/**
* {@inheritDoc}
*/
public String launch (String appName, String command, SasProviderConnection connection,
MessageID launchMessageID, CellID cellID) {
AppXrwMaster app = null;
// resolve the command based on the app name. A command value of null
// indicates that the given appName could not be resolved
command = resolveCommand(appName, command);
if (command == null) {
return null;
}
logger.warning("Resolved command = " + command);
try {
app = new AppXrwMaster(appName, command, cellID, null,
ProcessReporterFactory.getFactory().create(appName), session, true);
} catch (InstantiationException ex) {
return null;
}
app.setExitListener(this);
synchronized (runningAppInfos) {
runningAppInfos.put(app, new AppInfo(connection, launchMessageID));
}
// Now it is time to enable the master client loop
app.getClient().enable();
return app.getConnectionInfo().toString();
}