Search in sources :

Example 1 with LineOrientedRequestEncoder

use of org.opennms.netmgt.provision.detector.simple.support.LineOrientedRequestEncoder 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)

Example 2 with LineOrientedRequestEncoder

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

the class AsyncLineOrientedDetectorNettyImpl 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("lineDecoder", new LineOrientedResponseDecoder());
    // 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) 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) LineOrientedResponseDecoder(org.opennms.netmgt.provision.detector.simple.support.LineOrientedResponseDecoder)

Aggregations

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