karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject karaf-decanter git commit: [KARAF-4574] Only start if config is present
Date Wed, 13 Jul 2016 12:33:40 GMT
Repository: karaf-decanter
Updated Branches:
  refs/heads/master c081611b4 -> 5407124af


[KARAF-4574] Only start if config is present


Project: http://git-wip-us.apache.org/repos/asf/karaf-decanter/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-decanter/commit/5407124a
Tree: http://git-wip-us.apache.org/repos/asf/karaf-decanter/tree/5407124a
Diff: http://git-wip-us.apache.org/repos/asf/karaf-decanter/diff/5407124a

Branch: refs/heads/master
Commit: 5407124aff1b533bcd8a28909a12c1c7e2b5627f
Parents: c081611
Author: Christian Schneider <chris@die-schneider.net>
Authored: Wed Jul 13 14:30:44 2016 +0200
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Wed Jul 13 14:30:44 2016 +0200

----------------------------------------------------------------------
 .../karaf/decanter/collector/log/socket/SocketCollector.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/5407124a/collector/log4j-socket/src/main/java/org/apache/karaf/decanter/collector/log/socket/SocketCollector.java
----------------------------------------------------------------------
diff --git a/collector/log4j-socket/src/main/java/org/apache/karaf/decanter/collector/log/socket/SocketCollector.java
b/collector/log4j-socket/src/main/java/org/apache/karaf/decanter/collector/log/socket/SocketCollector.java
index c080d57..ab48cb0 100644
--- a/collector/log4j-socket/src/main/java/org/apache/karaf/decanter/collector/log/socket/SocketCollector.java
+++ b/collector/log4j-socket/src/main/java/org/apache/karaf/decanter/collector/log/socket/SocketCollector.java
@@ -38,6 +38,7 @@ import org.apache.log4j.spi.LoggingEvent;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.ConfigurationPolicy;
 import org.osgi.service.component.annotations.Deactivate;
 import org.osgi.service.component.annotations.Reference;
 import org.osgi.service.event.Event;
@@ -45,7 +46,12 @@ import org.osgi.service.event.EventAdmin;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@Component(name = "org.apache.karaf.decanter.collector.log.socket", immediate = true)
+@Component //
+( //
+  name = "org.apache.karaf.decanter.collector.log.socket", //
+  configurationPolicy = ConfigurationPolicy.REQUIRE, //
+  immediate = true //
+)
 public class SocketCollector implements Closeable, Runnable {
 
     public static final String PORT_NAME = "port";


Mime
View raw message