[#5712] Allow clients to override userDefinedWritabilityIndex from 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.
This commit is contained in:
Norman Maurer 2016-09-02 07:55:50 +02:00
parent 4af6855695
commit 147d427adc
2 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ public abstract class AbstractTrafficShapingHandler extends ChannelDuplexHandler
* for GlobalChannel TSH it is defined as
* {@value #GLOBALCHANNEL_DEFAULT_USER_DEFINED_WRITABILITY_INDEX}.
*/
int userDefinedWritabilityIndex() {
protected int userDefinedWritabilityIndex() {
if (this instanceof GlobalChannelTrafficShapingHandler) {
return GLOBALCHANNEL_DEFAULT_USER_DEFINED_WRITABILITY_INDEX;
} else if (this instanceof GlobalTrafficShapingHandler) {

View File

@ -156,7 +156,7 @@ public class GlobalChannelTrafficShapingHandler extends AbstractTrafficShapingHa
}
@Override
int userDefinedWritabilityIndex() {
protected int userDefinedWritabilityIndex() {
return AbstractTrafficShapingHandler.GLOBALCHANNEL_DEFAULT_USER_DEFINED_WRITABILITY_INDEX;
}