camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: CAMEL-7999: More components include documentation
Date Mon, 05 Jan 2015 14:53:36 GMT
CAMEL-7999: More components include documentation


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/aaa85fc7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/aaa85fc7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/aaa85fc7

Branch: refs/heads/master
Commit: aaa85fc7425a19411c8b03efbb3c70985205dd81
Parents: c8ce8f8
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Jan 5 15:52:35 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Jan 5 15:52:35 2015 +0100

----------------------------------------------------------------------
 .../component/quickfixj/QuickfixjComponent.java    | 10 +++++++---
 .../component/quickfixj/QuickfixjEndpoint.java     | 17 ++++++++++++++++-
 2 files changed, 23 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/aaa85fc7/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjComponent.java
b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjComponent.java
index cd8c014..dc8feda 100644
--- a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjComponent.java
+++ b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjComponent.java
@@ -23,16 +23,15 @@ import java.util.Map;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.StartupListener;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
 import quickfix.LogFactory;
 import quickfix.MessageFactory;
 import quickfix.MessageStoreFactory;
 import quickfix.SessionSettings;
 
-public class QuickfixjComponent extends DefaultComponent implements StartupListener {
+public class QuickfixjComponent extends UriEndpointComponent implements StartupListener {
     private static final Logger LOG = LoggerFactory.getLogger(QuickfixjComponent.class);
     private static final String PARAMETER_LAZY_CREATE_ENGINE = "lazyCreateEngine";
 
@@ -47,6 +46,10 @@ public class QuickfixjComponent extends DefaultComponent implements StartupListe
     private Map<String, QuickfixjConfiguration> configurations = new HashMap<String,
QuickfixjConfiguration>();
     private boolean lazyCreateEngines;
 
+    public QuickfixjComponent() {
+        super(QuickfixjEndpoint.class);
+    }
+
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object>
parameters) throws Exception {
         // Look up the engine instance based on the settings file ("remaining")
@@ -86,6 +89,7 @@ public class QuickfixjComponent extends DefaultComponent implements StartupListe
                 }
 
                 endpoint = new QuickfixjEndpoint(engine, uri, this);
+                endpoint.setConfigurationName(remaining);
                 engine.addEventListener(endpoint);
                 endpoints.put(uri, endpoint);
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/aaa85fc7/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEndpoint.java
b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEndpoint.java
index 09f0822..9c6cc1e 100644
--- a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEndpoint.java
+++ b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEndpoint.java
@@ -29,12 +29,14 @@ import org.apache.camel.Producer;
 import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.camel.component.quickfixj.converter.QuickfixjConverters;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriPath;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
 import quickfix.Message;
 import quickfix.SessionID;
 
+@UriEndpoint(scheme = "quickfix", consumerClass = QuickfixjConsumer.class, label = "engine,messaging")
 public class QuickfixjEndpoint extends DefaultEndpoint implements QuickfixjEventListener,
MultipleConsumersSupport {
     public static final String EVENT_CATEGORY_KEY = "EventCategory";
     public static final String SESSION_ID_KEY = "SessionID";
@@ -45,6 +47,10 @@ public class QuickfixjEndpoint extends DefaultEndpoint implements QuickfixjEvent
 
     private SessionID sessionID;
     private final List<QuickfixjConsumer> consumers = new CopyOnWriteArrayList<QuickfixjConsumer>();
+
+    @UriPath
+    private String configurationName;
+
     private final QuickfixjEngine engine;
 
     @Deprecated
@@ -52,6 +58,7 @@ public class QuickfixjEndpoint extends DefaultEndpoint implements QuickfixjEvent
         super(uri, context);
         this.engine = engine;
     }
+
     public QuickfixjEndpoint(QuickfixjEngine engine, String uri, Component component) {
         super(uri, component);
         this.engine = engine;
@@ -65,6 +72,14 @@ public class QuickfixjEndpoint extends DefaultEndpoint implements QuickfixjEvent
         this.sessionID = sessionID;
     }
 
+    public String getConfigurationName() {
+        return configurationName;
+    }
+
+    public void setConfigurationName(String configurationName) {
+        this.configurationName = configurationName;
+    }
+
     @Override
     public Consumer createConsumer(Processor processor) throws Exception {
         LOG.info("Creating QuickFIX/J consumer: {}, ExchangePattern={}", sessionID != null
? sessionID : "No Session", getExchangePattern());


Mime
View raw message