camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/5] camel git commit: CAMEL-7999: More components include documentation
Date Fri, 02 Jan 2015 10:08:42 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/6467b0ff
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6467b0ff
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6467b0ff

Branch: refs/heads/master
Commit: 6467b0ff1302841d55257f8a551028eea93c6177
Parents: b7a803d
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Jan 2 10:54:00 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Jan 2 10:54:00 2015 +0100

----------------------------------------------------------------------
 .../camel/component/smpp/SmppComponent.java     |  8 ++--
 .../camel/component/smpp/SmppConfiguration.java | 42 +++++++++++++++++++-
 .../camel/component/smpp/SmppEndpoint.java      |  4 ++
 3 files changed, 49 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6467b0ff/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java
b/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java
index 3d6034d..eb917e2 100644
--- a/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java
+++ b/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java
@@ -21,24 +21,26 @@ import java.util.Map;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 
 /**
  * @version 
  */
-public class SmppComponent extends DefaultComponent {
+public class SmppComponent extends UriEndpointComponent {
 
     private SmppConfiguration configuration;
 
     public SmppComponent() {
+        super(SmppEndpoint.class);
     }
 
     public SmppComponent(SmppConfiguration configuration) {
+        this();
         this.configuration = configuration;
     }
 
     public SmppComponent(CamelContext context) {
-        super(context);
+        super(context, SmppEndpoint.class);
     }
 
     @SuppressWarnings({ "unchecked", "rawtypes" })

http://git-wip-us.apache.org/repos/asf/camel/blob/6467b0ff/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java
b/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java
index 7f9b63d..a3b352a 100644
--- a/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java
+++ b/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java
@@ -20,6 +20,9 @@ import java.net.URI;
 import java.nio.charset.Charset;
 
 import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
 import org.jsmpp.bean.Alphabet;
 import org.jsmpp.bean.NumberingPlanIndicator;
 import org.jsmpp.bean.ReplaceIfPresentFlag;
@@ -34,42 +37,77 @@ import org.slf4j.LoggerFactory;
  * 
  * @version 
  */
+@UriParams
 public class SmppConfiguration implements Cloneable {
     private static final Logger LOG = LoggerFactory.getLogger(SmppConfiguration.class);
 
+    @UriPath
     private String host = "localhost";
-    private Integer port = Integer.valueOf(2775);
+    @UriPath
+    private Integer port = 2775;
+    @UriParam(defaultValue = "smppclient")
     private String systemId = "smppclient";
+    @UriParam
     private String password = "password";
+    @UriParam(defaultValue = "cp")
     private String systemType = "cp";
+    @UriParam
     private byte dataCoding = (byte) 0;
+    @UriParam
     private byte alphabet = Alphabet.ALPHA_DEFAULT.value();
+    @UriParam(defaultValue = "ISO-8859-1")
     private String encoding = "ISO-8859-1";
+    @UriParam(defaultValue = "5000")
     private Integer enquireLinkTimer = 5000;
+    @UriParam(defaultValue = "10000")
     private Integer transactionTimer = 10000;
+    @UriParam
     private byte registeredDelivery = SMSCDeliveryReceipt.SUCCESS_FAILURE.value();
+    @UriParam(defaultValue = "CMT")
     private String serviceType = "CMT";
+    @UriParam(defaultValue = "1616")
     private String sourceAddr = "1616";
+    @UriParam(defaultValue = "1717")
     private String destAddr = "1717";
+    @UriParam
     private byte sourceAddrTon = TypeOfNumber.UNKNOWN.value();
+    @UriParam
     private byte destAddrTon = TypeOfNumber.UNKNOWN.value();
+    @UriParam
     private byte sourceAddrNpi = NumberingPlanIndicator.UNKNOWN.value();
+    @UriParam
     private byte destAddrNpi = NumberingPlanIndicator.UNKNOWN.value();
+    @UriParam
     private String addressRange = "";
+    @UriParam
     private byte protocolId = (byte) 0;
+    @UriParam
     private byte priorityFlag = (byte) 1;
+    @UriParam
     private byte replaceIfPresentFlag = ReplaceIfPresentFlag.DEFAULT.value();
+    @UriParam
     private byte typeOfNumber = TypeOfNumber.UNKNOWN.value();
+    @UriParam
     private byte numberingPlanIndicator = NumberingPlanIndicator.UNKNOWN.value();
+    @UriParam(defaultValue = "false")
     private boolean usingSSL;
+    @UriParam(defaultValue = "5000")
     private long initialReconnectDelay = 5000;
+    @UriParam(defaultValue = "5000")
     private long reconnectDelay = 5000;
+    @UriParam(defaultValue = "false")
     private boolean lazySessionCreation;
+    @UriParam
     private String httpProxyHost;
-    private Integer httpProxyPort = Integer.valueOf(3128);
+    @UriParam(defaultValue = "3128")
+    private Integer httpProxyPort = 3128;
+    @UriParam
     private String httpProxyUsername;
+    @UriParam
     private String httpProxyPassword;
+    @UriParam
     private SessionStateListener sessionStateListener;
+    @UriParam(defaultValue = "ALLOW")
     private SmppSplittingPolicy splittingPolicy = SmppSplittingPolicy.ALLOW;
 
     

http://git-wip-us.apache.org/repos/asf/camel/blob/6467b0ff/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java
b/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java
index aff5d8c..f9e0a20 100644
--- a/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java
+++ b/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java
@@ -23,6 +23,8 @@ import org.apache.camel.ExchangePattern;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 import org.jsmpp.bean.AlertNotification;
 import org.jsmpp.bean.DataSm;
 import org.jsmpp.bean.DeliverSm;
@@ -32,9 +34,11 @@ import org.jsmpp.bean.DeliverSm;
  * 
  * @version 
  */
+@UriEndpoint(scheme = "smpp", consumerClass = SmppConsumer.class, label = "mobile,messaging")
 public class SmppEndpoint extends DefaultEndpoint {
 
     private SmppBinding binding;
+    @UriParam
     private SmppConfiguration configuration;
 
     public SmppEndpoint(String endpointUri, Component component, SmppConfiguration configuration)
{


Mime
View raw message