Class AbstractAmqpListenerEndpoint
java.lang.Object
org.springframework.amqp.client.config.AbstractAmqpListenerEndpoint
- All Implemented Interfaces:
AmqpListenerEndpoint
- Direct Known Subclasses:
MethodAmqpListenerEndpoint, SimpleAmqpListenerEndpoint
The abstract
AmqpListenerEndpoint implementation holding common properties.- Since:
- 4.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]Return the AMQP addresses to listen to.org.aopalliance.aop.Advice @Nullable []The advice chain for the target listener container bean.@Nullable BooleanOverride theautoAcceptproperty in theAmqpMessageListenerContainerFactory.@Nullable BooleanOverride of the defaultautoStartupproperty from theAmqpMessageListenerContainerFactory.@Nullable IntegerReturn the concurrency (consumers per AMQP address) for the target listener container bean.@Nullable DurationThe graceful shutdown period for the target listener container bean.@Nullable StringgetId()Return the id of the target listener container bean.@Nullable IntegerThe initial number of credits to grant to the AMQP receiver.@Nullable DurationThereceiveTimeoutfor the target listener container bean.@Nullable ExecutorGet the task executor for the target listener container bean.voidsetAdviceChain(org.aopalliance.aop.Advice... adviceChain) voidsetAutoAccept(boolean autoAccept) voidsetAutoStartup(boolean autoStartup) voidsetConcurrency(int concurrency) voidsetGracefulShutdownPeriod(Duration gracefulShutdownPeriod) voidvoidsetInitialCredits(int initialCredits) voidsetReceiveTimeout(Duration receiveTimeout) voidsetTaskExecutor(Executor taskExecutor) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AmqpListenerEndpoint
getMessageListener
-
Constructor Details
-
AbstractAmqpListenerEndpoint
-
-
Method Details
-
getAddresses
Description copied from interface:AmqpListenerEndpointReturn the AMQP addresses to listen to.- Specified by:
getAddressesin interfaceAmqpListenerEndpoint- Returns:
- the addresses.
-
setId
-
getId
Description copied from interface:AmqpListenerEndpointReturn the id of the target listener container bean. If not provided, theAmqpListenerEndpointRegistrymakes a decision about generated bean name.- Specified by:
getIdin interfaceAmqpListenerEndpoint- Returns:
- the id
-
setConcurrency
public void setConcurrency(int concurrency) -
getConcurrency
Description copied from interface:AmqpListenerEndpointReturn the concurrency (consumers per AMQP address) for the target listener container bean. TheAmqpMessageListenerContainerFactoryconfiguration is used by default.- Specified by:
getConcurrencyin interfaceAmqpListenerEndpoint- Returns:
- the concurrency
-
setAutoStartup
public void setAutoStartup(boolean autoStartup) -
getAutoStartup
Description copied from interface:AmqpListenerEndpointOverride of the defaultautoStartupproperty from theAmqpMessageListenerContainerFactory.- Specified by:
getAutoStartupin interfaceAmqpListenerEndpoint- Returns:
- the autoStartup.
-
setTaskExecutor
-
getTaskExecutor
Description copied from interface:AmqpListenerEndpointGet the task executor for the target listener container bean. Overrides any executor set on theAmqpMessageListenerContainerFactory.- Specified by:
getTaskExecutorin interfaceAmqpListenerEndpoint- Returns:
- the executor.
-
setAutoAccept
public void setAutoAccept(boolean autoAccept) -
getAutoAccept
Description copied from interface:AmqpListenerEndpointOverride theautoAcceptproperty in theAmqpMessageListenerContainerFactory.- Specified by:
getAutoAcceptin interfaceAmqpListenerEndpoint- Returns:
- true if auto-accept is enabled.
-
setInitialCredits
public void setInitialCredits(int initialCredits) -
getInitialCredits
Description copied from interface:AmqpListenerEndpointThe initial number of credits to grant to the AMQP receiver. Override theinitialCreditsproperty in theAmqpMessageListenerContainerFactory.- Specified by:
getInitialCreditsin interfaceAmqpListenerEndpoint- Returns:
- number of initial credits
-
setReceiveTimeout
-
getReceiveTimeout
Description copied from interface:AmqpListenerEndpointThereceiveTimeoutfor the target listener container bean.- Specified by:
getReceiveTimeoutin interfaceAmqpListenerEndpoint- Returns:
- the timeout for receiving messages.
-
setGracefulShutdownPeriod
-
getGracefulShutdownPeriod
Description copied from interface:AmqpListenerEndpointThe graceful shutdown period for the target listener container bean.- Specified by:
getGracefulShutdownPeriodin interfaceAmqpListenerEndpoint- Returns:
- the graceful shutdown period.
-
setAdviceChain
public void setAdviceChain(org.aopalliance.aop.Advice... adviceChain) -
getAdviceChain
public org.aopalliance.aop.Advice @Nullable [] getAdviceChain()Description copied from interface:AmqpListenerEndpointThe advice chain for the target listener container bean.- Specified by:
getAdviceChainin interfaceAmqpListenerEndpoint- Returns:
- the advice chain.
-