Package com.gmt2001.dns
Class EventLoopDetector
java.lang.Object
com.gmt2001.dns.EventLoopDetector
Detects if an operating system specific
EventLoopGroup is available- Author:
- gmt2001
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanIndicates ifEpoll, the LinuxEventLoopGroup, is availablestatic final booleanIndicates ifKQueue, the macOSEventLoopGroup, is available -
Method Summary
Modifier and TypeMethodDescriptionstatic EventLoopGroupIf an operating system specificEventLoopGroupis available, returns a new instance of itReturns the class which should be used forChannel, associated with theEventLoopGroupstatic Class<? extends ServerChannel>Returns the class which should be used forServerChannel, associated with theEventLoopGroup
-
Field Details
-
ISEPOLLAVAILABLE
public static final boolean ISEPOLLAVAILABLEIndicates ifEpoll, the LinuxEventLoopGroup, is available -
ISKQUEUEAVAILABLE
public static final boolean ISKQUEUEAVAILABLEIndicates ifKQueue, the macOSEventLoopGroup, is available
-
-
Method Details
-
createEventLoopGroup
If an operating system specificEventLoopGroupis available, returns a new instance of itOtherwise, returns an instance of
NioEventLoopGroup- Returns:
- the
EventLoopGroup
-
getServerChannelClass
Returns the class which should be used forServerChannel, associated with theEventLoopGroup- Returns:
- the server channel class
-
getChannelClass
Returns the class which should be used forChannel, associated with theEventLoopGroup- Returns:
- the channel class
-