org.apache.qpid.codec
Class AMQEncoder

java.lang.Object
  extended by org.apache.qpid.codec.AMQEncoder
All Implemented Interfaces:
org.apache.mina.filter.codec.ProtocolEncoder

public class AMQEncoder
extends Object
implements org.apache.mina.filter.codec.ProtocolEncoder

AMQEncoder delegates encoding of AMQP to a data encoder.

CRC Card
Responsibilities Collaborations
Delegate AMQP encoding. AMQDataBlockEncoder

Todo:
This class just delegates to another, so seems to be pointless. Unless it is going to handle some responsibilities in the future, then drop it.

Constructor Summary
AMQEncoder()
           
 
Method Summary
 void dispose(org.apache.mina.common.IoSession session)
          Does nothing.
 void encode(org.apache.mina.common.IoSession session, Object message, org.apache.mina.filter.codec.ProtocolEncoderOutput out)
          Encodes AMQP.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AMQEncoder

public AMQEncoder()
Method Detail

encode

public void encode(org.apache.mina.common.IoSession session,
                   Object message,
                   org.apache.mina.filter.codec.ProtocolEncoderOutput out)
            throws Exception
Encodes AMQP.

Specified by:
encode in interface org.apache.mina.filter.codec.ProtocolEncoder
Parameters:
session - The Mina session.
message - The data object to encode.
out - The Mina writer to output the raw byte data to.
Throws:
Exception - If the data cannot be encoded for any reason.

dispose

public void dispose(org.apache.mina.common.IoSession session)
Does nothing. Called by Mina to allow this to clean up resources when it is no longer needed.

Specified by:
dispose in interface org.apache.mina.filter.codec.ProtocolEncoder
Parameters:
session - The Mina session.


Licensed to the Apache Software Foundation