Search in sources :

Example 1 with MultilineOrientedResponseDecoder

use of org.opennms.netmgt.provision.detector.simple.support.MultilineOrientedResponseDecoder in project opennms by OpenNMS.

the class AsyncMultilineDetectorNettyImpl method appendToPipeline.

@Override
protected void appendToPipeline(ChannelPipeline retval) {
    // Upstream handlers
    retval.addLast("frameDecoder", new DelimiterBasedFrameDecoder(1024, Delimiters.lineDelimiter()));
    retval.addLast("stringDecoder", new StringDecoder(CharsetUtil.UTF_8));
    retval.addLast("multilineDecoder", new MultilineOrientedResponseDecoder());
    // Downstream handlers
    retval.addLast("stringEncoder", new StringEncoder(CharsetUtil.UTF_8));
    retval.addLast("lineEncoder", new LineOrientedRequestEncoder());
}
Also used : StringEncoder(org.jboss.netty.handler.codec.string.StringEncoder) MultilineOrientedResponseDecoder(org.opennms.netmgt.provision.detector.simple.support.MultilineOrientedResponseDecoder) DelimiterBasedFrameDecoder(org.jboss.netty.handler.codec.frame.DelimiterBasedFrameDecoder) StringDecoder(org.jboss.netty.handler.codec.string.StringDecoder) LineOrientedRequestEncoder(org.opennms.netmgt.provision.detector.simple.support.LineOrientedRequestEncoder)

Aggregations

DelimiterBasedFrameDecoder (org.jboss.netty.handler.codec.frame.DelimiterBasedFrameDecoder)1 StringDecoder (org.jboss.netty.handler.codec.string.StringDecoder)1 StringEncoder (org.jboss.netty.handler.codec.string.StringEncoder)1 LineOrientedRequestEncoder (org.opennms.netmgt.provision.detector.simple.support.LineOrientedRequestEncoder)1 MultilineOrientedResponseDecoder (org.opennms.netmgt.provision.detector.simple.support.MultilineOrientedResponseDecoder)1