Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
public final class ForwardingDisabledProcessorContext implements ProcessorContext {
private final ProcessorContext delegate;

private static final String EXPLANATION = "ProcessorContext#forward() is not supported from this context, "
+ "as the framework must ensure the key is not changed (#forward allows changing the key on "
+ "messages which are sent). Try another function, which doesn't allow the key to be changed "
+ "(for example - #tranformValues).";

public ForwardingDisabledProcessorContext(final ProcessorContext delegate) {
this.delegate = Objects.requireNonNull(delegate, "delegate");
}
Expand Down Expand Up @@ -102,24 +107,24 @@ public Cancellable schedule(final Duration interval,

@Override
public <K, V> void forward(final K key, final V value) {
throw new StreamsException("ProcessorContext#forward() not supported.");
throw new StreamsException(EXPLANATION);
}

@Override
public <K, V> void forward(final K key, final V value, final To to) {
throw new StreamsException("ProcessorContext#forward() not supported.");
throw new StreamsException(EXPLANATION);
}

@Override
@Deprecated
public <K, V> void forward(final K key, final V value, final int childIndex) {
throw new StreamsException("ProcessorContext#forward() not supported.");
throw new StreamsException(EXPLANATION);
}

@Override
@Deprecated
public <K, V> void forward(final K key, final V value, final String childName) {
throw new StreamsException("ProcessorContext#forward() not supported.");
throw new StreamsException(EXPLANATION);
}

@Override
Expand Down