public interface EventLoopResources
Interface to encapsulate EventLoopGroup resources.
- Since:
- 6.0
- Author:
- Mark Paluch, Yohei Ueki
-
Method Summary
Modifier and Type Method Description Class<? extends DatagramChannel>datagramChannelClass()Class<? extends Channel>domainSocketChannelClass()Class<? extends EventLoopGroup>eventLoopGroupClass()booleanmatches(Class<? extends EventExecutorGroup> type)Checks if the giventypematches the underlyingEventExecutorGrouptype.EventLoopGroupnewEventLoopGroup(int nThreads, ThreadFactory threadFactory)Create a newEpollEventLoopGroup.SocketAddressnewSocketAddress(String socketPath)Class<? extends Channel>socketChannelClass()
-
Method Details
-
matches
Checks if the giventypematches the underlyingEventExecutorGrouptype.- Parameters:
type- must not benull.- Returns:
trueiftypeis aEventExecutorGroupof the underlying loop resources.
-
eventLoopGroupClass
Class<? extends EventLoopGroup> eventLoopGroupClass()- Returns:
- the
EventLoopGroupclass.
-
newEventLoopGroup
Create a newEpollEventLoopGroup.- Parameters:
nThreads- number of threads.threadFactory- theThreadFactory.- Returns:
- the
EventLoopGroup.
-
socketChannelClass
- Returns:
- the
Channelclass.
-
domainSocketChannelClass
- Returns:
- the Domain Socket
Channelclass.
-
datagramChannelClass
Class<? extends DatagramChannel> datagramChannelClass()- Returns:
- the
DatagramChannelclass. - Since:
- 6.1
-
newSocketAddress
- Parameters:
socketPath- the socket file path.- Returns:
- a domain socket address object.
-