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 StringThe 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 TypeMethodDescriptionbooleanprotected io.micronaut.http.netty.websocket.NettyWebSocketSessioncreateWebSocketSession(io.netty.channel.ChannelHandlerContext ctx) io.micronaut.core.type.Argument<?>io.micronaut.core.type.Argument<?>io.micronaut.http.netty.websocket.NettyWebSocketSessionvoidhandlerRemoved(io.netty.channel.ChannelHandlerContext ctx) protected org.reactivestreams.Publisher<?>instrumentPublisher(io.netty.channel.ChannelHandlerContext ctx, Object result) protected ObjectinvokeExecutable(io.micronaut.core.bind.BoundExecutable boundExecutable, io.micronaut.inject.MethodExecutionHandle<?, ?> messageHandler) protected voidmessageHandled(io.netty.channel.ChannelHandlerContext ctx, Object message) voiduserEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) Methods inherited from class io.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
callOpenMethod, channelRead0, exceptionCaught, forwardErrorToUser, handleCloseReason, handleWebSocketFrame, writeCloseFrameAndTerminateMethods inherited from class io.netty.channel.SimpleChannelInboundHandler
channelReadMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getSessionin classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
getBodyArgument
public io.micronaut.core.type.Argument<?> getBodyArgument()- Specified by:
getBodyArgumentin classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
getPongArgument
public io.micronaut.core.type.Argument<?> getPongArgument()- Specified by:
getPongArgumentin classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception - Specified by:
userEventTriggeredin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
userEventTriggeredin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
acceptInboundMessage
- Overrides:
acceptInboundMessagein classio.netty.channel.SimpleChannelInboundHandler<Object>
-
createWebSocketSession
protected io.micronaut.http.netty.websocket.NettyWebSocketSession createWebSocketSession(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
createWebSocketSessionin classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
instrumentPublisher
protected org.reactivestreams.Publisher<?> instrumentPublisher(io.netty.channel.ChannelHandlerContext ctx, Object result) - Overrides:
instrumentPublisherin classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
invokeExecutable
protected Object invokeExecutable(io.micronaut.core.bind.BoundExecutable boundExecutable, io.micronaut.inject.MethodExecutionHandle<?, ?> messageHandler) - Overrides:
invokeExecutablein classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
messageHandled
- Overrides:
messageHandledin classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler
-
handlerRemoved
- Specified by:
handlerRemovedin interfaceio.netty.channel.ChannelHandler- Overrides:
handlerRemovedin classio.micronaut.http.netty.websocket.AbstractNettyWebSocketHandler- Throws:
Exception
-