Closed
Milestone
Description
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 ?
Activity
trustin commentedon Dec 15, 2012
Does it really worth? I haven't seen a case where a user would do method
chaining such as doing I/O consecutively. Rather I find returning a
ChannelFuture more useful because I might want to add listeners after
invoking outbound operation.
On Dec 15, 2012 12:57 AM, "Norman Maurer" [email protected] wrote:
normanmaurer commentedon Dec 15, 2012
Hm... You may be right. I think we should make it clear that the same ChannelFuture will be returned as passed in.
Sent from my iPhone. Excuse any typos....
Am 15.12.2012 um 03:10 schrieb Trustin Lee [email protected]:
normanmaurer commentedon Dec 17, 2012
@trustin is right... let us close it as won't fix
Update to latest BoringSSL commit sha (#820)