com.caucho.amqp.marshal
Class AbstractMessageEncoder<T>

java.lang.Object
  extended by com.caucho.amqp.marshal.AbstractMessageEncoder<T>
All Implemented Interfaces:
AmqpMessageEncoder<T>
Direct Known Subclasses:
AmqpEnvelopeEncoder, AmqpJmsEncoder, AmqpStringEncoder

public abstract class AbstractMessageEncoder<T>
extends java.lang.Object
implements AmqpMessageEncoder<T>

encoding a message


Constructor Summary
AbstractMessageEncoder()
           
 
Method Summary
 void encode(AmqpWriter out, MessagePropertiesFactory<T> factory, T value)
           
protected  void encodeApplicationProperties(AmqpWriter out, MessagePropertiesFactory<T> factory, T value)
           
abstract  void encodeData(AmqpWriter out, T value)
           
protected  void encodeDeliveryAnnotations(AmqpWriter out, MessagePropertiesFactory<T> factory, T value)
           
protected  void encodeFooters(AmqpWriter out, MessagePropertiesFactory<T> factory, T value)
           
protected  void encodeMessageAnnotations(AmqpWriter out, MessagePropertiesFactory<T> factory, T value)
           
protected  void encodeProperties(AmqpWriter out, MessagePropertiesFactory<T> factory, T value)
           
 java.lang.String getContentType(T value)
           
 int getPriority(MessagePropertiesFactory<T> factory, T value)
           
 long getTimeToLive(MessagePropertiesFactory<T> factory, T value)
           
 boolean isDurable(MessagePropertiesFactory<T> factory, T value)
           
 boolean isFirstAcquirer(MessagePropertiesFactory<T> factory, T value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMessageEncoder

public AbstractMessageEncoder()
Method Detail

isDurable

public boolean isDurable(MessagePropertiesFactory<T> factory,
                         T value)
Specified by:
isDurable in interface AmqpMessageEncoder<T>

getPriority

public int getPriority(MessagePropertiesFactory<T> factory,
                       T value)
Specified by:
getPriority in interface AmqpMessageEncoder<T>

getTimeToLive

public long getTimeToLive(MessagePropertiesFactory<T> factory,
                          T value)
Specified by:
getTimeToLive in interface AmqpMessageEncoder<T>

isFirstAcquirer

public boolean isFirstAcquirer(MessagePropertiesFactory<T> factory,
                               T value)
Specified by:
isFirstAcquirer in interface AmqpMessageEncoder<T>

getContentType

public java.lang.String getContentType(T value)
Specified by:
getContentType in interface AmqpMessageEncoder<T>

encode

public void encode(AmqpWriter out,
                   MessagePropertiesFactory<T> factory,
                   T value)
            throws java.io.IOException
Specified by:
encode in interface AmqpMessageEncoder<T>
Throws:
java.io.IOException

encodeDeliveryAnnotations

protected void encodeDeliveryAnnotations(AmqpWriter out,
                                         MessagePropertiesFactory<T> factory,
                                         T value)
                                  throws java.io.IOException
Throws:
java.io.IOException

encodeMessageAnnotations

protected void encodeMessageAnnotations(AmqpWriter out,
                                        MessagePropertiesFactory<T> factory,
                                        T value)
                                 throws java.io.IOException
Throws:
java.io.IOException

encodeProperties

protected void encodeProperties(AmqpWriter out,
                                MessagePropertiesFactory<T> factory,
                                T value)
                         throws java.io.IOException
Throws:
java.io.IOException

encodeApplicationProperties

protected void encodeApplicationProperties(AmqpWriter out,
                                           MessagePropertiesFactory<T> factory,
                                           T value)
                                    throws java.io.IOException
Throws:
java.io.IOException

encodeData

public abstract void encodeData(AmqpWriter out,
                                T value)
                         throws java.io.IOException
Specified by:
encodeData in interface AmqpMessageEncoder<T>
Throws:
java.io.IOException

encodeFooters

protected void encodeFooters(AmqpWriter out,
                             MessagePropertiesFactory<T> factory,
                             T value)
                      throws java.io.IOException
Throws:
java.io.IOException