AeroGear Netty SockJS Codec 0.11.0

org.jboss.aerogear.io.netty.handler.codec.sockjs.transport
Class XhrStreamingTransport

java.lang.Object
  extended by io.netty.channel.ChannelHandlerAdapter
      extended by org.jboss.aerogear.io.netty.handler.codec.sockjs.transport.XhrStreamingTransport
All Implemented Interfaces:
io.netty.channel.ChannelHandler

public class XhrStreamingTransport
extends io.netty.channel.ChannelHandlerAdapter

XMLHttpRequest (XHR) streaming transport is a transport where a persistent connection is maintained between the server and the client, over which the server can send HTTP chunks. This handler is responsible for handling Frames and sending the contents of those frames to the client.

See Also:
XhrSendTransport

Nested Class Summary
 
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable, io.netty.channel.ChannelHandler.Skip
 
Constructor Summary
XhrStreamingTransport(SockJsConfig config, io.netty.handler.codec.http.HttpRequest request)
          Sole constructor.
 
Method Summary
protected  io.netty.handler.codec.http.HttpResponse createResponse(String contentType)
           
 void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise)
           
 
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
bind, channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelWritabilityChanged, close, connect, disconnect, exceptionCaught, flush, handlerAdded, handlerRemoved, isSharable, read, userEventTriggered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XhrStreamingTransport

public XhrStreamingTransport(SockJsConfig config,
                             io.netty.handler.codec.http.HttpRequest request)
Sole constructor.

Parameters:
config - the SockJS SockJsConfig instance.
request - the HttpRequest which can be used get information like the HTTP version.
Method Detail

write

public void write(io.netty.channel.ChannelHandlerContext ctx,
                  Object msg,
                  io.netty.channel.ChannelPromise promise)
           throws Exception
Specified by:
write in interface io.netty.channel.ChannelHandler
Overrides:
write in class io.netty.channel.ChannelHandlerAdapter
Throws:
Exception

createResponse

protected io.netty.handler.codec.http.HttpResponse createResponse(String contentType)

AeroGear Netty SockJS Codec 0.11.0

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