org.atmosphere.nettosphere
Class BridgeRuntime

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by org.atmosphere.nettosphere.HttpStaticFileServerHandler
          extended by org.atmosphere.nettosphere.BridgeRuntime
All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

public class BridgeRuntime
extends HttpStaticFileServerHandler

Bridge the Atmosphere Framework with Netty.

Author:
Jeanfrancois Arcand

Nested Class Summary
static class BridgeRuntime.State
           
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Field Summary
 
Fields inherited from class org.atmosphere.nettosphere.HttpStaticFileServerHandler
HTTP_CACHE_SECONDS, HTTP_DATE_FORMAT, HTTP_DATE_GMT_TIMEZONE, SERVICED, STATIC_MAPPING
 
Constructor Summary
BridgeRuntime(Config config)
           
 
Method Summary
 void channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)
           
 void destroy()
           
 void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)
           
 org.atmosphere.cpr.AtmosphereFramework framework()
           
 void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent messageEvent)
           
protected  void sendError(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.handler.codec.http.HttpResponseStatus status, org.jboss.netty.channel.MessageEvent e)
           
 
Methods inherited from class org.atmosphere.nettosphere.HttpStaticFileServerHandler
contentType, sanitizeUri
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BridgeRuntime

public BridgeRuntime(Config config)
Method Detail

framework

public org.atmosphere.cpr.AtmosphereFramework framework()

messageReceived

public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.MessageEvent messageEvent)
                     throws URISyntaxException,
                            IOException
Overrides:
messageReceived in class HttpStaticFileServerHandler
Throws:
URISyntaxException
IOException

sendError

protected void sendError(org.jboss.netty.channel.ChannelHandlerContext ctx,
                         org.jboss.netty.handler.codec.http.HttpResponseStatus status,
                         org.jboss.netty.channel.MessageEvent e)
Overrides:
sendError in class HttpStaticFileServerHandler

destroy

public void destroy()

channelClosed

public void channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx,
                          org.jboss.netty.channel.ChannelStateEvent e)
                   throws Exception
Overrides:
channelClosed in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
Exception

exceptionCaught

public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.ExceptionEvent e)
                     throws Exception
Overrides:
exceptionCaught in class HttpStaticFileServerHandler
Throws:
Exception


Copyright © 2014. All Rights Reserved.