static Class < ? extends DatagramChannel > getDatagramChannelClass ( final EventLoopGroup eventLoopGroup ) { Objects . requireNonNull ( eventLoopGroup ) ; final String datagramChannelClassName = DATAGRAM_CHANNEL_CLASSES . get ( eventLoopGroup . getClass ( ) . getName ( ) ) ; if ( datagramChannelClassName == null ) { throw new IllegalArgumentException ( "No datagram channel class found for event loop group type: " + eventLoopGroup . getClass ( ) . getName ( ) ) ; } try { return Class . forName ( datagramChannelClassName ) . asSubclass ( DatagramChannel . class ) ; } catch ( final ClassNotFoundException e ) { throw new IllegalArgumentException ( e ) ; } }
Returns a datagram channel class suitable for specified event loop group .