@@ -51,19 +51,19 @@ public class ChunkMessageChannelItemWriter<T>
51
51
52
52
static final String EXPECTED = ChunkMessageChannelItemWriter .class .getName () + ".EXPECTED" ;
53
53
54
- private static final long DEFAULT_THROTTLE_LIMIT = 6 ;
54
+ protected static final long DEFAULT_THROTTLE_LIMIT = 6 ;
55
55
56
- private MessagingTemplate messagingGateway ;
56
+ protected MessagingTemplate messagingGateway ;
57
57
58
- private final LocalState localState = new LocalState ();
58
+ protected final LocalState localState = new LocalState ();
59
59
60
- private long throttleLimit = DEFAULT_THROTTLE_LIMIT ;
60
+ protected long throttleLimit = DEFAULT_THROTTLE_LIMIT ;
61
61
62
- private final int DEFAULT_MAX_WAIT_TIMEOUTS = 40 ;
62
+ protected final int DEFAULT_MAX_WAIT_TIMEOUTS = 40 ;
63
63
64
- private int maxWaitTimeouts = DEFAULT_MAX_WAIT_TIMEOUTS ;
64
+ protected int maxWaitTimeouts = DEFAULT_MAX_WAIT_TIMEOUTS ;
65
65
66
- private PollableChannel replyChannel ;
66
+ protected PollableChannel replyChannel ;
67
67
68
68
/**
69
69
* The maximum number of times to wait at the end of a step for a non-null result from
@@ -189,7 +189,7 @@ public Collection<StepContribution> getStepContributions() {
189
189
* Wait until all the results that are in the pipeline come back to the reply channel.
190
190
* @return true if successfully received a result, false if timed out
191
191
*/
192
- private boolean waitForResults () throws AsynchronousFailureException {
192
+ protected boolean waitForResults () throws AsynchronousFailureException {
193
193
int count = 0 ;
194
194
int maxCount = maxWaitTimeouts ;
195
195
Throwable failure = null ;
@@ -221,7 +221,7 @@ private boolean waitForResults() throws AsynchronousFailureException {
221
221
* (maybe we are sharing a channel and we shouldn't be)
222
222
*/
223
223
@ SuppressWarnings ("unchecked" )
224
- private void getNextResult () throws AsynchronousFailureException {
224
+ protected void getNextResult () throws AsynchronousFailureException {
225
225
Message <ChunkResponse > message = (Message <ChunkResponse >) messagingGateway .receive (replyChannel );
226
226
if (message != null ) {
227
227
ChunkResponse payload = message .getPayload ();
@@ -254,7 +254,7 @@ private void getNextResult() throws AsynchronousFailureException {
254
254
* Re-throws the original throwable if it is unchecked, wraps checked exceptions into
255
255
* {@link AsynchronousFailureException}.
256
256
*/
257
- private static AsynchronousFailureException wrapIfNecessary (Throwable throwable ) {
257
+ protected static AsynchronousFailureException wrapIfNecessary (Throwable throwable ) {
258
258
if (throwable instanceof Error ) {
259
259
throw (Error ) throwable ;
260
260
}
@@ -266,7 +266,7 @@ else if (throwable instanceof AsynchronousFailureException) {
266
266
}
267
267
}
268
268
269
- private static class LocalState {
269
+ protected static class LocalState {
270
270
271
271
private final AtomicInteger current = new AtomicInteger (-1 );
272
272
0 commit comments