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.netty
Class NettyEncoder

    java.lang.Object
      org.apache.mina.filter.codec.netty.NettyEncoder

All Implemented Interfaces:
  ProtocolEncoder

    public class NettyEncoder

extends Object
implements ProtocolEncoder

A MINA `ProtocolEncoder` that encodes Netty2 `Message`s into byte buffers.

Version:
  $Rev: 555855 $, $Date: 2007-07-13 12:19:00 +0900 (Fri, 13 Jul 2007) $,
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)

Constructor Summary
`NettyEncoder()` Creates a new instance.

Method Summary
`void` | `dispose(IoSession session)` Releases all resources related with this encoder.
`void` | `encode(IoSession session, Object message, ProtocolEncoderOutput out)` Encodes higher-level message objects into binary or protocol-specific data.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NettyEncoder

    public NettyEncoder()

  Creates a new instance.

Method Detail

### encode

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

  Description copied from interface: `ProtocolEncoder`
  Encodes higher-level message objects into binary or protocol-specific data. MINA invokes `ProtocolEncoder.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`.

  Specified by:
    `encode` in interface `ProtocolEncoder`
  Throws:
    `Exception` - if the message violated protocol specification

### dispose

    public void dispose(IoSession session)
                 throws Exception

  Description copied from interface: `ProtocolEncoder`
  Releases all resources related with this encoder.

  Specified by:
    `dispose` in interface `ProtocolEncoder`
  Throws:
    `Exception` - if failed to dispose all resources

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.