// Upstream handlers or encoders (i.e towards server) are added to
// pipeline now.
pipeline.addLast("lengthDecoder", createLengthBasedFrameDecoder());
pipeline.addLast("eventDecoder",eventDecoder);
pipeline.addLast("amf3ToEventSourceDecoder", amf3ToEventSourceDecoder);
pipeline.addLast("eventHandler", new DefaultToServerHandler(
playerSession));
// Downstream handlers (i.e towards client) are added to pipeline now.
// NOTE the last encoder in the pipeline is the first encoder to be called.
pipeline.addLast("lengthFieldPrepender", lengthFieldPrepender);