Package io.micronaut.http.netty
Class AbstractCompositeCustomizer<C,R>
java.lang.Object
io.micronaut.http.netty.AbstractCompositeCustomizer<C,R>
- Type Parameters:
C
- The actual customizer class. Must also be implemented by theAbstractCompositeCustomizer
subclass.R
- The ChannelRole type.
Base class for the composite customizers for the client and server. The APIs are structured
quite similarly, but it doesn't make sense to merge them because writing generic code for them
does not make sense, so this class exists to at least merge the composition behavior (ordering
and such).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add customizer.protected final void
protected abstract C
makeNewComposite
(List<C> members) protected final C
specialize
(UnaryOperator<C> specializeAction) Specialize all members with the given action.final C
specializeForChannel
(@NonNull io.netty.channel.Channel channel, R role) protected abstract C
specializeForChannel
(C member, io.netty.channel.Channel channel, R role)
-
Constructor Details
-
AbstractCompositeCustomizer
-
AbstractCompositeCustomizer
protected AbstractCompositeCustomizer()
-
-
Method Details
-
add
Add customizer.- Parameters:
customizer
- Customizer
-
specializeForChannel
-
makeNewComposite
-
specializeForChannel
-
specialize
Specialize all members with the given action.- Parameters:
specializeAction
- The specialization action. Input is the old member customizer, output is the new member customizer.- Returns:
- The specialized composite customizer
-
forEach
-