Class AmqpAnonymousFallbackProducer
java.lang.Object
org.apache.qpid.jms.provider.amqp.AmqpAbstractResource<JmsProducerInfo,org.apache.qpid.proton.engine.Sender>
org.apache.qpid.jms.provider.amqp.AmqpProducer
org.apache.qpid.jms.provider.amqp.AmqpAnonymousFallbackProducer
- All Implemented Interfaces:
AmqpEventSink,AmqpResource
Handles the case of anonymous JMS MessageProducers.
In order to simulate the anonymous producer we must create a sender for each message
send attempt and close it following a successful send.
-
Field Summary
Fields inherited from class org.apache.qpid.jms.provider.amqp.AmqpProducer
delayedDeliverySupported, presettle, sessionFields inherited from class org.apache.qpid.jms.provider.amqp.AmqpAbstractResource
closeRequest, closeTimeoutTask -
Constructor Summary
ConstructorsConstructorDescriptionAmqpAnonymousFallbackProducer(AmqpSession session, JmsProducerInfo info) Creates the Anonymous Producer object. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(AsyncResult request) org.apache.qpid.proton.engine.EndpointStateorg.apache.qpid.proton.engine.EndpointStatebooleanvoidsend(JmsOutboundMessageDispatch envelope, AsyncResult request) Sends the given messageMethods inherited from class org.apache.qpid.jms.provider.amqp.AmqpProducer
getProducerId, isPresettle, setDelayedDeliverySupported, setPresettleMethods inherited from class org.apache.qpid.jms.provider.amqp.AmqpAbstractResource
closeOrDetachEndpoint, closeResource, getEndpoint, getParent, getResourceInfo, handleResourceClosure, isAwaitingClose, isClosed, isOpen, processDeliveryUpdates, processFlowUpdates, processRemoteClose, processRemoteDetach, processRemoteOpen
-
Constructor Details
-
AmqpAnonymousFallbackProducer
Creates the Anonymous Producer object.- Parameters:
session- the session that owns this producerinfo- the JmsProducerInfo for this producer.
-
-
Method Details
-
send
Description copied from class:AmqpProducerSends the given message- Specified by:
sendin classAmqpProducer- Parameters:
envelope- The envelope that contains the message and it's targeted destination.request- The AsyncRequest that will be notified on send success or failure.- Throws:
ProviderException- if an error occurs sending the message
-
close
- Overrides:
closein classAmqpAbstractResource<JmsProducerInfo,org.apache.qpid.proton.engine.Sender>
-
isAnonymous
public boolean isAnonymous()- Specified by:
isAnonymousin classAmqpProducer- Returns:
- true if this is an anonymous producer or false if fixed to a given destination.
-
getLocalState
public org.apache.qpid.proton.engine.EndpointState getLocalState()- Overrides:
getLocalStatein classAmqpAbstractResource<JmsProducerInfo,org.apache.qpid.proton.engine.Sender>
-
getRemoteState
public org.apache.qpid.proton.engine.EndpointState getRemoteState()- Overrides:
getRemoteStatein classAmqpAbstractResource<JmsProducerInfo,org.apache.qpid.proton.engine.Sender>
-