You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/reference/antora/modules/ROOT/pages/smb.adoc
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ The https://github.com/codelibs/jcifs[Java CIFS] Client Library has been chosen
35
35
Its `SmbFile` abstraction is simply wrapped to the Spring Integration "Remote File" foundations like `SmbSession`, `SmbRemoteFileTemplate`, etc.
36
36
37
37
The SMB Channel Adapters and support classes implementations are fully similar to existing components for (S)FTP or AWS S3 protocols.
38
-
So, if you familiar with those components it is pretty straightforward to use.
38
+
So, if you are familiar with those components, it is pretty straightforward to use.
39
39
40
40
Spring Integration supports sending and receiving files over SMB by providing three client-side endpoints: inbound channel adapter, outbound channel adapter, and outbound gateway.
41
41
It also provides convenient namespace-based configuration options for defining these client components.
@@ -117,7 +117,7 @@ And then its bean can be injected into channel adapters described below.
117
117
118
118
To download SMB files locally the `SmbInboundFileSynchronizingMessageSource` is provided.
119
119
It is simple extension of the `AbstractInboundFileSynchronizingMessageSource` which requires `SmbInboundFileSynchronizer` injection.
120
-
For filtering remote files you still can use any existing `FileListFilter` implementations, but particular `SmbRegexPatternFileListFilter` and `SmbSimplePatternFileListFilter` are provided.
120
+
For filtering remote files, you still can use any existing `FileListFilter` implementations, but particular `SmbRegexPatternFileListFilter` and `SmbSimplePatternFileListFilter` are provided.
121
121
122
122
[source,java]
123
123
----
@@ -215,7 +215,7 @@ public class SmbJavaApplication {
215
215
[[smb-streaming-inbound]]
216
216
== SMB Streaming Inbound Channel Adapter
217
217
218
-
This adapter produces message with payloads of type `InputStream`, letting files be fetched without writing to the local file system.
218
+
This adapter produces a message with payloads of type `InputStream`, letting files be fetched without writing to the local file system.
219
219
Since the session remains open, the consuming application is responsible for closing the session when the file has been consumed.
220
220
The session is provided in the `closeableResource` header (`IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE`).
221
221
Standard framework components, such as the `FileSplitter` and `StreamTransformer`, automatically close the session.
@@ -324,12 +324,12 @@ There are two properties that you should consider when you configure inbound cha
324
324
The following scenarios assume the starting state is an empty local directory:
325
325
326
326
* `max-messages-per-poll=2` and `max-fetch-size=1`: The adapter fetches one file, emits it, fetches the next file, emits it, and then sleeps until the next poll.
327
-
* `max-messages-per-poll=2` and `max-fetch-size=2`): The adapter fetches both files and then emits each one.
327
+
* `max-messages-per-poll=2` and `max-fetch-size=2`: The adapter fetches both files and then emits each one.
328
328
* `max-messages-per-poll=2` and `max-fetch-size=4`: The adapter fetches up to four files (if available) and emits the first two (if there are at least two).
329
329
The next two files are emitted on the next poll.
330
330
* `max-messages-per-poll=2` and `max-fetch-size` not specified: The adapter fetches all remote files and emits the first two (if there are at least two).
331
-
The subsequent files are emitted on subsequent polls (two at a time).
332
-
When all files are consumed, the remote fetch is attempted again, to pick up any new files.
331
+
The subsequent files are emitted on later polls (two at a time).
332
+
When all files are consumed, the remote fetch is attempted again to pick up any new files.
333
333
334
334
IMPORTANT: When you deploy multiple instances of an application, we recommend a small `max-fetch-size`, to avoid one instance "`grabbing`" all the files and starving other instances.
335
335
@@ -427,7 +427,7 @@ The supported commands are:
427
427
* `mget` (retrieve file(s))
428
428
* `rm` (remove file(s))
429
429
* `mv` (move/rename file)
430
-
* `put` (send file)
430
+
* `put` (send a file)
431
431
* `mput` (send multiple files)
432
432
433
433
[[using-the-ls-command]]
@@ -437,7 +437,7 @@ The supported commands are:
437
437
438
438
* `-1`: Retrieve a list of filenames.
439
439
The default is to retrieve a list of `FileInfo` objects
440
-
* `-a`: Include all files (including those starting with '.')
440
+
* `-a`: Include all files (including those starting with a `.`)
441
441
* `-f`: Do not sort the list
442
442
* `-dirs`: Include directories (excluded by default)
443
443
* `-links`: Include symbolic links (excluded by default)
@@ -533,10 +533,10 @@ If the transfer is ignored, the remote file is not deleted, because the `FileExi
533
533
534
534
The message payload resulting from an `mget` operation is a `List<File>` object (that is, a `List` of `File` objects, each representing a retrieved file).
535
535
536
-
IMPORTANT: If the `FileExistsMode` is `IGNORE`, the payload of the output message no longer contain files that were not fetched due to the file already existing.
536
+
IMPORTANT: If the `FileExistsMode` is `IGNORE`, the payload of the output message no longer contains files that were not fetched due to the file already existing.
537
537
Previously, the array contained all files, including those that already existed.
538
538
539
-
The expression you use determine the remote path should produce a result that ends with `*` for example `myfiles/*` fetches the complete tree under `myfiles`.
539
+
The expression you use determines the remote path should produce a result that ends with `\*` for example `myfiles/*` fetches the complete tree under `myfiles`.
540
540
541
541
You can use a recursive `MGET`, combined with the `FileExistsMode.REPLACE_IF_MODIFIED` mode, to periodically synchronize an entire remote directory tree locally.
542
542
This mode sets the local file's last modified timestamp to the remote file's timestamp, regardless of the `-P` (preserve timestamp) option.
@@ -662,7 +662,7 @@ It is particularly useful for mget (for example: `local-directory-expression="'/
662
662
This attribute is mutually exclusive with the `local-directory` attribute.
663
663
664
664
For all commands, the 'expression' property of the gateway holds the path on which the command acts.
665
-
For the `mget` command, the expression might evaluate to `*`, meaning to retrieve all files, `somedirectory/*`, and other values that end with `*`.
665
+
For the `mget` command, the expression might evaluate to `\*`, meaning to retrieve all files, `somedirectory/\*`, and other values that end with `*`.
666
666
667
667
The following example shows a gateway configured for an `ls` command:
668
668
@@ -679,7 +679,7 @@ The following example shows a gateway configured for an `ls` command:
679
679
680
680
The payload of the message sent to the `toSplitter` channel is a list of `String` objects, each of which contains the name of a file.
681
681
If you omitted `command-options="-1"`, the payload would be a list of `FileInfo` objects.
682
-
You can provide options as a space-delimited list (for example, `command-options="-1 -dirs -links"`).
682
+
You can provide options as a space-delimited list, for example, `command-options="-1 -dirs -links"`.
683
683
684
684
The `GET`, `MGET`, `PUT`, and `MPUT` commands support a `FileExistsMode` property (`mode` when using the namespace support).
685
685
This affects the behavior when the local file exists (`GET` and `MGET`) or the remote file exists (`PUT` and `MPUT`).
@@ -811,7 +811,7 @@ Its `cause` is another `PartialSuccessException` with `derivedInput` of `file2.t
811
811
[[smb-remote-file-info]]
812
812
== Remote File Information
813
813
814
-
The `SmbStreamingMessageSource` (xref:smb.adoc#smb-streaming-inbound[SMB Streaming Inbound Channel Adapter]), `SmbInboundFileSynchronizingMessageSource` (xref:smb.adoc#smb-inbound[SMB Inbound Channel Adapter]) and "read"-commands of the `SmbOutboundGateway` (xref:smb.adoc#smb-outbound-gateway[SMB Outbound Gateway]) provide additional headers in the message to produce with information about the remote file:
814
+
The `SmbStreamingMessageSource` (xref:smb.adoc#smb-streaming-inbound[SMB Streaming Inbound Channel Adapter]), `SmbInboundFileSynchronizingMessageSource` (xref:smb.adoc#smb-inbound[SMB Inbound Channel Adapter,]) and "read"-commands of the `SmbOutboundGateway` (xref:smb.adoc#smb-outbound-gateway[SMB Outbound Gateway]) provide additional headers in the message to produce with information about the remote file:
815
815
816
816
* `FileHeaders.REMOTE_HOST_PORT` - the host:port pair the remote session has been connected to during file transfer operation;
817
817
* `FileHeaders.REMOTE_DIRECTORY` - the remote directory the operation has been performed;
0 commit comments