public abstract class AmqpProducer extends AmqpAbstractResource<JmsProducerInfo,org.apache.qpid.proton.engine.Sender>
Modifier and Type | Field and Description |
---|---|
protected AmqpConnection |
connection |
protected boolean |
presettle |
protected AmqpSession |
session |
closeRequest, closeTimeoutTask
Constructor and Description |
---|
AmqpProducer(AmqpSession session,
JmsProducerInfo info) |
AmqpProducer(AmqpSession session,
JmsProducerInfo info,
org.apache.qpid.proton.engine.Sender endpoint) |
Modifier and Type | Method and Description |
---|---|
JmsProducerId |
getProducerId() |
abstract boolean |
isAnonymous() |
boolean |
isPresettle() |
abstract boolean |
send(JmsOutboundMessageDispatch envelope,
AsyncResult request)
Sends the given message
|
void |
setPresettle(boolean presettle)
Sets whether the producer will presettle all messages that it sends.
|
close, closeOrDetachEndpoint, getEndpoint, getLocalState, getParent, getRemoteState, getResourceInfo, isAwaitingClose, isClosed, isOpen, processDeliveryUpdates, processFlowUpdates, processRemoteClose, processRemoteDetach, processRemoteOpen, remotelyClosed, resourceClosed
protected final AmqpSession session
protected final AmqpConnection connection
protected boolean presettle
public AmqpProducer(AmqpSession session, JmsProducerInfo info)
public AmqpProducer(AmqpSession session, JmsProducerInfo info, org.apache.qpid.proton.engine.Sender endpoint)
public abstract boolean send(JmsOutboundMessageDispatch envelope, AsyncResult request) throws IOException, javax.jms.JMSException
envelope
- The envelope that contains the message and it's targeted destination.request
- The AsyncRequest that will be notified on send success or failure.IOException
- if an error occurs sending the messagejavax.jms.JMSException
- if an error occurs while preparing the message for send.public abstract boolean isAnonymous()
public JmsProducerId getProducerId()
public boolean isPresettle()
public void setPresettle(boolean presettle)
presettle
- true if all messages are sent settled.Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.