Possibility of firing user event in outbound direction. #4378
+97
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently my test fail half-way through, but I don't think it's the issue with the changes. it says:
Motivation:
In a proxy application it is desirable to propagate a user event
backward, from proxy destination end-point to client end-point.
Currently the only way is to set a List attribute on
channel context and pass event object to them however benefits of
Netty's event firing (easy access to proper context, exception
handling, ...) is lost.
Modifications:
Very similar to fireUserEventTriggered() and userEventTriggered(), two
method fireUserEventTriggeredOutbound() and userEventTriggeredOutbound()
were added. in the channel handler context implementation instead of
next handler, previous handler is found and called.
Result:
It's possible to send a user event from end of pipeline to the beginning
of it. However the changes are backward-incompatible and direct implementations
of ChannelHandler and ChannelHandlerContext need to implement the
methods.