Package net.jodah.lyra.config
Interface ConnectionConfig
- All Superinterfaces:
ChannelConfig
,ConsumerConfig
- All Known Subinterfaces:
ConfigurableConnection
- All Known Implementing Classes:
Config
public interface ConnectionConfig extends ChannelConfig
Connection
related configuration.-
Method Summary
Modifier and Type Method Description java.util.Collection<ConnectionListener>
getConnectionListeners()
Returns the connection's listeners else empty list if none were configured.RecoveryPolicy
getConnectionRecoveryPolicy()
Returns the connection's recovery policy.RetryPolicy
getConnectionRetryPolicy()
Returns the connection's retry policy.boolean
isUsingDaemonThreads()
Whether or not using daemon threads.ConnectionConfig
withConnectionListeners(ConnectionListener... connectionListeners)
Sets theconnectionListeners
to call on connection related events.ConnectionConfig
withConnectionRecoveryPolicy(RecoveryPolicy recoveryPolicy)
Sets the policy to use for the recovery of Connections after an unexpected Connection closure.ConnectionConfig
withConnectionRetryPolicy(RetryPolicy retryPolicy)
Sets the policy to use for handlingConnection
invocation errors.ConnectionConfig
withUseDaemonThreads(boolean useDaemonThreads)
Whether or not using daemon threads.Methods inherited from interface net.jodah.lyra.config.ChannelConfig
getChannelListeners, getChannelRecoveryPolicy, getChannelRetryPolicy, isExchangeRecoveryEnabled, isQueueRecoveryEnabled, withChannelListeners, withChannelRecoveryPolicy, withChannelRetryPolicy, withExchangeRecovery, withQueueRecovery
Methods inherited from interface net.jodah.lyra.config.ConsumerConfig
getConsumerListeners, isConsumerRecoveryEnabled, withConsumerListeners, withConsumerRecovery
-
Method Details
-
getConnectionListeners
java.util.Collection<ConnectionListener> getConnectionListeners()Returns the connection's listeners else empty list if none were configured. -
getConnectionRecoveryPolicy
RecoveryPolicy getConnectionRecoveryPolicy()Returns the connection's recovery policy. -
getConnectionRetryPolicy
RetryPolicy getConnectionRetryPolicy()Returns the connection's retry policy.- See Also:
withConnectionRetryPolicy(RetryPolicy)
-
isUsingDaemonThreads
boolean isUsingDaemonThreads()Whether or not using daemon threads. -
withConnectionListeners
Sets theconnectionListeners
to call on connection related events. -
withConnectionRecoveryPolicy
Sets the policy to use for the recovery of Connections after an unexpected Connection closure. -
withConnectionRetryPolicy
Sets the policy to use for handlingConnection
invocation errors. -
withUseDaemonThreads
Whether or not using daemon threads. Default is false.
-