-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datagram drop callback #2100
Datagram drop callback #2100
Conversation
@@ -1969,7 +2004,7 @@ public void run() { | |||
* @since 3.5 | |||
*/ | |||
@NoPublicAPI | |||
protected boolean executeInbound(Executor executor, InetSocketAddress peer, LimitedRunnable job) { | |||
protected boolean executeInbound(Executor executor, InetSocketAddress peer, LimitedRunnable job, Runnable onError) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, extending LimitedRunnable
with an onError(RejectedExecutionException ex)
callback is an alternative to a second Runnable
.
Or pass in the Record
instead of the second Runnable
@@ -0,0 +1,40 @@ | |||
/******************************************************************************* | |||
* Copyright (c) 2022 Bosch.IO GmbH and others. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you an employee of Bosch.IO?
If not, please edit this according license_header_template.txt. if this is your own work not belonging to an employer, then just use your name.
There is also a pending PR #2097 . If you like, you may chose also that. I plan to replace all header when start to work in the 4.0.
Thanks a lot! I would like to spend some time in testing it. |
I see two more candidates, |
/** | ||
* Handles {@code RejectedExecutionException} | ||
* @param ex the thrown exception | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some polishing, please add
@since 3.8
|
||
/** | ||
* Extension of DatagramFilter | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some polishing, please add a "." at the end of the first sentence and a
@since 3.8
Thank you for noticing |
LGTM |
I missed to ask for squashing. |
Discussion ref: #2099
I'd like to introduce injectable action on datagram/record drop with access to dropped object. As discussed in the issue two methods were prepared to be added to
DatagramFilter
.