Class: WildSoNet::Streamer::PipelineFactory
- Inherits:
-
Object
- Object
- WildSoNet::Streamer::PipelineFactory
- Includes:
- ChannelPipelineFactory
- Defined in:
- lib/server.rb
Instance Method Summary collapse
- #getPipeline ⇒ Object
-
#initialize(encoder) ⇒ PipelineFactory
constructor
A new instance of PipelineFactory.
Constructor Details
#initialize(encoder) ⇒ PipelineFactory
Returns a new instance of PipelineFactory.
71 72 73 |
# File 'lib/server.rb', line 71 def initialize encoder @encoder = encoder end |
Instance Method Details
#getPipeline ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/server.rb', line 75 def getPipeline pip = Channels.pipeline pip.addLast("framer", DelimiterBasedFrameDecoder.new(8192, Delimiters.lineDelimiter())) pip.addLast("decoder", StringDecoder.new) pip.addLast("encoder", StringEncoder.new) handler = Handler.new handler.encoder = @encoder pip.addLast("handler", handler) pip end |