Package io.micronaut.http.netty.channel
Interface EventLoopGroupFactory
-
- All Known Implementing Classes:
DefaultEventLoopGroupFactory,EpollEventLoopGroupFactory,KQueueEventLoopGroupFactory,NioEventLoopGroupFactory
public interface EventLoopGroupFactoryFactory for EventLoopGroup.- Since:
- 1.2.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNATIVEQualifier used to resolve the native factory.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.Class<? extends io.netty.channel.socket.SocketChannel>clientSocketChannelClass(EventLoopGroupConfiguration configuration)Returns the client channel class.default io.netty.channel.socket.SocketChannelclientSocketChannelInstance(EventLoopGroupConfiguration configuration)Returns the client channel class instance.default io.netty.channel.EventLoopGroupcreateEventLoopGroup(int threads, java.lang.Integer ioRatio)Creates an EventLoopGroup.io.netty.channel.EventLoopGroupcreateEventLoopGroup(int threads, java.util.concurrent.Executor executor, java.lang.Integer ioRatio)Creates an EventLoopGroup.io.netty.channel.EventLoopGroupcreateEventLoopGroup(int threads, java.util.concurrent.ThreadFactory threadFactory, java.lang.Integer ioRatio)Creates an EventLoopGroup.default io.netty.channel.EventLoopGroupcreateEventLoopGroup(EventLoopGroupConfiguration configuration, java.util.concurrent.ThreadFactory threadFactory)Create an event loop group for the given configuration and thread factory.default java.lang.Class<? extends io.netty.channel.unix.ServerDomainSocketChannel>domainServerSocketChannelClass()Returns the domain socket server channel class.default java.lang.Class<? extends io.netty.channel.unix.ServerDomainSocketChannel>domainServerSocketChannelClass(EventLoopGroupConfiguration configuration)Returns the domain socket server channel class.default io.netty.channel.ServerChanneldomainServerSocketChannelInstance(EventLoopGroupConfiguration configuration)Returns the domain socket server channel class.default booleanisNative()java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel>serverSocketChannelClass()Returns the server channel class.default java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel>serverSocketChannelClass(EventLoopGroupConfiguration configuration)Returns the server channel class.default io.netty.channel.socket.ServerSocketChannelserverSocketChannelInstance(EventLoopGroupConfiguration configuration)Returns the server channel class instance.
-
-
-
Field Detail
-
NATIVE
static final java.lang.String NATIVE
Qualifier used to resolve the native factory.- See Also:
- Constant Field Values
-
-
Method Detail
-
isNative
default boolean isNative()
- Returns:
- Is this a native factory.
-
createEventLoopGroup
io.netty.channel.EventLoopGroup createEventLoopGroup(int threads, java.util.concurrent.Executor executor, @Nullable java.lang.Integer ioRatio)Creates an EventLoopGroup.- Parameters:
threads- The number of threads to use.executor- An Executor.ioRatio- The io ratio.- Returns:
- An EventLoopGroup.
-
createEventLoopGroup
default io.netty.channel.EventLoopGroup createEventLoopGroup(EventLoopGroupConfiguration configuration, java.util.concurrent.ThreadFactory threadFactory)
Create an event loop group for the given configuration and thread factory.- Parameters:
configuration- The configurationthreadFactory- The thread factory- Returns:
- The event loop group
-
createEventLoopGroup
io.netty.channel.EventLoopGroup createEventLoopGroup(int threads, @Nullable java.util.concurrent.ThreadFactory threadFactory, @Nullable java.lang.Integer ioRatio)Creates an EventLoopGroup.- Parameters:
threads- The number of threads to use.threadFactory- The thread factory.ioRatio- The io ratio.- Returns:
- An EventLoopGroup.
-
createEventLoopGroup
default io.netty.channel.EventLoopGroup createEventLoopGroup(int threads, @Nullable java.lang.Integer ioRatio)Creates an EventLoopGroup.- Parameters:
threads- The number of threads to use.ioRatio- The io ratio.- Returns:
- An EventLoopGroup.
-
serverSocketChannelClass
@NonNull java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel> serverSocketChannelClass()
Returns the server channel class.- Returns:
- A ServerChannelClass.
-
domainServerSocketChannelClass
@NonNull default java.lang.Class<? extends io.netty.channel.unix.ServerDomainSocketChannel> domainServerSocketChannelClass() throws java.lang.UnsupportedOperationExceptionReturns the domain socket server channel class.- Returns:
- A ServerDomainSocketChannel class.
- Throws:
java.lang.UnsupportedOperationException- if domain sockets are not supported.
-
serverSocketChannelClass
@NonNull default java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel> serverSocketChannelClass(@Nullable EventLoopGroupConfiguration configuration)Returns the server channel class.- Parameters:
configuration- The configuration- Returns:
- A ServerSocketChannel class.
-
domainServerSocketChannelClass
@NonNull default java.lang.Class<? extends io.netty.channel.unix.ServerDomainSocketChannel> domainServerSocketChannelClass(@Nullable EventLoopGroupConfiguration configuration)Returns the domain socket server channel class.- Parameters:
configuration- The configuration- Returns:
- A ServerDomainSocketChannel implementation.
- Throws:
java.lang.UnsupportedOperationException- if domain sockets are not supported.
-
serverSocketChannelInstance
@NonNull default io.netty.channel.socket.ServerSocketChannel serverSocketChannelInstance(@Nullable EventLoopGroupConfiguration configuration)Returns the server channel class instance.- Parameters:
configuration- The configuration- Returns:
- A ServerSocketChannel instance.
-
domainServerSocketChannelInstance
@NonNull default io.netty.channel.ServerChannel domainServerSocketChannelInstance(@Nullable EventLoopGroupConfiguration configuration)Returns the domain socket server channel class.- Parameters:
configuration- The configuration- Returns:
- A ServerDomainSocketChannel implementation.
- Throws:
java.lang.UnsupportedOperationException- if domain sockets are not supported.
-
clientSocketChannelClass
@NonNull java.lang.Class<? extends io.netty.channel.socket.SocketChannel> clientSocketChannelClass(@Nullable EventLoopGroupConfiguration configuration)Returns the client channel class.- Parameters:
configuration- The configuration- Returns:
- A SocketChannel class.
-
clientSocketChannelInstance
@NonNull default io.netty.channel.socket.SocketChannel clientSocketChannelInstance(@Nullable EventLoopGroupConfiguration configuration)Returns the client channel class instance.- Parameters:
configuration- The configuration- Returns:
- A SocketChannel instance.
-
-