Package org.snmp4j.transport
Interface MessageLengthDecoder
- All Known Implementing Classes:
 DefaultTcpTransportMapping.SnmpMesssageLengthDecoder
public interface MessageLengthDecoder
The 
MessageLengthDecoder needs to be implemented for connection
 oriented transport mappings, because those transport mappings have no message
 boundaries. To determine the message length, the message header is decoded
 in a protocol specific way.- Since:
 - 1.7
 - Version:
 - 1.7
 - Author:
 - Frank Fock
 
- 
Method Summary
Modifier and TypeMethodDescriptionReturns the total message length to read (including header) and the actual header length.intReturns the minimum length of the header to be decoded. 
- 
Method Details
- 
getMinHeaderLength
int getMinHeaderLength()Returns the minimum length of the header to be decoded. Typically this is a constant value.- Returns:
 - the minimum length in bytes.
 
 - 
getMessageLength
Returns the total message length to read (including header) and the actual header length.- Parameters:
 buf- a ByteBuffer with a minimum ofgetMinHeaderLength().- Returns:
 - the total message length in bytes and the actual header length in bytes.
 - Throws:
 IOException- if the header cannot be decoded.
 
 -