Package com.adaptris.google.cloud.pubsub
Class GoogleCloudPubSubProducer
- java.lang.Object
-
- com.adaptris.core.AdaptrisMessageWorkerImp
-
- com.adaptris.core.AdaptrisMessageProducerImp
-
- com.adaptris.core.ProduceOnlyProducerImp
-
- com.adaptris.google.cloud.pubsub.GoogleCloudPubSubProducer
-
- All Implemented Interfaces:
AdaptrisComponent
,AdaptrisMessageProducer
,AdaptrisMessageSender
,AdaptrisMessageWorker
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
@ComponentProfile(summary="Publish a message to Google pubsub", tag="producer,gcloud,messaging", recommended=GoogleCloudPubSubConnection.class) public class GoogleCloudPubSubProducer extends ProduceOnlyProducerImp
In the adapter configuration file this class is aliased as google-cloud-pubsub-producer which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
log
-
-
Constructor Summary
Constructors Constructor Description GoogleCloudPubSubProducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected void
doProduce(AdaptrisMessage adaptrisMessage, java.lang.String endpoint)
java.lang.String
endpoint(AdaptrisMessage msg)
java.lang.Boolean
getCreateTopic()
MetadataFilter
getMetadataFilter()
java.lang.Integer
getPublisherCacheLimit()
java.lang.String
getTopic()
The pubsub topicvoid
init()
void
prepare()
void
setCreateTopic(java.lang.Boolean createTopic)
void
setMetadataFilter(MetadataFilter metadataFilter)
void
setPublisherCacheLimit(java.lang.Integer publisherCacheLimit)
void
setTopic(java.lang.String topic)
The pubsub topic<T extends GoogleCloudPubSubProducer>
TwithTopic(java.lang.String s)
-
Methods inherited from class com.adaptris.core.ProduceOnlyProducerImp
produce, request, request
-
Methods inherited from class com.adaptris.core.AdaptrisMessageProducerImp
createName
-
Methods inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory, withUniqueID
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.AdaptrisMessageWorker
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactory
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
start, stop
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createQualifier, isTrackingEndpoint
-
-
-
-
Method Detail
-
doProduce
protected void doProduce(AdaptrisMessage adaptrisMessage, java.lang.String endpoint) throws ProduceException
- Specified by:
doProduce
in classProduceOnlyProducerImp
- Throws:
ProduceException
-
prepare
public void prepare() throws CoreException
- Throws:
CoreException
-
init
public void init() throws CoreException
- Throws:
CoreException
-
close
public void close()
-
withTopic
public <T extends GoogleCloudPubSubProducer> T withTopic(java.lang.String s)
-
endpoint
public java.lang.String endpoint(AdaptrisMessage msg) throws ProduceException
- Specified by:
endpoint
in classAdaptrisMessageProducerImp
- Throws:
ProduceException
-
getCreateTopic
public java.lang.Boolean getCreateTopic()
-
setCreateTopic
public void setCreateTopic(java.lang.Boolean createTopic)
-
getPublisherCacheLimit
public java.lang.Integer getPublisherCacheLimit()
-
setPublisherCacheLimit
public void setPublisherCacheLimit(java.lang.Integer publisherCacheLimit)
-
getMetadataFilter
public MetadataFilter getMetadataFilter()
-
setMetadataFilter
public void setMetadataFilter(MetadataFilter metadataFilter)
-
getTopic
public java.lang.String getTopic()
The pubsub topic
-
setTopic
public void setTopic(java.lang.String topic)
The pubsub topic
-
-