org.opennms.netmgt.provision.support.codec
Class MultiLineDecoder

java.lang.Object
  extended by org.apache.mina.filter.codec.ProtocolDecoderAdapter
      extended by org.apache.mina.filter.codec.CumulativeProtocolDecoder
          extended by org.opennms.netmgt.provision.support.codec.MultiLineDecoder
All Implemented Interfaces:
org.apache.mina.filter.codec.ProtocolDecoder
Direct Known Subclasses:
MultilineHttpStatusResponseDecoder

public class MultiLineDecoder
extends org.apache.mina.filter.codec.CumulativeProtocolDecoder

MultiLineDecoder class.

Version:
$Id: $
Author:
thedesloge

Field Summary
protected  String CURRENT_RESPONSE
           
 
Constructor Summary
MultiLineDecoder(Charset charset, String multilineIndicator)
          Constructor for MultiLineDecoder.
 
Method Summary
protected  boolean checkIndicator(org.apache.mina.core.buffer.IoBuffer in)
          checkIndicator
protected  boolean doDecode(org.apache.mina.core.session.IoSession session, org.apache.mina.core.buffer.IoBuffer in, org.apache.mina.filter.codec.ProtocolDecoderOutput out)
          
 Charset getCharset()
          getCharset
 String getMultilineIndicator()
          getMultilineIndicator
 void setCharset(Charset charset)
          setCharset
 
Methods inherited from class org.apache.mina.filter.codec.CumulativeProtocolDecoder
decode, dispose
 
Methods inherited from class org.apache.mina.filter.codec.ProtocolDecoderAdapter
finishDecode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURRENT_RESPONSE

protected String CURRENT_RESPONSE
Constructor Detail

MultiLineDecoder

public MultiLineDecoder(Charset charset,
                        String multilineIndicator)

Constructor for MultiLineDecoder.

Parameters:
charset - a Charset object.
multilineIndicator - a String object.
Method Detail

doDecode

protected boolean doDecode(org.apache.mina.core.session.IoSession session,
                           org.apache.mina.core.buffer.IoBuffer in,
                           org.apache.mina.filter.codec.ProtocolDecoderOutput out)
                    throws Exception

Specified by:
doDecode in class org.apache.mina.filter.codec.CumulativeProtocolDecoder
Throws:
Exception

checkIndicator

protected boolean checkIndicator(org.apache.mina.core.buffer.IoBuffer in)
                          throws CharacterCodingException

checkIndicator

Parameters:
in - a IoBuffer object.
Returns:
a boolean.
Throws:
CharacterCodingException - if any.

setCharset

public void setCharset(Charset charset)

setCharset

Parameters:
charset - a Charset object.

getCharset

public Charset getCharset()

getCharset

Returns:
a Charset object.

getMultilineIndicator

public String getMultilineIndicator()

getMultilineIndicator

Returns:
a String object.


Copyright © 2011. All Rights Reserved.