public interface NettyEmbeddedServer extends EmbeddedServer, WebSocketSessionRepository, ChannelPipelineCustomizer, RefreshEventListener, NettyServerCustomizer.Registry
EmbeddedServer
interface that represents a
Netty-based HTTP server.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
DEFAULT_POSITION
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Modifier and Type | Method and Description |
---|---|
default Set<Integer> |
getBoundPorts()
Gets the set of all ports this Netty server is bound to.
|
default void |
register(NettyServerCustomizer customizer)
Register a new customizer with this server.
|
default NettyEmbeddedServer |
start()
Starts the lifecyle component.
|
default NettyEmbeddedServer |
stop()
Stops the life cycle component.
|
NettyEmbeddedServer |
stopServerOnly()
Stops the Netty instance, but keeps the ApplicationContext running.
|
getContextURI, getHost, getPort, getScheme, getURI, getURL, isKeepAlive, isServer
getApplicationConfiguration, getApplicationContext, getEnvironment, isForceExit
addChannel, getChannelGroup, removeChannel
doOnConnect, isClientChannel, isServerChannel
getObservedConfigurationPrefixes, getOrder, supports
onApplicationEvent
default Set<Integer> getBoundPorts()
start()
an empty set otherwise.@NonNull default NettyEmbeddedServer start()
LifeCycle
start
in interface ApplicationContextLifeCycle<EmbeddedServer>
start
in interface LifeCycle
@NonNull default NettyEmbeddedServer stop()
LifeCycle
stop
in interface ApplicationContextLifeCycle<EmbeddedServer>
stop
in interface LifeCycle
@NonNull NettyEmbeddedServer stopServerOnly()
default void register(@NonNull NettyServerCustomizer customizer)
NettyServerCustomizer.Registry
register
in interface NettyServerCustomizer.Registry
customizer
- The customizer to register.