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) |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
<S> void |
sendData(Yamcs.ProtoDataType dataType,
S data,
io.protostuff.Schema<S> schema)
Sends actual data over the web socket.
|
void |
sendReply(Web.WebSocketServerMessage.WebSocketReplyData reply) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
acceptInboundMessage, channelReadchannelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedpublic 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(Web.WebSocketServerMessage.WebSocketReplyData reply) throws IOException
IOExceptionpublic <S> void sendData(Yamcs.ProtoDataType dataType, S data, io.protostuff.Schema<S> schema) throws IOException
IOExceptionCopyright © 2017 Space Applications Services. All rights reserved.