Interface NettyEmbeddedServices
- All Known Implementing Classes:
DefaultNettyEmbeddedServerFactory
@Internal
public interface NettyEmbeddedServices
Internal interface with services required by the
NettyHttpServer.
e- Since:
- 3.1.0
-
Method Summary
Modifier and TypeMethodDescriptionio.netty.channel.EventLoopGroupcreateEventLoopGroup(int numThreads, ExecutorService executorService, @Nullable Integer ioRatio) Creates the event loop group configuration.io.netty.channel.EventLoopGroupcreateEventLoopGroup(io.micronaut.http.netty.channel.EventLoopGroupConfiguration config) Creates the event loop group configuration.io.micronaut.context.ApplicationContextio.micronaut.context.BeanProvider<io.micronaut.http.ssl.CertificateProvider> default io.netty.channel.ChannelgetChannelInstance(io.micronaut.http.netty.channel.NettyChannelType type, @Nullable io.micronaut.http.netty.channel.EventLoopGroupConfiguration workerConfig) Gets the domain server socket channel instance.default io.netty.channel.ChannelgetChannelInstance(io.micronaut.http.netty.channel.NettyChannelType type, @Nullable io.micronaut.http.netty.channel.EventLoopGroupConfiguration workerConfig, @Nullable io.netty.channel.Channel parent, int fd) Gets the domain server socket channel instance.io.micronaut.http.netty.channel.converters.ChannelOptionFactorydefault io.netty.channel.ServerChannelgetDomainServerChannelInstance(@Nullable io.micronaut.http.netty.channel.EventLoopGroupConfiguration workerConfig) Deprecated, for removal: This API element is subject to removal in a future version.io.micronaut.http.netty.channel.EventLoopGroupRegistry<E> io.micronaut.context.event.ApplicationEventPublisher<E> getEventPublisher(Class<E> eventClass) Get an event publisher for the server for the given type.default io.micronaut.scheduling.executor.ExecutorSelectorio.micronaut.http.codec.MediaTypeCodecRegistryio.micronaut.http.body.MessageBodyHandlerRegistryList<io.netty.channel.ChannelOutboundHandler> default io.micronaut.http.server.binding.RequestArgumentSatisfierio.micronaut.http.server.RouteExecutordefault io.micronaut.web.router.Routerdefault io.netty.channel.socket.ServerSocketChannelgetServerSocketChannelInstance(@Nullable io.micronaut.http.netty.channel.EventLoopGroupConfiguration workerConfig) Deprecated, for removal: This API element is subject to removal in a future version.@Nullable ServerSslBuilderio.micronaut.web.router.resource.StaticResourceResolvergetWebSocketUpgradeHandler(NettyEmbeddedServer embeddedServer)
-
Method Details
-
getMessageBodyHandlerRegistry
io.micronaut.http.body.MessageBodyHandlerRegistry getMessageBodyHandlerRegistry()- Returns:
- The message body handler registry.
-
getOutboundHandlers
List<io.netty.channel.ChannelOutboundHandler> getOutboundHandlers()- Returns:
- The channel outbound handlers
-
getApplicationContext
io.micronaut.context.ApplicationContext getApplicationContext()- Returns:
- The application context
-
getRequestArgumentSatisfier
default io.micronaut.http.server.binding.RequestArgumentSatisfier getRequestArgumentSatisfier()- Returns:
- The request argument satisfier
- See Also:
-
getRouteExecutor
io.micronaut.http.server.RouteExecutor getRouteExecutor()- Returns:
- The route executor
- See Also:
-
getMediaTypeCodecRegistry
io.micronaut.http.codec.MediaTypeCodecRegistry getMediaTypeCodecRegistry()- Returns:
- The media type code registry
- See Also:
-
getStaticResourceResolver
io.micronaut.web.router.resource.StaticResourceResolver getStaticResourceResolver()- Returns:
- The static resource resolver
- See Also:
-
getExecutorSelector
default io.micronaut.scheduling.executor.ExecutorSelector getExecutorSelector()- Returns:
- The executor resolver
-
getServerSslBuilder
@Nullable ServerSslBuilder getServerSslBuilder()- Returns:
- The server SSL builder or
nullif none is configured - See Also:
-
getChannelOptionFactory
io.micronaut.http.netty.channel.converters.ChannelOptionFactory getChannelOptionFactory()- Returns:
- The channel option factory
-
getHttpCompressionStrategy
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
io.micronaut.http.netty.channel.EventLoopGroupRegistry getEventLoopGroupRegistry()- Returns:
- The event loop group registry.
-
getRouter
default io.micronaut.web.router.Router getRouter()- Returns:
- Obtains the router
-
createEventLoopGroup
io.netty.channel.EventLoopGroup createEventLoopGroup(io.micronaut.http.netty.channel.EventLoopGroupConfiguration config) Creates the event loop group configuration.- Parameters:
config- The config- Returns:
- The event loop group config
-
createEventLoopGroup
io.netty.channel.EventLoopGroup createEventLoopGroup(int numThreads, 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 io.netty.channel.socket.ServerSocketChannel getServerSocketChannelInstance(@Nullable io.micronaut.http.netty.channel.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 io.netty.channel.ServerChannel getDomainServerChannelInstance(@Nullable io.micronaut.http.netty.channel.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 io.netty.channel.Channel getChannelInstance(io.micronaut.http.netty.channel.NettyChannelType type, @Nullable io.micronaut.http.netty.channel.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 io.netty.channel.Channel getChannelInstance(io.micronaut.http.netty.channel.NettyChannelType type, @Nullable io.micronaut.http.netty.channel.EventLoopGroupConfiguration workerConfig, @Nullable 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
io.micronaut.context.BeanProvider<io.micronaut.http.ssl.CertificateProvider> getCertificateProviders()
-
getChannelInstance(NettyChannelType, EventLoopGroupConfiguration)instead