Top Description Inners Fields Constructors Methods
io.vertx.core.http.impl.cgbystrom

public Class FlashPolicyHandler

extends ChannelInboundHandlerAdapter
Class Inheritance
Imports
io.netty.buffer.ByteBuf, .Unpooled, io.netty.channel.ChannelFutureListener, .ChannelHandlerContext, .ChannelInboundHandlerAdapter, io.netty.util.CharsetUtil

A Flash policy file handler Will detect connection attempts made by Adobe Flash clients and return a policy file response After the policy has been sent, it will instantly close the connection. If the first bytes sent are not a policy file request the handler will simply remove itself from the pipeline. Read more at http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html Example usage: ChannelPipeline pipeline = Channels.pipeline(); pipeline.addLast("flashPolicy", new FlashPolicyHandler()); pipeline.addLast("decoder", new MyProtocolDecoder()); pipeline.addLast("encoder", new MyProtocolEncoder()); pipeline.addLast("handler", new MyBusinessLogicHandler()); For license see LICENSE file in this directory

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private FlashPolicyHandler.ParseState
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from io.netty.channel.ChannelInboundHandlerAdapter:
channelActivechannelInactivechannelReadCompletechannelRegisteredchannelUnregisteredchannelWritabilityChangedexceptionCaughtuserEventTriggered

Field Detail

stateback to summary
private FlashPolicyHandler.ParseState state
XMLback to summary
private static final String XML

Constructor Detail

FlashPolicyHandlerback to summary
public FlashPolicyHandler()

Method Detail

channelReadback to summary
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception

Overrides io.netty.channel.ChannelInboundHandlerAdapter.channelRead.

Implements io.netty.channel.ChannelInboundHandler.channelRead.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.channelRead.

Calls ChannelHandlerContext#fireChannelRead(Object) to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override
io.vertx.core.http.impl.cgbystrom back to summary

pack-priv final Enum FlashPolicyHandler.ParseState

extends Enum<FlashPolicyHandler.ParseState>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final FlashPolicyHandler.ParseState
public static final FlashPolicyHandler.ParseState

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static FlashPolicyHandler.ParseState
public static FlashPolicyHandler.ParseState[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

MAGIC1back to summary
public static final FlashPolicyHandler.ParseState MAGIC1
MAGIC2back to summary
public static final FlashPolicyHandler.ParseState MAGIC2

Constructor Detail

ParseStateback to summary
private ParseState()

Method Detail

valueOfback to summary
public static FlashPolicyHandler.ParseState valueOf(String name)
valuesback to summary
public static FlashPolicyHandler.ParseState[] values()