servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r487189 - in /incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src: main/java/org/apache/servicemix/ftp/ test/resources/
Date Thu, 14 Dec 2006 12:35:04 GMT
Author: gnodet
Date: Thu Dec 14 04:35:04 2006
New Revision: 487189

URL: http://svn.apache.org/viewvc?view=rev&rev=487189
Log:
Use a marker interface to generate a clean XSD and keep a single endpoints properties for
all endpoints.

Added:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpointType.java
  (with props)
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpPollerEndpoint.java
      - copied, changed from r486860, incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpPollingEndpoint.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpSenderEndpoint.java
      - copied, changed from r486716, incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpoint.java
Removed:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpoint.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpPollingEndpoint.java
Modified:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpComponent.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/resources/spring-polling.xml
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/resources/spring.xml

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpComponent.java?view=diff&rev=487189&r1=487188&r2=487189
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpComponent.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpComponent.java
Thu Dec 14 04:35:04 2006
@@ -17,7 +17,6 @@
 package org.apache.servicemix.ftp;
 
 import java.net.URI;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
@@ -36,44 +35,26 @@
  */
 public class FtpComponent extends DefaultComponent {
 
-    private FtpEndpoint[] endpoints;
-    private FtpPollingEndpoint[] pollingEndpoints;
+    private FtpEndpointType[] endpoints;
 
-    public FtpEndpoint[] getEndpoints() {
+    public FtpEndpointType[] getEndpoints() {
         return endpoints;
     }
 
-    public void setEndpoints(FtpEndpoint[] endpoints) {
+    public void setEndpoints(FtpEndpointType[] endpoints) {
         this.endpoints = endpoints;
     }
 
-    /**
-     * @return the pollingEndpoints
-     */
-    public FtpPollingEndpoint[] getPollingEndpoints() {
-        return pollingEndpoints;
-    }
-
-    /**
-     * @param pollingEndpoints the pollingEndpoints to set
-     */
-    public void setPollingEndpoints(FtpPollingEndpoint[] pollingEndpoints) {
-        this.pollingEndpoints = pollingEndpoints;
-    }
-
     protected List getConfiguredEndpoints() {
-        ArrayList l = new ArrayList();
-        l.addAll(asList(getEndpoints()));
-        l.addAll(asList(getPollingEndpoints()));
-        return l;
+        return asList(getEndpoints());
     }
 
     protected Class[] getEndpointClasses() {
-        return new Class[] { FtpEndpoint.class, FtpPollingEndpoint.class };
+        return new Class[] { FtpPollerEndpoint.class, FtpSenderEndpoint.class };
     }
 
     protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {
-        FtpEndpoint ftpEndpoint = new FtpEndpoint(this, ep);
+        FtpSenderEndpoint ftpEndpoint = new FtpSenderEndpoint(this, ep);
         URI uri = new URI(ep.getEndpointName());
         Map map = URISupport.parseQuery(uri.getQuery());
         IntrospectionSupport.setProperties(ftpEndpoint, map);

Added: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpointType.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpointType.java?view=auto&rev=487189
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpointType.java
(added)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpointType.java
Thu Dec 14 04:35:04 2006
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.ftp;
+
+/**
+ * Marker interface for FTP endpoints
+ * 
+ * @author gnodet
+ */
+public interface FtpEndpointType {
+
+}

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpointType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpointType.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpointType.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpPollerEndpoint.java
(from r486860, incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpPollingEndpoint.java)
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpPollerEndpoint.java?view=diff&rev=487189&p1=incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpPollingEndpoint.java&r1=486860&p2=incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpPollerEndpoint.java&r2=487189
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpPollingEndpoint.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpPollerEndpoint.java
Thu Dec 14 04:35:04 2006
@@ -49,11 +49,11 @@
  * and sends the files into the JBI bus as messages, deleting the files
  * by default when they are processed.
  *
- * @org.apache.xbean.XBean element="pollingEndpoint"
+ * @org.apache.xbean.XBean element="poller"
  *
  * @version $Revision: 468487 $
  */
-public class FtpPollingEndpoint extends PollingEndpoint {
+public class FtpPollerEndpoint extends PollingEndpoint implements FtpEndpointType {
 
     private FTPClientPool clientPool;
     private FileFilter filter;
@@ -63,14 +63,14 @@
     private LockManager lockManager;
     private URI uri;
 
-    public FtpPollingEndpoint() {
+    public FtpPollerEndpoint() {
     }
 
-    public FtpPollingEndpoint(ServiceUnit serviceUnit, QName service, String endpoint) {
+    public FtpPollerEndpoint(ServiceUnit serviceUnit, QName service, String endpoint) {
         super(serviceUnit, service, endpoint);
     }
 
-    public FtpPollingEndpoint(DefaultComponent component, ServiceEndpoint endpoint) {
+    public FtpPollerEndpoint(DefaultComponent component, ServiceEndpoint endpoint) {
         super(component, endpoint);
     }
 

Copied: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpSenderEndpoint.java
(from r486716, incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpoint.java)
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpSenderEndpoint.java?view=diff&rev=487189&p1=incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpoint.java&r1=486716&p2=incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpSenderEndpoint.java&r2=487189
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpoint.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpSenderEndpoint.java
Thu Dec 14 04:35:04 2006
@@ -35,9 +35,9 @@
  * An FTP endpoint
  *
  * @version $Revision: $
- * @org.apache.xbean.XBean element="endpoint"
+ * @org.apache.xbean.XBean element="sender"
  */
-public class FtpEndpoint extends ProviderEndpoint {
+public class FtpSenderEndpoint extends ProviderEndpoint implements FtpEndpointType {
 
     private FTPClientPool clientPool;
     private FileMarshaler marshaler = new DefaultFileMarshaler();
@@ -45,10 +45,10 @@
     private boolean overwrite = false;
     private URI uri;
 
-    public FtpEndpoint() {
+    public FtpSenderEndpoint() {
     }
 
-    public FtpEndpoint(FtpComponent component, ServiceEndpoint endpoint) {
+    public FtpSenderEndpoint(FtpComponent component, ServiceEndpoint endpoint) {
         super(component, endpoint);
     }
     

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/resources/spring-polling.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/resources/spring-polling.xml?view=diff&rev=487189&r1=487188&r2=487189
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/resources/spring-polling.xml
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/resources/spring-polling.xml
Thu Dec 14 04:35:04 2006
@@ -29,17 +29,15 @@
       	<sm:component>
             <ftp:component>
             	<ftp:endpoints>
-            		<ftp:endpoint service="test:service"
-                              endpoint="endpoint" 
-                              uri="ftp://servicemix:rocks@localhost/smx/test" />
-            	</ftp:endpoints>
+            		<ftp:sender service="test:service"
+                            endpoint="endpoint" 
+                            uri="ftp://servicemix:rocks@localhost/smx/test" />
             	
-              <ftp:pollingEndpoints>
-                <ftp:pollingEndpoint service="test:poller"
-                                     endpoint="endpoint"
-                                     targetService="test:receiver"
-                                     uri="ftp://servicemix:rocks@localhost/smx/test" />
-              </ftp:pollingEndpoints>
+                <ftp:poller service="test:poller"
+                            endpoint="endpoint"
+                            targetService="test:receiver"
+                            uri="ftp://servicemix:rocks@localhost/smx/test" />
+            	</ftp:endpoints>
             </ftp:component>
         </sm:component>
       </sm:activationSpec>

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/resources/spring.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/resources/spring.xml?view=diff&rev=487189&r1=487188&r2=487189
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/resources/spring.xml
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/resources/spring.xml
Thu Dec 14 04:35:04 2006
@@ -29,9 +29,9 @@
       	<sm:component>
             <ftp:component>
             	<ftp:endpoints>
-            		<ftp:endpoint service="test:service"
-                              endpoint="endpoint" 
-                              uri="ftp://servicemix:rocks@localhost/smx/test" />
+            		<ftp:sender service="test:service"
+                            endpoint="endpoint" 
+                            uri="ftp://servicemix:rocks@localhost/smx/test" />
             	</ftp:endpoints>
             </ftp:component>
         </sm:component>



Mime
View raw message