In ChannelOutboundInvoker we have for each operations two versions. One which just return a new ChannelFuture and the other which takes a ChannelFuture and returns one.
I think we can improve this out of two reasons:
- Return a ChannelFuture when you actual pass in a ChannelFuture which should be notified once the operation is complete is kind of confusing and also redundant. I see no real benefit of doing so, at worst it confuse the user.
- If we would just return the ChannelOutboundInvoker by itself we could support method-chaing to make it more user friendly.
So I propose to change the signature for all methods like mention above.
Example:
public interface ChannelOutboundInvoker {
ChannelFuture bind(SocketAddress localAddress);
....
ChannelOutboundInvoker bind(SocketAddress localAddress, ChannelFuture future);
I think this also make the contract more explicit.
@trustin WDYT ?
In ChannelOutboundInvoker we have for each operations two versions. One which just return a new ChannelFuture and the other which takes a ChannelFuture and returns one.
I think we can improve this out of two reasons:
So I propose to change the signature for all methods like mention above.
Example:
I think this also make the contract more explicit.
@trustin WDYT ?