Package io.micronaut.http.server.netty
Interface NettyEmbeddedServer
-
- All Superinterfaces:
io.micronaut.context.ApplicationContextLifeCycle<io.micronaut.runtime.server.EmbeddedServer>,io.micronaut.context.ApplicationContextProvider,io.micronaut.context.event.ApplicationEventListener<io.micronaut.runtime.context.scope.refresh.RefreshEvent>,java.lang.AutoCloseable,io.micronaut.http.netty.channel.ChannelPipelineCustomizer,java.io.Closeable,io.micronaut.runtime.EmbeddedApplication<io.micronaut.runtime.server.EmbeddedServer>,io.micronaut.runtime.server.EmbeddedServer,java.util.EventListener,io.micronaut.context.LifeCycle,NettyServerCustomizer.Registry,io.micronaut.core.order.Ordered,io.micronaut.runtime.context.scope.refresh.RefreshEventListener,io.micronaut.http.netty.websocket.WebSocketSessionRepository
- All Known Implementing Classes:
NettyHttpServer
public interface NettyEmbeddedServer extends io.micronaut.runtime.server.EmbeddedServer, io.micronaut.http.netty.websocket.WebSocketSessionRepository, io.micronaut.http.netty.channel.ChannelPipelineCustomizer, io.micronaut.runtime.context.scope.refresh.RefreshEventListener, NettyServerCustomizer.Registry
ExtendedEmbeddedServerinterface that represents a Netty-based HTTP server.- Since:
- 3.1.0
-
-
Field Summary
-
Fields inherited from interface io.micronaut.http.netty.channel.ChannelPipelineCustomizer
HANDLER_ACCESS_LOGGER, HANDLER_CONNECT_TTL, HANDLER_FLOW_CONTROL, HANDLER_HTTP_AGGREGATOR, HANDLER_HTTP_CHUNK, HANDLER_HTTP_CLIENT_CODEC, HANDLER_HTTP_CLIENT_INIT, HANDLER_HTTP_COMPRESSOR, HANDLER_HTTP_DECODER, HANDLER_HTTP_DECOMPRESSOR, HANDLER_HTTP_KEEP_ALIVE, HANDLER_HTTP_PROXY, HANDLER_HTTP_SERVER_CODEC, HANDLER_HTTP_STREAM, HANDLER_HTTP_TO_HTTPS_REDIRECT, HANDLER_HTTP2_CONNECTION, HANDLER_HTTP2_PROTOCOL_NEGOTIATOR, HANDLER_HTTP2_SETTINGS, HANDLER_HTTP2_UPGRADE_REQUEST, HANDLER_IDLE_STATE, HANDLER_MICRONAUT_FULL_HTTP_RESPONSE, HANDLER_MICRONAUT_HTTP_RESPONSE_FULL, HANDLER_MICRONAUT_HTTP_RESPONSE_STREAM, HANDLER_MICRONAUT_INBOUND, HANDLER_MICRONAUT_SSE_CONTENT, HANDLER_MICRONAUT_SSE_EVENT_STREAM, HANDLER_MICRONAUT_WEBSOCKET_CLIENT, HANDLER_READ_TIMEOUT, HANDLER_SOCKS_5_PROXY, HANDLER_SSL, HANDLER_WEBSOCKET_UPGRADE
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.Set<java.lang.Integer>getBoundPorts()Gets the set of all ports this Netty server is bound to.default voidregister(NettyServerCustomizer customizer)Register a new customizer with this server.default NettyEmbeddedServerstart()default NettyEmbeddedServerstop()-
Methods inherited from interface io.micronaut.context.event.ApplicationEventListener
onApplicationEvent
-
Methods inherited from interface io.micronaut.http.netty.channel.ChannelPipelineCustomizer
doOnConnect, isClientChannel, isServerChannel
-
Methods inherited from interface io.micronaut.runtime.EmbeddedApplication
getApplicationConfiguration, getApplicationContext, getEnvironment, isForceExit
-
Methods inherited from interface io.micronaut.runtime.server.EmbeddedServer
getHost, getPort, getScheme, getURI, getURL, isKeepAlive, isServer
-
-
-
-
Method Detail
-
getBoundPorts
default java.util.Set<java.lang.Integer> getBoundPorts()
Gets the set of all ports this Netty server is bound to.- Returns:
- An immutable set of bound ports if the server has been started with
start()an empty set otherwise.
-
start
default NettyEmbeddedServer start()
- Specified by:
startin interfaceio.micronaut.context.ApplicationContextLifeCycle<io.micronaut.runtime.server.EmbeddedServer>- Specified by:
startin interfaceio.micronaut.context.LifeCycle
-
stop
default NettyEmbeddedServer stop()
- Specified by:
stopin interfaceio.micronaut.context.ApplicationContextLifeCycle<io.micronaut.runtime.server.EmbeddedServer>- Specified by:
stopin interfaceio.micronaut.context.LifeCycle
-
register
default void register(@NonNull NettyServerCustomizer customizer)Description copied from interface:NettyServerCustomizer.RegistryRegister a new customizer with this server. Note that this method must be called before the server is started: When a listener launches, it may only respect the customizers that were registered at the time, and ignore future additions.- Specified by:
registerin interfaceNettyServerCustomizer.Registry- Parameters:
customizer- The customizer to register.
-
-