davsclaus opened a new pull request, #28124:
URL: https://github.com/apache/camel/pull/28124

   [CAMEL-25829](https://issues.apache.org/jira/browse/CAMEL-25829): 
camel-mina-sftp had no `PollDynamicAware` and no `SendDynamicAware`. The other 
file components have them (file, ftp, ftps, sftp, azure-files, and smb for 
poll). So `poll`, `pollEnrich` and `toD` with a dynamic `fileName`, such as 
`mina-sftp:host/orders?fileName=${header.file}`, resolved an endpoint for each 
name of a file. With mina-sftp, each endpoint also has an SSH session of its 
own.
   
   - `MinaSftpPollDynamicAware` (`@PollDynamic("mina-sftp")`) and 
`MinaSftpSendDynamicAware` (`@SendDynamic("mina-sftp")`) extend the generic 
file classes, as the ones of sftp do. The build generates their service files.
   - The endpoint keeps the `fileName` expression, and it is evaluated for each 
message, as with sftp. When CAMEL-25792 (#28087) is merged, mina-sftp follows 
its rule for `fileName` too, as that change is in the generic file classes.
   
   The URI of `pollEnrich` is dynamic when it is an expression with `${...}`: 
`pollEnrich` in YAML and XML, `pollEnrich().simple(...)` in Java, and `poll`. 
The Java `pollEnrich(String uri, long timeout)` has a static URI, so it used 
one endpoint already.
   
   ## Tests
   
   - New `MinaSftpDynamicFileNameIT` (2), against the embedded SFTP server of 
the other ITs: `pollEnrich` and `toD` with `fileName=${header.target}`, each 
with two names of files. Each test gets the right files with one mina-sftp 
endpoint. Without the two classes, each test has 2 endpoints.
   - All tests of camel-mina-sftp pass: 26 unit tests and 273 integration tests 
(8 skipped, as before).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to