Skip to content
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

Allow clients to override userDefinedWritabilityIndex from AbstractTrafficShapingHandler #5712

Closed
jqmichael opened this issue Aug 16, 2016 · 5 comments
Assignees
Milestone

Comments

@jqmichael
Copy link

Hello,

AbstractTrafficShapingHandler has a package-private method called "userDefinedWritabilityIndex()". If I create two sub-classes of ChannelTrafficShapingHandler (one for throttling on bandwidth and the other for throttling on message size), I cannot make them independent from each other in terms of writability, because they will all have the same index as ChannelTrafficShapingHandler, which cannot be overridden.

Can we change the access of userDefinedWritabilityIndex() to protected such that it can be overridden by clients?

Thanks

Michael

@Scottmitch
Copy link
Member

/cc @fredericBregier

@normanmaurer normanmaurer self-assigned this Sep 2, 2016
@normanmaurer normanmaurer added this to the 4.0.42.Final milestone Sep 2, 2016
@normanmaurer
Copy link
Member

Let me take care

normanmaurer added a commit that referenced this issue Sep 2, 2016
…stractTrafficShapingHandler

Motivation:

AbstractTrafficShapingHandler has a package-private method called "userDefinedWritabilityIndex()" which a user may need to override if two sub-classes wants to be used in the ChannelPipeline.

Modifications:

Mark method protected.

Result:

Easier to extend AbstractTrafficShapingHandler.
@fredericBregier
Copy link
Member

@normanmaurer Sorry to be late again (very busy those last 9 months). I look at your commit, fine for me.

normanmaurer added a commit that referenced this issue Sep 5, 2016
…stractTrafficShapingHandler

Motivation:

AbstractTrafficShapingHandler has a package-private method called "userDefinedWritabilityIndex()" which a user may need to override if two sub-classes wants to be used in the ChannelPipeline.

Modifications:

Mark method protected.

Result:

Easier to extend AbstractTrafficShapingHandler.
normanmaurer added a commit that referenced this issue Sep 5, 2016
…stractTrafficShapingHandler

Motivation:

AbstractTrafficShapingHandler has a package-private method called "userDefinedWritabilityIndex()" which a user may need to override if two sub-classes wants to be used in the ChannelPipeline.

Modifications:

Mark method protected.

Result:

Easier to extend AbstractTrafficShapingHandler.
@normanmaurer
Copy link
Member

Fixed by #5791

@jqmichael
Copy link
Author

Thanks guys! I could've sent you a poll request but wasn't sure if this is the right design.

liuzhengyang pushed a commit to liuzhengyang/netty that referenced this issue Sep 10, 2017
…om AbstractTrafficShapingHandler

Motivation:

AbstractTrafficShapingHandler has a package-private method called "userDefinedWritabilityIndex()" which a user may need to override if two sub-classes wants to be used in the ChannelPipeline.

Modifications:

Mark method protected.

Result:

Easier to extend AbstractTrafficShapingHandler.
pulllock pushed a commit to pulllock/netty that referenced this issue Oct 19, 2023
…om AbstractTrafficShapingHandler

Motivation:

AbstractTrafficShapingHandler has a package-private method called "userDefinedWritabilityIndex()" which a user may need to override if two sub-classes wants to be used in the ChannelPipeline.

Modifications:

Mark method protected.

Result:

Easier to extend AbstractTrafficShapingHandler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants