RecvByteBufAllocator.DelegatingHandle accessor
Motivation: RecvByteBufAllocator.DelegatingHandle does not provide an accessor to get the delegate handle. This may be useful for classes that extend DelegatingHandle. Modifications: - add delegate() method to DelegatingHandle Result: Classes which inherit from DelegatingHandle can now access the delegate Handle.
This commit is contained in:
parent
50d1f0a680
commit
983920f25f
@ -113,6 +113,14 @@ public interface RecvByteBufAllocator {
|
||||
this.delegate = checkNotNull(delegate, "delegate");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the {@link Handle} which all methods will be delegated to.
|
||||
* @return the {@link Handle} which all methods will be delegated to.
|
||||
*/
|
||||
protected final Handle delegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteBuf allocate(ByteBufAllocator alloc) {
|
||||
return delegate.allocate(alloc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user