public abstract class AbstractPublisherJMS<T> extends Object implements Publisher<T>
| Constructor and Description |
|---|
AbstractPublisherJMS() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
doPublish(String tenantId,
List<T> items,
String subscriber,
int retryCount,
long delay)
This method publishes the supplied items.
|
protected abstract String |
getDestinationURI()
This method returns the destination associated with the publisher.
|
int |
getInitialRetryCount() |
void |
init() |
void |
publish(String tenantId,
List<T> items) |
void |
publish(String tenantId,
List<T> items,
int retryCount,
long delay) |
void |
retry(String tenantId,
List<T> items,
String subscriber,
int retryCount,
long delay) |
void |
setInitialRetryCount(int initialRetryCount) |
void |
setMetricHandler(PublisherMetricHandler<T> handler) |
protected abstract String getDestinationURI()
public int getInitialRetryCount()
getInitialRetryCount in interface Publisher<T>public void setInitialRetryCount(int initialRetryCount)
initialRetryCount - the initialRetryCount to set@PostConstruct public void init()
protected void doPublish(String tenantId, List<T> items, String subscriber, int retryCount, long delay) throws Exception
tenantId - The tenant iditems - The itemssubscriber - The optional subscriber nameretryCount - The retry countdelay - The delayException - Failed to publishpublic void publish(String tenantId, List<T> items, int retryCount, long delay) throws Exception
public void retry(String tenantId, List<T> items, String subscriber, int retryCount, long delay) throws Exception
@PreDestroy public void close()
public void setMetricHandler(PublisherMetricHandler<T> handler)
setMetricHandler in interface Publisher<T>Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.