Class MultilineOrientedResponseDecoder
- java.lang.Object
-
- org.jboss.netty.handler.codec.oneone.OneToOneDecoder
-
- org.opennms.netmgt.provision.detector.simple.support.MultilineOrientedResponseDecoder
-
- All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler
,org.jboss.netty.channel.ChannelUpstreamHandler
public class MultilineOrientedResponseDecoder extends org.jboss.netty.handler.codec.oneone.OneToOneDecoder
MultilineOrientedResponseDecoder class.
- Author:
- Seth
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_MULTILINE_INDICATOR
-
Constructor Summary
Constructors Constructor Description MultilineOrientedResponseDecoder()
Constructor for MultilineOrientedResponseDecoder.MultilineOrientedResponseDecoder(String multilineIndicator)
Constructor for MultilineOrientedResponseDecoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkIndicator(String line)
checkIndicatorprotected Object
decode(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.Channel channel, Object msg)
This method decodesString
objects intoMultilineOrientedResponse
instances that contain each line of the string response.String
getMultilineIndicator()
getMultilineIndicator
-
-
-
Field Detail
-
DEFAULT_MULTILINE_INDICATOR
public static final String DEFAULT_MULTILINE_INDICATOR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MultilineOrientedResponseDecoder
public MultilineOrientedResponseDecoder()
Constructor for MultilineOrientedResponseDecoder.
- Parameters:
multilineIndicator
- aString
object.
-
-
Method Detail
-
decode
protected Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.Channel channel, Object msg) throws Exception
This method decodesString
objects intoMultilineOrientedResponse
instances that contain each line of the string response.- Specified by:
decode
in classorg.jboss.netty.handler.codec.oneone.OneToOneDecoder
- Throws:
Exception
-
checkIndicator
protected boolean checkIndicator(String line)
checkIndicator
- Parameters:
line
- aString
object.- Returns:
- a boolean.
-
-