|
1 | 1 | /*
|
2 |
| - * Copyright 2006-2018 the original author or authors. |
| 2 | + * Copyright 2006-2020 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
20 | 20 | import org.springframework.lang.Nullable;
|
21 | 21 |
|
22 | 22 | /**
|
23 |
| - * Interface for item transformation. Given an item as input, this interface provides |
| 23 | + * Interface for item transformation. Given an item as input, this interface provides |
24 | 24 | * an extension point which allows for the application of business logic in an item
|
25 |
| - * oriented processing scenario. It should be noted that while it's possible to return |
26 |
| - * a different type than the one provided, it's not strictly necessary. Furthermore, |
27 |
| - * returning null indicates that the item should not be continued to be processed. |
| 25 | + * oriented processing scenario. It should be noted that while it's possible to return |
| 26 | + * a different type than the one provided, it's not strictly necessary. Furthermore, |
| 27 | + * returning {@code null} indicates that the item should not be continued to be processed. |
28 | 28 | *
|
29 | 29 | * @author Robert Kasanicky
|
30 | 30 | * @author Dave Syer
|
31 | 31 | * @author Mahmoud Ben Hassine
|
| 32 | + * |
| 33 | + * @param <I> type of input item |
| 34 | + * @param <O> type of output item |
32 | 35 | */
|
33 | 36 | public interface ItemProcessor<I, O> {
|
34 | 37 |
|
35 | 38 | /**
|
36 | 39 | * Process the provided item, returning a potentially modified or new item for continued
|
37 |
| - * processing. If the returned result is null, it is assumed that processing of the item |
| 40 | + * processing. If the returned result is {@code null}, it is assumed that processing of the item |
38 | 41 | * should not continue.
|
39 | 42 | *
|
40 |
| - * @param item to be processed. A {@code null} will never reach this method because the only possible sources |
41 |
| - * are ItemReader (which indicates no more items) and ItemProcessor (which indicates a filtered item). |
| 43 | + * A {@code null} item will never reach this method because the only possible sources are: |
| 44 | + * <ul> |
| 45 | + * <li>an {@link ItemReader} (which indicates no more items)</li> |
| 46 | + * <li>a previous {@link ItemProcessor} in a composite processor (which indicates a filtered item)</li> |
| 47 | + * </ul> |
| 48 | + * |
| 49 | + * @param item to be processed, never {@code null}. |
42 | 50 | * @return potentially modified or new item for continued processing, {@code null} if processing of the
|
43 | 51 | * provided item should not continue.
|
44 |
| - * |
45 | 52 | * @throws Exception thrown if exception occurs during processing.
|
46 | 53 | */
|
47 | 54 | @Nullable
|
|
0 commit comments