com.ning.http.client.providers.netty.netty4
Class WebSocket08FrameDecoder

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by org.jboss.netty.handler.codec.replay.ReplayingDecoder<WebSocket08FrameDecoder.State>
          extended by com.ning.http.client.providers.netty.netty4.WebSocket08FrameDecoder
All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

public class WebSocket08FrameDecoder
extends org.jboss.netty.handler.codec.replay.ReplayingDecoder<WebSocket08FrameDecoder.State>

Decodes a web socket frame from wire protocol version 8 format. This code was forked from webbit and modified.

Author:
Aslak Hellesøy, Vibul Imtarnasan

Nested Class Summary
static class WebSocket08FrameDecoder.State
           
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
WebSocket08FrameDecoder(boolean maskedPayload, boolean allowExtensions)
          Constructor
 
Method Summary
protected  Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.Channel channel, org.jboss.netty.buffer.ChannelBuffer buffer, WebSocket08FrameDecoder.State state)
           
 
Methods inherited from class org.jboss.netty.handler.codec.replay.ReplayingDecoder
actualReadableBytes, channelClosed, channelDisconnected, checkpoint, checkpoint, decodeLast, exceptionCaught, getState, internalBuffer, messageReceived, setState
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelConnected, 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

WebSocket08FrameDecoder

public WebSocket08FrameDecoder(boolean maskedPayload,
                               boolean allowExtensions)
Constructor

Parameters:
maskedPayload - Web socket servers must set this to true processed incoming masked payload. Client implementations must set this to false.
allowExtensions - Flag to allow reserved extension bits to be used or not
Method Detail

decode

protected Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
                        org.jboss.netty.channel.Channel channel,
                        org.jboss.netty.buffer.ChannelBuffer buffer,
                        WebSocket08FrameDecoder.State state)
                 throws Exception
Specified by:
decode in class org.jboss.netty.handler.codec.replay.ReplayingDecoder<WebSocket08FrameDecoder.State>
Throws:
Exception


Copyright © 2012. All Rights Reserved.