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

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

public class ImageCodecFactory
extends Object
implements ProtocolCodecFactory

a ProtocolCodecFactory for the tutorial on how to write a protocol codec

Author:
Apache MINA Project

Constructor Summary
ImageCodecFactory(boolean client)
           
 
Method Summary
 ProtocolDecoder getDecoder(IoSession ioSession)
          Returns a new (or reusable) instance of ProtocolDecoder which decodes binary or protocol-specific data into message objects.
 ProtocolEncoder getEncoder(IoSession ioSession)
          Returns a new (or reusable) instance of ProtocolEncoder which encodes 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

ImageCodecFactory

public ImageCodecFactory(boolean client)
Method Detail

getEncoder

public ProtocolEncoder getEncoder(IoSession ioSession)
                           throws Exception
Description copied from interface: ProtocolCodecFactory
Returns a new (or reusable) instance of ProtocolEncoder which encodes message objects into binary or protocol-specific data.

Specified by:
getEncoder in interface ProtocolCodecFactory
Throws:
Exception

getDecoder

public ProtocolDecoder getDecoder(IoSession ioSession)
                           throws Exception
Description copied from interface: ProtocolCodecFactory
Returns a new (or reusable) instance of ProtocolDecoder which decodes binary or protocol-specific data into message objects.

Specified by:
getDecoder in interface ProtocolCodecFactory
Throws:
Exception


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