org.red5.server.net.protocol
Interface SimpleProtocolDecoder

All Known Implementing Classes:
RemotingProtocolDecoder, RTMPMinaProtocolDecoder, RTMPProtocolDecoder, RTMPTProtocolDecoder

public interface SimpleProtocolDecoder

Simple protocol decoder


Method Summary
 Object decode(ProtocolState state, org.apache.mina.core.buffer.IoBuffer in)
           
 List<?> decodeBuffer(ProtocolState state, org.apache.mina.core.buffer.IoBuffer buffer)
          Decode all available objects in buffer.
 

Method Detail

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 interface
in - 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 protocol
buffer - 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