AeroGear Netty SockJS Codec 0.11.0

org.jboss.aerogear.io.netty.handler.codec.sockjs.handler
Class SockJsHandler

java.lang.Object
  extended by io.netty.channel.ChannelHandlerAdapter
      extended by io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
          extended by org.jboss.aerogear.io.netty.handler.codec.sockjs.handler.SockJsHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler

public class SockJsHandler
extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>

This handler is the main entry point for SockJS HTTP Request. It is responsible for inspecting the request uri and adding ChannelHandlers for different transport protocols that SockJS support. Once this has been done this handler will be removed from the channel pipeline.


Nested Class Summary
static class SockJsHandler.MatchingSessionPath
           
static class SockJsHandler.NonSupportedPath
           
static interface SockJsHandler.PathParams
          Represents HTTP path parameters in SockJS.
 
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable, io.netty.channel.ChannelHandler.Skip
 
Constructor Summary
SockJsHandler(SockJsServiceFactory... factories)
          Sole constructor which takes one or more SockJSServiceFactory.
 
Method Summary
 void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
           
 void messageReceived(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest request)
           
 
Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead
 
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
bind, channelActive, channelInactive, channelReadComplete, channelRegistered, channelWritabilityChanged, close, connect, disconnect, flush, handlerAdded, handlerRemoved, isSharable, read, userEventTriggered, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SockJsHandler

public SockJsHandler(SockJsServiceFactory... factories)
Sole constructor which takes one or more SockJSServiceFactory. These factories will later be used by the server to create the SockJS services that will be exposed by this server

Parameters:
factories - one or more SockJsServiceFactorys.
Method Detail

messageReceived

public void messageReceived(io.netty.channel.ChannelHandlerContext ctx,
                            io.netty.handler.codec.http.FullHttpRequest request)
                     throws Exception
Specified by:
messageReceived in class io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
Throws:
Exception

exceptionCaught

public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
                            Throwable cause)
                     throws Exception
Specified by:
exceptionCaught in interface io.netty.channel.ChannelHandler
Overrides:
exceptionCaught in class io.netty.channel.ChannelHandlerAdapter
Throws:
Exception

AeroGear Netty SockJS Codec 0.11.0

Copyright © 2014 JBoss by Red Hat. All Rights Reserved.