Let ChannelGroupFuture.addListener(..) return itself to make consistent with ChannelFuture
This commit is contained in:
parent
539418ecac
commit
38ee575839
@ -166,7 +166,7 @@ public interface ChannelGroupFuture extends Iterable<ChannelFuture> {
|
|||||||
* {@linkplain #isDone() done}. If this future is already
|
* {@linkplain #isDone() done}. If this future is already
|
||||||
* completed, the specified listener is notified immediately.
|
* completed, the specified listener is notified immediately.
|
||||||
*/
|
*/
|
||||||
void addListener(ChannelGroupFutureListener listener);
|
ChannelGroupFuture addListener(ChannelGroupFutureListener listener);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the specified listener from this future.
|
* Removes the specified listener from this future.
|
||||||
@ -175,7 +175,7 @@ public interface ChannelGroupFuture extends Iterable<ChannelFuture> {
|
|||||||
* future is already completed, this method has no effect
|
* future is already completed, this method has no effect
|
||||||
* and returns silently.
|
* and returns silently.
|
||||||
*/
|
*/
|
||||||
void removeListener(ChannelGroupFutureListener listener);
|
ChannelGroupFuture removeListener(ChannelGroupFutureListener listener);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Waits for this future to be completed.
|
* Waits for this future to be completed.
|
||||||
|
@ -161,7 +161,7 @@ public class DefaultChannelGroupFuture implements ChannelGroupFuture {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addListener(ChannelGroupFutureListener listener) {
|
public ChannelGroupFuture addListener(ChannelGroupFutureListener listener) {
|
||||||
if (listener == null) {
|
if (listener == null) {
|
||||||
throw new NullPointerException("listener");
|
throw new NullPointerException("listener");
|
||||||
}
|
}
|
||||||
@ -185,10 +185,11 @@ public class DefaultChannelGroupFuture implements ChannelGroupFuture {
|
|||||||
if (notifyNow) {
|
if (notifyNow) {
|
||||||
notifyListener(listener);
|
notifyListener(listener);
|
||||||
}
|
}
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeListener(ChannelGroupFutureListener listener) {
|
public ChannelGroupFuture removeListener(ChannelGroupFutureListener listener) {
|
||||||
if (listener == null) {
|
if (listener == null) {
|
||||||
throw new NullPointerException("listener");
|
throw new NullPointerException("listener");
|
||||||
}
|
}
|
||||||
@ -206,6 +207,7 @@ public class DefaultChannelGroupFuture implements ChannelGroupFuture {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user