org.apache.qpid.client
Class BasicMessageProducer

java.lang.Object
  extended by org.apache.qpid.client.Closeable
      extended by org.apache.qpid.client.BasicMessageProducer
All Implemented Interfaces:
javax.jms.MessageProducer

public class BasicMessageProducer
extends Closeable
implements MessageProducer


Field Summary
protected  AMQDestination _destination
          The Destination used for this consumer, if specified upon creation.
protected  org.apache.log4j.Logger _logger
           
 
Fields inherited from class org.apache.qpid.client.Closeable
_closed
 
Constructor Summary
protected BasicMessageProducer(AMQConnection connection, AMQDestination destination, boolean transacted, int channelId, AMQSession session, AMQProtocolHandler protocolHandler, long producerId, boolean immediate, boolean mandatory, boolean waitUntilSent)
           
 
Method Summary
 void close()
           
 int getDeliveryMode()
           
 javax.jms.Destination getDestination()
           
 boolean getDisableMessageID()
           
 boolean getDisableMessageTimestamp()
           
 int getPriority()
           
 long getTimeToLive()
           
 void send(javax.jms.Destination destination, javax.jms.Message message)
           
 void send(javax.jms.Destination destination, javax.jms.Message message, int deliveryMode, int priority, long timeToLive)
           
 void send(javax.jms.Destination destination, javax.jms.Message message, int deliveryMode, int priority, long timeToLive, boolean mandatory)
           
 void send(javax.jms.Destination destination, javax.jms.Message message, int deliveryMode, int priority, long timeToLive, boolean mandatory, boolean immediate)
           
 void send(javax.jms.Destination destination, javax.jms.Message message, int deliveryMode, int priority, long timeToLive, boolean mandatory, boolean immediate, boolean waitUntilSent)
           
 void send(javax.jms.Message message)
           
 void send(javax.jms.Message message, int deliveryMode)
           
 void send(javax.jms.Message message, int deliveryMode, boolean immediate)
           
 void send(javax.jms.Message message, int deliveryMode, int priority, long timeToLive)
           
protected  void sendImpl(AMQDestination destination, AbstractJMSMessage message, int deliveryMode, int priority, long timeToLive, boolean mandatory, boolean immediate)
           
protected  void sendImpl(AMQDestination destination, AbstractJMSMessage message, int deliveryMode, int priority, long timeToLive, boolean mandatory, boolean immediate, boolean wait)
          The caller of this method must hold the failover mutex.
 void setDeliveryMode(int i)
           
 void setDisableMessageID(boolean b)
           
 void setDisableMessageTimestamp(boolean b)
           
 void setEncoding(java.lang.String encoding)
           
 void setMimeType(java.lang.String mimeType)
           
 void setPriority(int i)
           
 void setTimeToLive(long l)
           
 
Methods inherited from class org.apache.qpid.client.Closeable
checkNotClosed, isClosed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

protected final org.apache.log4j.Logger _logger

_destination

protected AMQDestination _destination
The Destination used for this consumer, if specified upon creation.

Constructor Detail

BasicMessageProducer

protected BasicMessageProducer(AMQConnection connection,
                               AMQDestination destination,
                               boolean transacted,
                               int channelId,
                               AMQSession session,
                               AMQProtocolHandler protocolHandler,
                               long producerId,
                               boolean immediate,
                               boolean mandatory,
                               boolean waitUntilSent)
Method Detail

setDisableMessageID

public void setDisableMessageID(boolean b)
                         throws javax.jms.JMSException
Specified by:
setDisableMessageID in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

getDisableMessageID

public boolean getDisableMessageID()
                            throws javax.jms.JMSException
Specified by:
getDisableMessageID in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

setDisableMessageTimestamp

public void setDisableMessageTimestamp(boolean b)
                                throws javax.jms.JMSException
Specified by:
setDisableMessageTimestamp in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

getDisableMessageTimestamp

public boolean getDisableMessageTimestamp()
                                   throws javax.jms.JMSException
Specified by:
getDisableMessageTimestamp in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

setDeliveryMode

public void setDeliveryMode(int i)
                     throws javax.jms.JMSException
Specified by:
setDeliveryMode in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

getDeliveryMode

public int getDeliveryMode()
                    throws javax.jms.JMSException
Specified by:
getDeliveryMode in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

setPriority

public void setPriority(int i)
                 throws javax.jms.JMSException
Specified by:
setPriority in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

getPriority

public int getPriority()
                throws javax.jms.JMSException
Specified by:
getPriority in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

setTimeToLive

public void setTimeToLive(long l)
                   throws javax.jms.JMSException
Specified by:
setTimeToLive in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

getTimeToLive

public long getTimeToLive()
                   throws javax.jms.JMSException
Specified by:
getTimeToLive in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

getDestination

public javax.jms.Destination getDestination()
                                     throws javax.jms.JMSException
Specified by:
getDestination in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

close

public void close()
           throws javax.jms.JMSException
Specified by:
close in interface javax.jms.MessageProducer
Specified by:
close in class Closeable
Throws:
javax.jms.JMSException

send

public void send(javax.jms.Message message)
          throws javax.jms.JMSException
Specified by:
send in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

send

public void send(javax.jms.Message message,
                 int deliveryMode)
          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

send

public void send(javax.jms.Message message,
                 int deliveryMode,
                 boolean immediate)
          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

send

public void send(javax.jms.Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws javax.jms.JMSException
Specified by:
send in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

send

public void send(javax.jms.Destination destination,
                 javax.jms.Message message)
          throws javax.jms.JMSException
Specified by:
send in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

send

public void send(javax.jms.Destination destination,
                 javax.jms.Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws javax.jms.JMSException
Specified by:
send in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException

send

public void send(javax.jms.Destination destination,
                 javax.jms.Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive,
                 boolean mandatory)
          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

send

public void send(javax.jms.Destination destination,
                 javax.jms.Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive,
                 boolean mandatory,
                 boolean immediate)
          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

send

public void send(javax.jms.Destination destination,
                 javax.jms.Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive,
                 boolean mandatory,
                 boolean immediate,
                 boolean waitUntilSent)
          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

sendImpl

protected void sendImpl(AMQDestination destination,
                        AbstractJMSMessage message,
                        int deliveryMode,
                        int priority,
                        long timeToLive,
                        boolean mandatory,
                        boolean immediate)
                 throws javax.jms.JMSException
Throws:
javax.jms.JMSException

sendImpl

protected void sendImpl(AMQDestination destination,
                        AbstractJMSMessage message,
                        int deliveryMode,
                        int priority,
                        long timeToLive,
                        boolean mandatory,
                        boolean immediate,
                        boolean wait)
                 throws javax.jms.JMSException
The caller of this method must hold the failover mutex.

Parameters:
destination -
message -
deliveryMode -
priority -
timeToLive -
mandatory -
immediate -
Throws:
javax.jms.JMSException

setMimeType

public void setMimeType(java.lang.String mimeType)
                 throws javax.jms.JMSException
Throws:
javax.jms.JMSException

setEncoding

public void setEncoding(java.lang.String encoding)
                 throws javax.jms.JMSException,
                        java.io.UnsupportedEncodingException
Throws:
javax.jms.JMSException
java.io.UnsupportedEncodingException