@Override
    @Deprecated
    public int getMaxMessagesPerRead() {
        try {
            MaxMessagesRecvByteBufAllocator allocator = getRecvByteBufAllocator();
            return allocator.maxMessagesPerRead();
        } catch (ClassCastException e) {
            throw new IllegalStateException("getRecvByteBufAllocator() must return an object of type " +
                    "MaxMessagesRecvByteBufAllocator", e);
        }
    }
@ Override @ Deprecated public int getMaxMessagesPerRead ( ) { try { MaxMessagesRecvByteBufAllocator allocator = getRecvByteBufAllocator ( ) ; return allocator . maxMessagesPerRead ( ) ; } catch ( ClassCastException e ) { throw new IllegalStateException ( "getRecvByteBufAllocator() must return an object of type " + "MaxMessagesRecvByteBufAllocator" , e ) ; } }
{@inheritDoc}
<p>
@throws IllegalStateException if {@link #getRecvByteBufAllocator()} does not return an object of type
{@link MaxMessagesRecvByteBufAllocator}.