LaunchConfig launchConfig = injector.getInstance(LaunchConfig.class);
String endpointPath = path == null ? launchConfig.getOther("remoteControl.path", "remote-control") : path;
boolean enabled = Boolean.valueOf(launchConfig.getOther("remoteControl.enabled", "false")) || launchConfig.isDevelopment();
if (enabled) {
return new RemoteControlHandler(endpointPath, Guice.justInTimeRegistry(injector), handler);
} else {
return handler;
}
}