/** * Sets the ProcessLauncherContext data for the calling thread. */ public static void set(final boolean redirectOutput, final Properties contingentProperties, final StartupStatusListener startupListener) { DATA.set(new ProcessLauncherContext(redirectOutput, contingentProperties, startupListener)); installLogListener(startupListener); }
/** * Clears the current ProcessLauncherContext for the calling thread. */ public static void remove() { //DATA.get().restoreErrorStream(); DATA.remove(); clearLogListener(); }
/** * Returns true if this process should redirect output to the system log. * @return true if this process should redirect output to the system log */ public static boolean isRedirectingOutput() { final ProcessLauncherContext context = get(); if (context == null) { return REDIRECT_OUTPUT_DEFAULT; } return context.redirectOutput(); }
public static StartupStatusListener getStartupListener() { final ProcessLauncherContext context = get(); if (context == null) { return null; } return context.startupListener(); }
/** * Returns the gemfire properties to be used if none of the specified * properties are defined by any other mechanism. This will only override * default values. If a property is defined by System property, API, or * within gemfire.properties then the contingent value will be ignored. * @return the contingent gemfire properties values to be used as an * alternative default value */ public static Properties getOverriddenDefaults() { final ProcessLauncherContext context = get(); if (context == null) { return OVERRIDDEN_DEFAULTS_DEFAULT; } return context.overriddenDefaults(); }
final Properties overriddenDefaults = ProcessLauncherContext.getOverriddenDefaults(); if (!overriddenDefaults.isEmpty()) { for (String key : overriddenDefaults.stringPropertyNames()) {
if (ProcessLauncherContext.isRedirectingOutput()) { try { OSProcess.redirectOutput(config.getLogFile());
public static StartupStatusListener getStartupListener() { final ProcessLauncherContext context = get(); if (context == null) { return null; } return context.startupListener(); }
/** * Returns the gemfire properties to be used if none of the specified * properties are defined by any other mechanism. This will only override * default values. If a property is defined by System property, API, or * within gemfire.properties then the contingent value will be ignored. * @return the contingent gemfire properties values to be used as an * alternative default value */ public static Properties getOverriddenDefaults() { final ProcessLauncherContext context = get(); if (context == null) { return OVERRIDDEN_DEFAULTS_DEFAULT; } return context.overriddenDefaults(); }
final Properties overriddenDefaults = ProcessLauncherContext.getOverriddenDefaults(); if (!overriddenDefaults.isEmpty()) { for (String key : overriddenDefaults.stringPropertyNames()) {
if (ProcessLauncherContext.isRedirectingOutput()) { try { OSProcess.redirectOutput(config.getLogFile());
/** * Returns true if this process should redirect output to the system log. * @return true if this process should redirect output to the system log */ public static boolean isRedirectingOutput() { final ProcessLauncherContext context = get(); if (context == null) { return REDIRECT_OUTPUT_DEFAULT; } return context.redirectOutput(); }
/** * Sets the ProcessLauncherContext data for the calling thread. */ public static void set(final boolean redirectOutput, final Properties contingentProperties, final StartupStatusListener startupListener) { DATA.set(new ProcessLauncherContext(redirectOutput, contingentProperties, startupListener)); installLogListener(startupListener); }
/** * Clears the current ProcessLauncherContext for the calling thread. */ public static void remove() { //DATA.get().restoreErrorStream(); DATA.remove(); clearLogListener(); }