public class WebSocketFrameHandler
extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.websocketx.WebSocketFrame>
| Modifier and Type | Field and Description |
|---|---|
static io.netty.util.AttributeKey<HttpRequestInfo> |
CTX_HTTP_REQUEST_INFO |
static String |
WEBSOCKET_PATH |
| Constructor and Description |
|---|
WebSocketFrameHandler(HttpRequestInfo originalRequestInfo) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.websocketx.WebSocketFrame frame) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
io.netty.channel.Channel |
getChannel() |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
<T extends com.google.protobuf.Message> |
sendData(Yamcs.ProtoDataType dataType,
T data)
Sends actual data over the web socket.
|
void |
sendReply(WebSocketReply reply) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
acceptInboundMessage, channelReadchannelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedensureNotSharable, handlerRemoved, isSharablepublic static final String WEBSOCKET_PATH
public static final io.netty.util.AttributeKey<HttpRequestInfo> CTX_HTTP_REQUEST_INFO
public WebSocketFrameHandler(HttpRequestInfo originalRequestInfo)
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
handlerAdded in interface io.netty.channel.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterExceptionpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt)
throws Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionprotected void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.websocketx.WebSocketFrame frame)
throws Exception
channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.websocketx.WebSocketFrame>Exceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void sendReply(WebSocketReply reply) throws IOException
IOExceptionpublic <T extends com.google.protobuf.Message> void sendData(Yamcs.ProtoDataType dataType, T data) throws IOException
IOExceptionpublic io.netty.channel.Channel getChannel()
Copyright © 2018 Space Applications Services. All rights reserved.