Class NettyServerWebSocketHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<Object>
io.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
io.micronaut.http.server.netty.websocket.NettyServerWebSocketHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
@Internal
public class NettyServerWebSocketHandler
extends io.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
A handler for
WebSocketFrame
instances.- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The id of the handler used when adding it to the Netty pipeline.Fields inherited from class io.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
conversionService, LOG, mediaTypeCodecRegistry, messageHandler, originatingRequest, pongHandler, subProtocol, uriVariables, webSocketBean, webSocketBinder, webSocketSessionRepository, webSocketVersion
-
Method Summary
Modifier and TypeMethodDescriptionboolean
protected io.micronaut.http.netty.websocket.NettyWebSocketSession
createWebSocketSession
(io.netty.channel.ChannelHandlerContext ctx) io.micronaut.core.type.Argument<?>
io.micronaut.core.type.Argument<?>
io.micronaut.http.netty.websocket.NettyWebSocketSession
void
handlerRemoved
(io.netty.channel.ChannelHandlerContext ctx) protected org.reactivestreams.Publisher<?>
instrumentPublisher
(io.netty.channel.ChannelHandlerContext ctx, Object result) protected Object
invokeExecutable
(io.micronaut.core.bind.BoundExecutable boundExecutable, io.micronaut.inject.MethodExecutionHandle<?, ?> messageHandler) protected void
messageHandled
(io.netty.channel.ChannelHandlerContext ctx, Object message) void
userEventTriggered
(io.netty.channel.ChannelHandlerContext ctx, Object evt) Methods inherited from class io.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
callOpenMethod, channelRead0, exceptionCaught, forwardErrorToUser, handleCloseReason, handleWebSocketFrame, writeCloseFrameAndTerminate
Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
channelRead
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded
-
Field Details
-
ID
The id of the handler used when adding it to the Netty pipeline.- See Also:
-
-
Method Details
-
getSession
public io.micronaut.http.netty.websocket.NettyWebSocketSession getSession()- Specified by:
getSession
in classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
getBodyArgument
public io.micronaut.core.type.Argument<?> getBodyArgument()- Specified by:
getBodyArgument
in classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
getPongArgument
public io.micronaut.core.type.Argument<?> getPongArgument()- Specified by:
getPongArgument
in classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception - Specified by:
userEventTriggered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
userEventTriggered
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
acceptInboundMessage
- Overrides:
acceptInboundMessage
in classio.netty.channel.SimpleChannelInboundHandler<Object>
-
createWebSocketSession
protected io.micronaut.http.netty.websocket.NettyWebSocketSession createWebSocketSession(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
createWebSocketSession
in classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
instrumentPublisher
protected org.reactivestreams.Publisher<?> instrumentPublisher(io.netty.channel.ChannelHandlerContext ctx, Object result) - Overrides:
instrumentPublisher
in classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
invokeExecutable
protected Object invokeExecutable(io.micronaut.core.bind.BoundExecutable boundExecutable, io.micronaut.inject.MethodExecutionHandle<?, ?> messageHandler) - Overrides:
invokeExecutable
in classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
messageHandled
- Overrides:
messageHandled
in classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
handlerRemoved
- Specified by:
handlerRemoved
in interfaceio.netty.channel.ChannelHandler
- Overrides:
handlerRemoved
in classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
- Throws:
Exception
-