org.apache.mina.codec.delimited.serialization

## Class ThriftDynamicMessageDecoder

- java.lang.Object
- - org.apache.mina.codec.delimited.IoBufferDecoder<ThriftDynamicMessageDecoder.ThriftSerializedMessage>
  - - org.apache.mina.codec.delimited.serialization.ThriftDynamicMessageDecoder

- All Implemented Interfaces:
    ProtocolDecoder<IoBuffer,ThriftDynamicMessageDecoder.ThriftSerializedMessage,Void>, StatelessProtocolDecoder<IoBuffer,ThriftDynamicMessageDecoder.ThriftSerializedMessage>

      public class ThriftDynamicMessageDecoder
      extends IoBufferDecoder<ThriftDynamicMessageDecoder.ThriftSerializedMessage>

  Author:
    Apache MINA Project

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ThriftDynamicMessageDecoder.ThriftSerializedMessage`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ThriftDynamicMessageDecoder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ThriftDynamicMessageDecoder.ThriftSerializedMessage` | `decode(IoBuffer buffer)` Decodes a message from a `IoBuffer` When a truncated input is given to this method it may return null.
    `static ThriftDynamicMessageDecoder` | `newInstance()`

    - ### Methods inherited from class org.apache.mina.codec.delimited.IoBufferDecoder

      `createDecoderState, decode, finishDecode`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ThriftDynamicMessageDecoder

          public ThriftDynamicMessageDecoder()

  - ### Method Detail

    - #### decode

          public ThriftDynamicMessageDecoder.ThriftSerializedMessage decode(IoBuffer buffer)

      Description copied from class: `IoBufferDecoder`
      Decodes a message from a `IoBuffer`

      When a truncated input is given to this method it may return null. Not all decoder will be able to detect this issue and report it that way. Thanks to prefixing of messages, decoder will only receive appropriately sized ByteBuffers.

      n.b. The decoders used for the prefixing (i.e. `RawInt32` and `VarInt`) have to detect truncated ByteBuffers.

      Specified by:
        `decode` in class `IoBufferDecoder<ThriftDynamicMessageDecoder.ThriftSerializedMessage>`
      Parameters:
        `buffer` - data to be decoded as a TYPE message
      Returns:
        the decoded message on success, null otherwise

    - #### newInstance

          public static ThriftDynamicMessageDecoder newInstance()

Copyright © 2009–2013 Apache MINA Project. All rights reserved.