public class CachingPublisherFactory extends Object implements PublisherFactory
PublisherFactory.
Creates Publishers for topics once using delegate, caches and reuses them.
| Constructor and Description |
|---|
CachingPublisherFactory(PublisherFactory delegate)
Constructs a caching
PublisherFactory using the delegate. |
| Modifier and Type | Method and Description |
|---|---|
Publisher |
createPublisher(String topic)
Creates a
Publisher for a given topic. |
PublisherFactory |
getDelegate()
Returns the delegate.
|
public CachingPublisherFactory(PublisherFactory delegate)
PublisherFactory using the delegate.delegate - a PublisherFactory that needs to be cachecd.public Publisher createPublisher(String topic)
PublisherFactoryPublisher for a given topic.createPublisher in interface PublisherFactorytopic - destination topicpublic PublisherFactory getDelegate()
Copyright © 2022. All rights reserved.