Class AbstractRedisListenerEndpoint
java.lang.Object
org.springframework.data.redis.config.AbstractRedisListenerEndpoint
- All Implemented Interfaces:
Lifecycle, Phased, SmartLifecycle, RedisListenerEndpoint
- Direct Known Subclasses:
MethodRedisListenerEndpoint, SimpleRedisListenerEndpoint
public abstract class AbstractRedisListenerEndpoint
extends Object
implements RedisListenerEndpoint, SmartLifecycle
Base model for a Redis listener endpoint.
- Since:
- 4.1
- Author:
- Ilyass Bougati, Mark Paluch, Christoph Strobl
-
Field Summary
Fields inherited from interface SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract @Nullable MessageListenerCreate theMessageListenerfor this endpoint.protected StringBuilderReturn a description for this endpoint.getId()Return the id of this endpoint (possibly generated).@Nullable StringgetTopic()Return the name of the topic for this endpoint.booleanvoidregister(RedisMessageListenerContainer listenerContainer) Set up the specified message listener container with the model defined by this endpoint.voidSet a custom id for this endpoint.voidSet the name of the topic for this endpoint.voidstart()voidstop()toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface SmartLifecycle
getPhase, isAutoStartup, isPauseable, stop
-
Constructor Details
-
AbstractRedisListenerEndpoint
public AbstractRedisListenerEndpoint()
-
-
Method Details
-
setId
Set a custom id for this endpoint. -
getId
Return the id of this endpoint (possibly generated).- Specified by:
getIdin interfaceRedisListenerEndpoint
-
setTopic
Set the name of the topic for this endpoint. -
getTopic
Return the name of the topic for this endpoint. -
register
Description copied from interface:RedisListenerEndpointSet up the specified message listener container with the model defined by this endpoint.This endpoint must provide the requested missing option(s) of the specified container to make it usable. Usually, this is about setting the
destinationand themessageListenerto use but an implementation may override any default setting that was already set.- Specified by:
registerin interfaceRedisListenerEndpoint- Parameters:
listenerContainer- the listener container to configure
-
createListener
Create theMessageListenerfor this endpoint. -
start
-
stop
-
isRunning
-
getEndpointDescription
Return a description for this endpoint.Available to subclasses, for inclusion in their
toString()result. -
toString
-