org.apache.mina.example.imagine.step1.codec
Class ImageRequestEncoder

java.lang.Object
  extended by org.apache.mina.example.imagine.step1.codec.ImageRequestEncoder
All Implemented Interfaces:
ProtocolEncoder

public class ImageRequestEncoder
extends java.lang.Object
implements ProtocolEncoder

an encoder for ImageRequest objects

Author:
Apache MINA Project

Constructor Summary
ImageRequestEncoder()
           
 
Method Summary
 void dispose(IoSession session)
          Releases all resources related with this encoder.
 void encode(IoSession session, java.lang.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

ImageRequestEncoder

public ImageRequestEncoder()
Method Detail

encode

public void encode(IoSession session,
                   java.lang.Object message,
                   ProtocolEncoderOutput out)
            throws java.lang.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 messages (typically IoBuffers) into ProtocolEncoderOutput.

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

dispose

public void dispose(IoSession session)
             throws java.lang.Exception
Description copied from interface: ProtocolEncoder
Releases all resources related with this encoder.

Specified by:
dispose in interface ProtocolEncoder
Throws:
java.lang.Exception - if failed to dispose all resources


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