Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.mina.filter.codec.demux
Interface MessageEncoder

    public interface MessageEncoder

Encodes messages of specific types specified by `getMessageTypes()`.

Version:
  $Rev: 555855 $, $Date: 2007-07-13 05:19:00 +0200 (Fri, 13 Jul 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)
See Also:
  `DemuxingProtocolCodecFactory`, `MessageEncoderFactory`

Method Summary
`void` | `encode(IoSession session, Object message, ProtocolEncoderOutput out)` Encodes higher-level message objects into binary or protocol-specific data.
`Set<Class<?>>` | `getMessageTypes()` Returns the set of message classes this encoder can encode.

Method Detail

### getMessageTypes

    Set<Class<?>> getMessageTypes()

  Returns the set of message classes this encoder can encode.

### encode

    void encode(IoSession session,
                Object message,
                ProtocolEncoderOutput out)
                throws Exception

  Encodes higher-level message objects into binary or protocol-specific data. MINA invokes `encode(IoSession, Object, ProtocolEncoderOutput)` method with message which is popped from the session write queue, and then the encoder implementation puts encoded `ByteBuffer`s into `ProtocolEncoderOutput`.

  Throws:
    `Exception` - if the message violated protocol specification

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.