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:
Scott Mitchell 2015-09-02 10:39:36 -07:00
parent 50d1f0a680
commit 983920f25f

View File

@ -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);