public class SessionHandler extends io.netty.channel.ChannelHandlerAdapter implements SockJsSessionContext
SessionState that this session handles will differ.| Modifier and Type | Class and Description |
|---|---|
static class |
SessionHandler.Events |
| Constructor and Description |
|---|
SessionHandler(org.jboss.aerogear.io.netty.handler.codec.sockjs.handler.SessionState sessionState,
org.jboss.aerogear.io.netty.handler.codec.sockjs.handler.SockJsSession session) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
close()
Close the current session.
|
io.netty.channel.ChannelHandlerContext |
getConnectionContext()
Get the underlying ChannelHandlerContext.
|
io.netty.channel.ChannelHandlerContext |
getCurrentContext()
Get the underlying ChannelHandlerContext.
|
void |
send(String message)
Send data to the current session.
|
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object event) |
public SessionHandler(org.jboss.aerogear.io.netty.handler.codec.sockjs.handler.SessionState sessionState,
org.jboss.aerogear.io.netty.handler.codec.sockjs.handler.SockJsSession session)
public void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead in interface io.netty.channel.ChannelHandlerchannelRead in class io.netty.channel.ChannelHandlerAdapterExceptionpublic void send(String message)
SockJsSessionContextsend in interface SockJsSessionContextmessage - the message to be sent.public void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelHandlerchannelInactive in class io.netty.channel.ChannelHandlerAdapterExceptionpublic void close()
SockJsSessionContextclose in interface SockJsSessionContextpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object event)
throws Exception
userEventTriggered in interface io.netty.channel.ChannelHandleruserEventTriggered in class io.netty.channel.ChannelHandlerAdapterExceptionpublic io.netty.channel.ChannelHandlerContext getConnectionContext()
SockJsSessionContextgetConnectionContext in interface SockJsSessionContextpublic io.netty.channel.ChannelHandlerContext getCurrentContext()
SockJsSessionContextgetCurrentContext in interface SockJsSessionContextCopyright © 2014 JBoss by Red Hat. All Rights Reserved.