Package io.micronaut.http.server.netty
Interface NettyEmbeddedServices
- All Known Implementing Classes:
DefaultNettyEmbeddedServerFactory
Internal interface with services required by the
NettyHttpServer.
e- Since:
- 3.1.0
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescription@NonNull io.netty.channel.EventLoopGroupcreateEventLoopGroup(int numThreads, @NonNull ExecutorService executorService, @Nullable Integer ioRatio) Creates the event loop group configuration.@NonNull io.netty.channel.EventLoopGroupcreateEventLoopGroup(@NonNull EventLoopGroupConfiguration config) Creates the event loop group configuration.@NonNull ApplicationContext@NonNull BeanProvider<CertificateProvider> default @NonNull io.netty.channel.ChannelgetChannelInstance(NettyChannelType type, @NonNull EventLoopGroupConfiguration workerConfig) Gets the domain server socket channel instance.default @NonNull io.netty.channel.ChannelgetChannelInstance(NettyChannelType type, @NonNull EventLoopGroupConfiguration workerConfig, io.netty.channel.Channel parent, int fd) Gets the domain server socket channel instance.@NonNull ChannelOptionFactorydefault @NonNull io.netty.channel.ServerChannelgetDomainServerChannelInstance(@NonNull EventLoopGroupConfiguration workerConfig) Deprecated, for removal: This API element is subject to removal in a future version.@NonNull EventLoopGroupRegistry<E> @NonNull ApplicationEventPublisher<E> getEventPublisher(@NonNull Class<E> eventClass) Get an event publisher for the server for the given type.default @NonNull ExecutorSelector@NonNull HttpCompressionStrategy@NonNull MediaTypeCodecRegistry@NonNull List<io.netty.channel.ChannelOutboundHandler> default @NonNull RequestArgumentSatisfier@NonNull RouteExecutordefault @NonNull Routerdefault @NonNull io.netty.channel.socket.ServerSocketChannelgetServerSocketChannelInstance(@NonNull EventLoopGroupConfiguration workerConfig) Deprecated, for removal: This API element is subject to removal in a future version.@Nullable ServerSslBuilder@NonNull StaticResourceResolvergetWebSocketUpgradeHandler(NettyEmbeddedServer embeddedServer)
-
Method Details
-
getMessageBodyHandlerRegistry
MessageBodyHandlerRegistry getMessageBodyHandlerRegistry()- Returns:
- The message body handler registry.
-
getOutboundHandlers
@NonNull List<io.netty.channel.ChannelOutboundHandler> getOutboundHandlers()- Returns:
- The channel outbound handlers
-
getApplicationContext
@NonNull ApplicationContext getApplicationContext()- Returns:
- The application context
-
getRequestArgumentSatisfier
- Returns:
- The request argument satisfier
- See Also:
-
getRouteExecutor
@NonNull RouteExecutor getRouteExecutor()- Returns:
- The route executor
- See Also:
-
getMediaTypeCodecRegistry
@NonNull MediaTypeCodecRegistry getMediaTypeCodecRegistry()- Returns:
- The media type code registry
- See Also:
-
getStaticResourceResolver
@NonNull StaticResourceResolver getStaticResourceResolver()- Returns:
- The static resource resolver
- See Also:
-
getExecutorSelector
- Returns:
- The executor resolver
-
getServerSslBuilder
@Nullable ServerSslBuilder getServerSslBuilder()- Returns:
- The server SSL builder or
nullif none is configured - See Also:
-
getChannelOptionFactory
@NonNull ChannelOptionFactory getChannelOptionFactory()- Returns:
- The channel option factory
-
getHttpCompressionStrategy
@NonNull HttpCompressionStrategy getHttpCompressionStrategy()- Returns:
- The http compression strategy
-
getWebSocketUpgradeHandler
Optional<NettyServerWebSocketUpgradeHandler> getWebSocketUpgradeHandler(NettyEmbeddedServer embeddedServer) - Parameters:
embeddedServer- The server- Returns:
- The websocket upgrade handler if present
-
getEventLoopGroupRegistry
@NonNull EventLoopGroupRegistry getEventLoopGroupRegistry()- Returns:
- The event loop group registry.
-
getRouter
- Returns:
- Obtains the router
-
createEventLoopGroup
@NonNull io.netty.channel.EventLoopGroup createEventLoopGroup(@NonNull EventLoopGroupConfiguration config) Creates the event loop group configuration.- Parameters:
config- The config- Returns:
- The event loop group config
-
createEventLoopGroup
@NonNull io.netty.channel.EventLoopGroup createEventLoopGroup(int numThreads, @NonNull ExecutorService executorService, @Nullable Integer ioRatio) Creates the event loop group configuration.- Parameters:
numThreads- The number of threadsexecutorService- The executor serviceioRatio- The I/O ratio- Returns:
- The event loop group
-
getServerSocketChannelInstance
@Deprecated(since="4.5.0", forRemoval=true) default @NonNull io.netty.channel.socket.ServerSocketChannel getServerSocketChannelInstance(@NonNull EventLoopGroupConfiguration workerConfig) Deprecated, for removal: This API element is subject to removal in a future version.Gets the server socket channel instance.- Parameters:
workerConfig- The worker config- Returns:
- The
ServerSocketChannel
-
getDomainServerChannelInstance
@Deprecated(since="4.5.0", forRemoval=true) default @NonNull io.netty.channel.ServerChannel getDomainServerChannelInstance(@NonNull EventLoopGroupConfiguration workerConfig) Deprecated, for removal: This API element is subject to removal in a future version.Gets the domain server socket channel instance.- Parameters:
workerConfig- The worker config- Returns:
- The
DomainSocketChannel - Throws:
UnsupportedOperationException- if domain sockets are not supported.
-
getChannelInstance
default @NonNull io.netty.channel.Channel getChannelInstance(NettyChannelType type, @NonNull EventLoopGroupConfiguration workerConfig) Gets the domain server socket channel instance.- Parameters:
type- The channel type to returnworkerConfig- The worker config- Returns:
- The channel
- Throws:
UnsupportedOperationException- if domain sockets are not supported.
-
getChannelInstance
default @NonNull io.netty.channel.Channel getChannelInstance(NettyChannelType type, @NonNull EventLoopGroupConfiguration workerConfig, io.netty.channel.Channel parent, int fd) Gets the domain server socket channel instance.- Parameters:
type- The channel type to returnworkerConfig- The worker configparent- The parent channel, ornullfor no parent channelfd- The pre-defined file descriptor- Returns:
- The channel
- Throws:
UnsupportedOperationException- if domain sockets are not supported.
-
getEventPublisher
Get an event publisher for the server for the given type.- Type Parameters:
E- The event generic type- Parameters:
eventClass- The event publisher- Returns:
- The event publisher
-
getSslFactory
NettyServerSslFactory getSslFactory() -
getCertificateProviders
@NonNull BeanProvider<CertificateProvider> getCertificateProviders()
-
getChannelInstance(NettyChannelType, EventLoopGroupConfiguration)instead