Interface SenderController
-
- All Known Implementing Classes:
AMQPFederationAddressSenderController,AMQPFederationBaseSenderController,AMQPFederationCommandDispatcher,AMQPFederationEventDispatcher,AMQPFederationQueueSenderController,DefaultSenderController
public interface SenderController
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSenderController.RejectingOutgoingMessageWriter
-
Field Summary
Fields Modifier and Type Field Description static MessageWriterREJECTING_MESSAGE_WRITERUsed as an initial state for message writers in controllers to ensure that a valid version is chosen when a message is dispatched.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclose()Handle close of the sever sender AMQP resources.default voidclose(org.apache.qpid.proton.amqp.transport.ErrorCondition error)Called when the sender is being locally closed due to some error or forced shutdown due to resource deletion etc.org.apache.activemq.artemis.core.server.Consumerinit(ProtonServerSenderContext senderContext)Initialize sender controller state and handle open of AMQP sender resourcesdefault MessageWriterselectOutgoingMessageWriter(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.
-
-
-
Field Detail
-
REJECTING_MESSAGE_WRITER
static final MessageWriter REJECTING_MESSAGE_WRITER
Used as an initial state for message writers in controllers to ensure that a valid version is chosen when a message is dispatched.
-
-
Method Detail
-
init
org.apache.activemq.artemis.core.server.Consumer init(ProtonServerSenderContext senderContext) throws Exception
Initialize sender controller state and handle open of AMQP sender resources- 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
void close() throws ExceptionHandle close of the sever sender AMQP resources.- Throws:
Exception- if an error occurs during close.
-
close
default void close(org.apache.qpid.proton.amqp.transport.ErrorCondition error)
Called when the sender is being locally closed due to some error or forced shutdown due to resource deletion etc. The default implementation of this API does nothing in response to this call.- Parameters:
error- The error condition that triggered the close.
-
selectOutgoingMessageWriter
default MessageWriter selectOutgoingMessageWriter(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. 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.- 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.
-
-