AeroGear Netty SockJS Codec 0.11.0

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

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.transport.AbstractSendTransport
              extended by org.jboss.aerogear.io.netty.handler.codec.sockjs.transport.JsonpSendTransport
All Implemented Interfaces:
io.netty.channel.ChannelHandler

public class JsonpSendTransport
extends AbstractSendTransport

JSON Padding (JSONP) Polling is a transport where there is no open connection between the client and the server. Instead the client will issue a new request for polling from and sending data to the SockJS service. This handler is responsible for handling data destined for the target SockJS service.

See Also:
JsonpPollingTransport

Nested Class Summary
 
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable, io.netty.channel.ChannelHandler.Skip
 
Field Summary
 
Fields inherited from class org.jboss.aerogear.io.netty.handler.codec.sockjs.transport.AbstractSendTransport
config
 
Constructor Summary
JsonpSendTransport(SockJsConfig config)
           
 
Method Summary
 void respond(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest request)
          Allows concrete subclasses to very how they will respond after a message has been sent to the target SockJS service.
 String toString()
           
 
Methods inherited from class org.jboss.aerogear.io.netty.handler.codec.sockjs.transport.AbstractSendTransport
messageReceived, respond
 
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, exceptionCaught, flush, handlerAdded, handlerRemoved, isSharable, read, userEventTriggered, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonpSendTransport

public JsonpSendTransport(SockJsConfig config)
Method Detail

respond

public void respond(io.netty.channel.ChannelHandlerContext ctx,
                    io.netty.handler.codec.http.FullHttpRequest request)
             throws Exception
Description copied from class: AbstractSendTransport
Allows concrete subclasses to very how they will respond after a message has been sent to the target SockJS service. Different transport protocols require different responses, for example jsonp_send requires an OK response while xhr_send NO_CONTENT.

Specified by:
respond in class AbstractSendTransport
Parameters:
ctx - the current ChannelHandlerContext.
request - the http request.
Throws:
Exception - if a failure occurs while trying to respond.

toString

public String toString()
Overrides:
toString in class Object

AeroGear Netty SockJS Codec 0.11.0

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