Class DefaultSenderController
- java.lang.Object
-
- org.apache.activemq.artemis.protocol.amqp.proton.DefaultSenderController
-
- All Implemented Interfaces:
SenderController
public class DefaultSenderController extends Object implements SenderController
The defaultSenderControllerinstance used by and sender context that is not assigned a custom controller. This controller is extensible so that specialized sender controllers can be created from it.The default controller works best with incoming AMQP clients and JMS over AMQP clients. For intra-broker connections it is likely that a custom sender controller would be a more flexible option that using the default controller.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.activemq.artemis.protocol.amqp.proton.SenderController
SenderController.RejectingOutgoingMessageWriter
-
-
Field Summary
-
Fields inherited from interface org.apache.activemq.artemis.protocol.amqp.proton.SenderController
REJECTING_MESSAGE_WRITER
-
-
Constructor Summary
Constructors Constructor Description DefaultSenderController(AMQPSessionContext session, org.apache.qpid.proton.engine.Sender protonSender, String clientId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Handle close of the sever sender AMQP resources.protected SimpleStringgetMatchingQueue(SimpleString queueName, SimpleString address, RoutingType routingType, SimpleString filter, boolean matchFilter)org.apache.activemq.artemis.core.server.Consumerinit(ProtonServerSenderContext senderContext)Initialize sender controller state and handle open of AMQP sender resourcesMessageWriterselectOutgoingMessageWriter(ProtonServerSenderContext sender, org.apache.activemq.artemis.core.server.MessageReference reference)Controller selects a outgoing delivery writer that will handle the encoding and writing of the targetMessagecarried in the givenMessageReference.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.protocol.amqp.proton.SenderController
close
-
-
-
-
Constructor Detail
-
DefaultSenderController
public DefaultSenderController(AMQPSessionContext session, org.apache.qpid.proton.engine.Sender protonSender, String clientId)
-
-
Method Detail
-
init
public org.apache.activemq.artemis.core.server.Consumer init(ProtonServerSenderContext senderContext) throws Exception
Description copied from interface:SenderControllerInitialize sender controller state and handle open of AMQP sender resources- Specified by:
initin interfaceSenderController- Parameters:
senderContext- The sender context that is requesting controller initialization.- Returns:
- a server consumer that has been initialize by the controller.
- Throws:
Exception- if an error occurs during initialization.
-
close
public void close() throws ExceptionDescription copied from interface:SenderControllerHandle close of the sever sender AMQP resources.- Specified by:
closein interfaceSenderController- Throws:
Exception- if an error occurs during close.
-
selectOutgoingMessageWriter
public MessageWriter selectOutgoingMessageWriter(ProtonServerSenderContext sender, org.apache.activemq.artemis.core.server.MessageReference reference)
Description copied from interface:SenderControllerController selects a outgoing delivery writer that will handle the encoding and writing of the targetMessagecarried in the givenMessageReference. The selection process should take into account how the message pre-processing will mutate the outgoing message. The default implementation performs no caching of writers and should be overridden in subclasses to reduce GC churn, the default version is suitable for tests.- Specified by:
selectOutgoingMessageWriterin interfaceSenderController- Parameters:
sender- The server sender that will make use of the returned delivery context.reference- The message that must be sent using an outgoing context- Returns:
- an
MessageWriterto use when sending the message in the reference.
-
getMatchingQueue
protected SimpleString getMatchingQueue(SimpleString queueName, SimpleString address, RoutingType routingType, SimpleString filter, boolean matchFilter) throws Exception
- Throws:
Exception
-
-