package org.realityforge.tarrabah;

import javax.inject.Inject;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.Channels;
import org.jboss.netty.handler.codec.frame.DelimiterBasedFrameDecoder;
import org.jboss.netty.handler.codec.frame.Delimiters;
import org.realityforge.tarrabah.cdi.ext.pipeline.PipelineScoped;

@PipelineScoped
public class SyslogTCPServer
  extends AbstractTCPServer
{
  private boolean _nullTerminate;
  @Inject
  private SyslogHandler _syslogHandler;

  protected ChannelPipelineFactory newPipelineFactory()
  {
    return new ChannelPipelineFactory()
    {
      public ChannelPipeline getPipeline()
        throws Exception
      {
        final ChannelBuffer[] delimiter = _nullTerminate ? Delimiters.nulDelimiter() : Delimiters.lineDelimiter();
        _syslogHandler = new SyslogHandler();
        return Channels.pipeline( new DelimiterBasedFrameDecoder( 2 * 1024 * 1024, delimiter ), _syslogHandler );
      }
    };
  }
}

@@ -376,90 +376,8 @@
 rs;%0A
-import org.realityforge.tarrabah.cdi.ext.pipeline.PipelineScoped;%0A%0A@PipelineScoped
 %0Apub

Remove unnecessary scope annotation