Skip to content
Merged
Changes from 1 commit
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,10 @@
public final class ForwardingDisabledProcessorContext implements ProcessorContext {
private final ProcessorContext delegate;

private String explanation = "ProcessorContext#forward() is not supported from this context, "
Comment thread
astubbs marked this conversation as resolved.
Outdated
+ "as the framework must ensure the key is not changed (#forward allows changing the key on "
+ "messages which are sent). Try plain other functions which don't allow the key to be changed.";

public ForwardingDisabledProcessorContext(final ProcessorContext delegate) {
this.delegate = Objects.requireNonNull(delegate, "delegate");
}
Expand Down Expand Up @@ -102,24 +106,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