Package io.micronaut.http.netty.channel
Interface EventLoopGroupFactory
- All Known Implementing Classes:
DefaultEventLoopGroupFactory
,EpollEventLoopGroupFactory
,IoUringEventLoopGroupFactory
,KQueueEventLoopGroupFactory
,NioEventLoopGroupFactory
public interface EventLoopGroupFactory
Factory for EventLoopGroup.
- Since:
- 1.2.0
- Author:
- croudet, graemerocher
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionchannelClass
(NettyChannelType type) Returns the domain socket server channel class.channelClass
(NettyChannelType type, @Nullable EventLoopGroupConfiguration configuration) Returns the domain socket server channel class.default @NonNull io.netty.channel.Channel
channelInstance
(NettyChannelType type, @Nullable EventLoopGroupConfiguration configuration) Returns the domain socket server channel class.default @NonNull io.netty.channel.Channel
channelInstance
(NettyChannelType type, @Nullable EventLoopGroupConfiguration configuration, int fd) Deprecated.default @NonNull io.netty.channel.Channel
channelInstance
(NettyChannelType type, @Nullable EventLoopGroupConfiguration configuration, @Nullable io.netty.channel.Channel parent, int fd) Returns the channel instance.clientSocketChannelClass
(@Nullable EventLoopGroupConfiguration configuration) Deprecated, for removal: This API element is subject to removal in a future version.default @NonNull io.netty.channel.socket.SocketChannel
clientSocketChannelInstance
(@Nullable EventLoopGroupConfiguration configuration) Deprecated, for removal: This API element is subject to removal in a future version.default io.netty.channel.EventLoopGroup
createEventLoopGroup
(int threads, @Nullable Integer ioRatio) Creates an EventLoopGroup.io.netty.channel.EventLoopGroup
createEventLoopGroup
(int threads, @Nullable ThreadFactory threadFactory, @Nullable Integer ioRatio) Creates an EventLoopGroup.io.netty.channel.EventLoopGroup
createEventLoopGroup
(int threads, Executor executor, @Nullable Integer ioRatio) Creates an EventLoopGroup.default io.netty.channel.EventLoopGroup
createEventLoopGroup
(EventLoopGroupConfiguration configuration, ThreadFactory threadFactory) Create an event loop group for the given configuration and thread factory.Deprecated, for removal: This API element is subject to removal in a future version.UsechannelClass(NettyChannelType)
insteaddomainServerSocketChannelClass
(@Nullable EventLoopGroupConfiguration configuration) Deprecated, for removal: This API element is subject to removal in a future version.default @NonNull io.netty.channel.ServerChannel
Deprecated, for removal: This API element is subject to removal in a future version.default boolean
isNative()
Deprecated, for removal: This API element is subject to removal in a future version.UsechannelClass(NettyChannelType)
insteadserverSocketChannelClass
(@Nullable EventLoopGroupConfiguration configuration) Deprecated, for removal: This API element is subject to removal in a future version.default @NonNull io.netty.channel.socket.ServerSocketChannel
serverSocketChannelInstance
(@Nullable EventLoopGroupConfiguration configuration) Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
NATIVE
Qualifier used to resolve the native factory.- See Also:
-
-
Method Details
-
isNative
default boolean isNative()- Returns:
- Is this a native factory.
-
createEventLoopGroup
io.netty.channel.EventLoopGroup createEventLoopGroup(int threads, Executor executor, @Nullable @Nullable 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, 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 @Nullable ThreadFactory threadFactory, @Nullable @Nullable 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 @Nullable Integer ioRatio) Creates an EventLoopGroup.- Parameters:
threads
- The number of threads to use.ioRatio
- The io ratio.- Returns:
- An EventLoopGroup.
-
serverSocketChannelClass
@Deprecated(since="4.5.0", forRemoval=true) @NonNull default @NonNull Class<? extends io.netty.channel.socket.ServerSocketChannel> serverSocketChannelClass()Deprecated, for removal: This API element is subject to removal in a future version.UsechannelClass(NettyChannelType)
insteadReturns the server channel class.- Returns:
- A ServerChannelClass.
-
domainServerSocketChannelClass
@NonNull @Deprecated(since="4.5.0", forRemoval=true) default @NonNull Class<? extends io.netty.channel.unix.ServerDomainSocketChannel> domainServerSocketChannelClass() throws UnsupportedOperationExceptionDeprecated, for removal: This API element is subject to removal in a future version.UsechannelClass(NettyChannelType)
insteadReturns the domain socket server channel class.- Returns:
- A ServerDomainSocketChannel class.
- Throws:
UnsupportedOperationException
- if domain sockets are not supported.
-
channelClass
@NonNull default @NonNull Class<? extends io.netty.channel.Channel> channelClass(NettyChannelType type) throws UnsupportedOperationException Returns the domain socket server channel class.- Parameters:
type
- Type of the channel to return- Returns:
- A channel class.
- Throws:
UnsupportedOperationException
- if domain sockets are not supported.
-
serverSocketChannelClass
@Deprecated(since="4.5.0", forRemoval=true) @NonNull default @NonNull Class<? extends io.netty.channel.socket.ServerSocketChannel> serverSocketChannelClass(@Nullable @Nullable EventLoopGroupConfiguration configuration) Deprecated, for removal: This API element is subject to removal in a future version.Returns the server channel class.- Parameters:
configuration
- The configuration- Returns:
- A ServerSocketChannel class.
-
domainServerSocketChannelClass
@Deprecated(since="4.5.0", forRemoval=true) @NonNull default @NonNull Class<? extends io.netty.channel.unix.ServerDomainSocketChannel> domainServerSocketChannelClass(@Nullable @Nullable EventLoopGroupConfiguration configuration) Deprecated, for removal: This API element is subject to removal in a future version.Returns the domain socket server channel class.- Parameters:
configuration
- The configuration- Returns:
- A ServerDomainSocketChannel implementation.
- Throws:
UnsupportedOperationException
- if domain sockets are not supported.
-
channelClass
@NonNull default @NonNull Class<? extends io.netty.channel.Channel> channelClass(NettyChannelType type, @Nullable @Nullable EventLoopGroupConfiguration configuration) Returns the domain socket server channel class.- Parameters:
type
- Type of the channel to returnconfiguration
- The configuration- Returns:
- A channel implementation.
- Throws:
UnsupportedOperationException
- if domain sockets are not supported.
-
serverSocketChannelInstance
@Deprecated(since="4.5.0", forRemoval=true) @NonNull default @NonNull io.netty.channel.socket.ServerSocketChannel serverSocketChannelInstance(@Nullable @Nullable EventLoopGroupConfiguration configuration) Deprecated, for removal: This API element is subject to removal in a future version.Returns the server channel class instance.- Parameters:
configuration
- The configuration- Returns:
- A ServerSocketChannel instance.
-
domainServerSocketChannelInstance
@Deprecated(since="4.5.0", forRemoval=true) @NonNull default @NonNull io.netty.channel.ServerChannel domainServerSocketChannelInstance(@Nullable @Nullable EventLoopGroupConfiguration configuration) Deprecated, for removal: This API element is subject to removal in a future version.Returns the domain socket server channel class.- Parameters:
configuration
- The configuration- Returns:
- A ServerDomainSocketChannel implementation.
- Throws:
UnsupportedOperationException
- if domain sockets are not supported.
-
channelInstance
@NonNull default @NonNull io.netty.channel.Channel channelInstance(NettyChannelType type, @Nullable @Nullable EventLoopGroupConfiguration configuration) Returns the domain socket server channel class.- Parameters:
type
- Type of the channel to returnconfiguration
- The configuration- Returns:
- A ServerDomainSocketChannel implementation.
- Throws:
UnsupportedOperationException
- if domain sockets are not supported.
-
channelInstance
@Deprecated(since="4.4.0") @NonNull default @NonNull io.netty.channel.Channel channelInstance(NettyChannelType type, @Nullable @Nullable EventLoopGroupConfiguration configuration, int fd) Deprecated.Returns the channel instance.- Parameters:
type
- Type of the channel to returnconfiguration
- The configurationfd
- The pre-defined file descriptor- Returns:
- A channel implementation.
- Throws:
UnsupportedOperationException
- if domain sockets are not supported.
-
channelInstance
@NonNull default @NonNull io.netty.channel.Channel channelInstance(NettyChannelType type, @Nullable @Nullable EventLoopGroupConfiguration configuration, @Nullable @Nullable io.netty.channel.Channel parent, int fd) Returns the channel instance.- Parameters:
type
- Type of the channel to returnconfiguration
- The configurationparent
- Theparent channel
fd
- The pre-defined file descriptor- Returns:
- A channel implementation.
- Throws:
UnsupportedOperationException
- if domain sockets are not supported.
-
clientSocketChannelClass
@Deprecated(since="4.5.0", forRemoval=true) @NonNull default @NonNull Class<? extends io.netty.channel.socket.SocketChannel> clientSocketChannelClass(@Nullable @Nullable EventLoopGroupConfiguration configuration) Deprecated, for removal: This API element is subject to removal in a future version.Returns the client channel class.- Parameters:
configuration
- The configuration- Returns:
- A SocketChannel class.
-
clientSocketChannelInstance
@Deprecated(since="4.5.0", forRemoval=true) @NonNull default @NonNull io.netty.channel.socket.SocketChannel clientSocketChannelInstance(@Nullable @Nullable EventLoopGroupConfiguration configuration) Deprecated, for removal: This API element is subject to removal in a future version.Returns the client channel class instance.- Parameters:
configuration
- The configuration- Returns:
- A SocketChannel instance.
-
channelInstance(NettyChannelType, EventLoopGroupConfiguration, Channel, int)
instead