Updated Branches: refs/heads/master 5bd55549a -> fb3537e98
CAMEL-6304: Added more @UriParam to components in camel-core Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fb3537e9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fb3537e9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fb3537e9 Branch: refs/heads/master Commit: fb3537e98b7ef38ad7c2d386309872355ee90bb4 Parents: 5bd5554 Author: Claus Ibsen <davscl...@apache.org> Authored: Wed Jun 5 11:23:16 2013 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Wed Jun 5 11:58:02 2013 +0200 ---------------------------------------------------------------------- .../apache/camel/component/file/FileEndpoint.java | 5 +- .../camel/component/file/GenericFileEndpoint.java | 45 ++++++++++++++- .../org/apache/camel/impl/DefaultEndpoint.java | 3 + 3 files changed, 48 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/fb3537e9/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java index 42ea3c3..a3d1256 100644 --- a/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java @@ -35,10 +35,7 @@ import org.apache.camel.util.ObjectHelper; @UriEndpoint(scheme = "file", consumerClass = FileConsumer.class) public class FileEndpoint extends GenericFileEndpoint<File> { - private FileOperations operations = new FileOperations(this); - /** - * - */ + private final FileOperations operations = new FileOperations(this); @UriPath private File file; @UriParam http://git-wip-us.apache.org/repos/asf/camel/blob/fb3537e9/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java index 029e09f..d74a334 100644 --- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java @@ -37,6 +37,7 @@ import org.apache.camel.spi.BrowsableEndpoint; import org.apache.camel.spi.FactoryFinder; import org.apache.camel.spi.IdempotentRepository; import org.apache.camel.spi.Language; +import org.apache.camel.spi.UriParam; import org.apache.camel.util.FileUtil; import org.apache.camel.util.IOHelper; import org.apache.camel.util.ObjectHelper; @@ -55,49 +56,91 @@ public abstract class GenericFileEndpoint<T> extends ScheduledPollEndpoint imple protected final transient Logger log = LoggerFactory.getLogger(getClass()); - protected GenericFileProcessStrategy<T> processStrategy; protected GenericFileConfiguration configuration; + @UriParam + protected GenericFileProcessStrategy<T> processStrategy; + @UriParam protected IdempotentRepository<String> inProgressRepository = new MemoryIdempotentRepository(); + @UriParam protected String localWorkDirectory; + @UriParam protected boolean autoCreate = true; + @UriParam protected boolean startingDirectoryMustExist; + @UriParam protected boolean directoryMustExist; + @UriParam protected int bufferSize = FileUtil.BUFFER_SIZE; + @UriParam protected GenericFileExist fileExist = GenericFileExist.Override; + @UriParam protected boolean noop; + @UriParam protected boolean recursive; + @UriParam protected boolean delete; + @UriParam protected boolean flatten; + @UriParam protected int maxMessagesPerPoll; + @UriParam protected boolean eagerMaxMessagesPerPoll = true; + @UriParam protected int maxDepth = Integer.MAX_VALUE; + @UriParam protected int minDepth; + @UriParam protected String tempPrefix; + @UriParam protected Expression tempFileName; + @UriParam protected boolean eagerDeleteTargetFile = true; + @UriParam protected String include; + @UriParam protected String exclude; + @UriParam protected String charset; + @UriParam protected Expression fileName; + @UriParam protected Expression move; + @UriParam protected Expression moveFailed; + @UriParam protected Expression preMove; + @UriParam protected Expression moveExisting; + @UriParam protected Boolean idempotent; + @UriParam protected Expression idempotentKey; + @UriParam protected IdempotentRepository<String> idempotentRepository; + @UriParam protected GenericFileFilter<T> filter; + @UriParam protected AntPathMatcherGenericFileFilter<T> antFilter; + @UriParam protected Comparator<GenericFile<T>> sorter; + @UriParam protected Comparator<Exchange> sortBy; + @UriParam protected String readLock = "none"; + @UriParam protected long readLockCheckInterval = 1000; + @UriParam protected long readLockTimeout = 10000; + @UriParam protected long readLockMinLength = 1; + @UriParam protected GenericFileExclusiveReadLockStrategy<T> exclusiveReadLockStrategy; + @UriParam protected boolean keepLastModified; + @UriParam protected String doneFileName; + @UriParam protected boolean allowNullBody; public GenericFileEndpoint() { http://git-wip-us.apache.org/repos/asf/camel/blob/fb3537e9/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java index 3b12a40..3e8146a 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java @@ -30,6 +30,7 @@ import org.apache.camel.ExchangePattern; import org.apache.camel.PollingConsumer; import org.apache.camel.ResolveEndpointFailedException; import org.apache.camel.spi.HasId; +import org.apache.camel.spi.UriParam; import org.apache.camel.support.ServiceSupport; import org.apache.camel.util.EndpointHelper; import org.apache.camel.util.IntrospectionSupport; @@ -55,9 +56,11 @@ public abstract class DefaultEndpoint extends ServiceSupport implements Endpoint private EndpointConfiguration endpointConfiguration; private CamelContext camelContext; private Component component; + @UriParam private ExchangePattern exchangePattern = ExchangePattern.InOnly; // option to allow end user to dictate whether async processing should be // used or not (if possible) + @UriParam private boolean synchronous; private final String id = EndpointHelper.createEndpointId(); private Map<String, Object> consumerProperties;