org.red5.server.net.protocol
Interface SimpleProtocolDecoder
- All Known Implementing Classes:
- RemotingProtocolDecoder, RTMPMinaProtocolDecoder, RTMPProtocolDecoder, RTMPTProtocolDecoder
public interface SimpleProtocolDecoder
Simple protocol decoder
decode
Object decode(ProtocolState state,
org.apache.mina.core.buffer.IoBuffer in)
throws Exception
- Parameters:
state
- Stores state for the protocol, ProtocolState is just a marker
interfacein
- IoBuffer of data to be decoded
- Returns:
- one of three possible values. null : the object could not be
decoded, or some data was skipped, just continue. ProtocolState :
the decoder was unable to decode the whole object, refer to the
protocol state Object : something was decoded, continue
- Throws:
Exception
- on error
decodeBuffer
List<?> decodeBuffer(ProtocolState state,
org.apache.mina.core.buffer.IoBuffer buffer)
- Decode all available objects in buffer.
- Parameters:
state
- Stores state for the protocolbuffer
- IoBuffer of data to be decoded
- Returns:
- a list of decoded objects, may be empty if nothing could be
decoded
Copyright © 2006-2009 The Red5 Project