diff --git a/cave/com.raytheon.uf.viz.core/META-INF/services/com.raytheon.uf.common.status.IUFStatusHandlerFactory b/cave/com.raytheon.uf.viz.core/META-INF/services/com.raytheon.uf.common.status.IUFStatusHandlerFactory index 6c384ee653..822cf49029 100644 --- a/cave/com.raytheon.uf.viz.core/META-INF/services/com.raytheon.uf.common.status.IUFStatusHandlerFactory +++ b/cave/com.raytheon.uf.viz.core/META-INF/services/com.raytheon.uf.common.status.IUFStatusHandlerFactory @@ -1 +1 @@ -com.raytheon.uf.viz.core.status.VizStatusHandlerFactory \ No newline at end of file +com.raytheon.uf.common.status.DefaultStatusHandlerFactory \ No newline at end of file diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandler.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandler.java index 9f176e9b80..fe3af344b9 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandler.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandler.java @@ -78,16 +78,17 @@ public class VizStatusHandler implements IUFStatusHandler { */ @Override public void handle(UFStatus status) { - handle(status, this.category); - } + handle(status, this.category); + } - @Override - public void handle(UFStatus status, String category) { + @Override + public void handle(UFStatus status, String category) { if (this.source == null) { if (factory != null) { this.source = factory.getSource(source, pluginId); } } + VizStatusInternal vizStatus = new VizStatusInternal(status, category, source, pluginId); StatusManager.getManager().handle(vizStatus); @@ -98,10 +99,10 @@ public class VizStatusHandler implements IUFStatusHandler { handle(new UFStatus(p, msg)); } - @Override - public void handle(Priority priority, String category, String message) { - handle(priority, category, message, (Throwable) null); - } + @Override + public void handle(Priority priority, String category, String message) { + handle(priority, category, message, (Throwable) null); + } @Override public void handle(Priority p, String msg, Throwable t) { @@ -109,19 +110,19 @@ public class VizStatusHandler implements IUFStatusHandler { } @Override - public void handle(Priority p, String category, String msg, Throwable t) { - handle(new UFStatus(p, msg, t), category); - } + public void handle(Priority p, String category, String msg, Throwable t) { + handle(new UFStatus(p, msg, t), category); + } - @Override + @Override public void debug(String message) { handle(Priority.DEBUG, message); } - @Override - public void debug(String category, String message) { - handle(Priority.DEBUG, category, message); - } + @Override + public void debug(String category, String message) { + handle(Priority.DEBUG, category, message); + } @Override public void info(String message) { @@ -129,48 +130,48 @@ public class VizStatusHandler implements IUFStatusHandler { } @Override - public void info(String category, String message) { - handle(Priority.INFO, category, message); - } + public void info(String category, String message) { + handle(Priority.INFO, category, message); + } - @Override + @Override public void warn(String message) { handle(Priority.WARN, message); } @Override - public void warn(String category, String message) { - handle(Priority.WARN, category, message); - } + public void warn(String category, String message) { + handle(Priority.WARN, category, message); + } - @Override + @Override public void error(String message) { handle(Priority.ERROR, message); } @Override - public void error(String category, String message) { - handle(Priority.ERROR, category, message); - } + public void error(String category, String message) { + handle(Priority.ERROR, category, message); + } - @Override + @Override public void error(String message, Throwable throwable) { handle(Priority.ERROR, message, throwable); } @Override - public void error(String message, String category, Throwable throwable) { - handle(Priority.ERROR, category, message, throwable); - } + public void error(String message, String category, Throwable throwable) { + handle(Priority.ERROR, category, message, throwable); + } - @Override + @Override public void fatal(String message, Throwable throwable) { handle(Priority.FATAL, message, throwable); } - @Override - public void fatal(String message, String category, Throwable throwable) { - handle(Priority.FATAL, category, message, throwable); - } + @Override + public void fatal(String message, String category, Throwable throwable) { + handle(Priority.FATAL, category, message, throwable); + } } diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandlerFactory.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandlerFactory.java index 722d9e9113..f8c98cc110 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandlerFactory.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandlerFactory.java @@ -37,7 +37,7 @@ import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus.Priority; /** - * TODO Add Description + * Viz Status Handler Factory * *
* diff --git a/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/AbstractCAVEComponent.java b/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/AbstractCAVEComponent.java index c02b576f17..72fdcb03bc 100644 --- a/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/AbstractCAVEComponent.java +++ b/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/AbstractCAVEComponent.java @@ -60,6 +60,7 @@ import com.raytheon.uf.viz.core.localization.CAVELocalizationNotificationObserve import com.raytheon.uf.viz.core.localization.LocalizationConstants; import com.raytheon.uf.viz.core.localization.LocalizationInitializer; import com.raytheon.uf.viz.core.localization.LocalizationManager; +import com.raytheon.uf.viz.core.status.VizStatusHandlerFactory; import com.raytheon.viz.alerts.jobs.AutoUpdater; import com.raytheon.viz.alerts.jobs.MenuUpdater; import com.raytheon.viz.alerts.observers.ProductAlertObserver; @@ -88,6 +89,7 @@ import com.raytheon.viz.core.units.UnitRegistrar; * the command line even if practice * mode is off. * Jan 09, 2013 #1442 rferrel Changes to notify SimultedTime listeners. + * Apr 17, 2013 1786 mpduff startComponent now sets StatusHandlerFactory * ** @@ -162,6 +164,8 @@ public abstract class AbstractCAVEComponent implements IStandaloneComponent { // dialog which would break gfeClient-based cron jobs. return IApplication.EXIT_OK; } + UFStatus.setHandlerFactory(new VizStatusHandlerFactory()); + initializeSerialization(); initializeDataStoreFactory(); initializeObservers(); diff --git a/edexOsgi/com.raytheon.uf.common.serialization.comm/src/com/raytheon/uf/common/serialization/comm/RequestRouter.java b/edexOsgi/com.raytheon.uf.common.serialization.comm/src/com/raytheon/uf/common/serialization/comm/RequestRouter.java index 5a262b5f02..fbc6beee6a 100644 --- a/edexOsgi/com.raytheon.uf.common.serialization.comm/src/com/raytheon/uf/common/serialization/comm/RequestRouter.java +++ b/edexOsgi/com.raytheon.uf.common.serialization.comm/src/com/raytheon/uf/common/serialization/comm/RequestRouter.java @@ -19,6 +19,8 @@ **/ package com.raytheon.uf.common.serialization.comm; +import com.raytheon.uf.common.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.util.registry.GenericRegistry; import com.raytheon.uf.common.util.registry.RegistryException; @@ -35,8 +37,7 @@ import com.raytheon.uf.common.util.registry.RegistryException; * Nov 15, 2012 1322 djohnson Add ability to route by server key. * Mar 05, 2013 1754 djohnson Prevent infinite loop when request.server router not registered, * info log when router registered. - * Apr 04, 2013 1786 mpduff Remove StatusHandler and logging. Prevents thrift logging - * requests from happening before the VIZ platform is ready. + * Apr 04, 2013 1786 mpduff Simplify logging. * * * @@ -45,6 +46,9 @@ import com.raytheon.uf.common.util.registry.RegistryException; */ public final class RequestRouter { + private static final IUFStatusHandler statusHandler = UFStatus + .getHandler(RequestRouter.class); + static final String REQUEST_SERVICE = "request.server"; /** @@ -65,7 +69,8 @@ public final class RequestRouter { + s.getClass().getName() + "] already registered for key [" + t + "]")); } - + statusHandler.info("Registered request router for key [" + t + + "] of type [" + s.getClass().getName() + "]"); return super.register(t, s); } diff --git a/edexOsgi/com.raytheon.uf.common.status/src/com/raytheon/uf/common/status/AbstractHandlerFactory.java b/edexOsgi/com.raytheon.uf.common.status/src/com/raytheon/uf/common/status/AbstractHandlerFactory.java index e97766a8ab..83f5e62ca8 100644 --- a/edexOsgi/com.raytheon.uf.common.status/src/com/raytheon/uf/common/status/AbstractHandlerFactory.java +++ b/edexOsgi/com.raytheon.uf.common.status/src/com/raytheon/uf/common/status/AbstractHandlerFactory.java @@ -46,7 +46,7 @@ public abstract class AbstractHandlerFactory implements private final String defaultCategory; - private Map