@Singleton public class DefaultSubscriberFactory extends java.lang.Object implements SubscriberFactory, java.lang.AutoCloseable
SubscriberFactory.| Constructor and Description |
|---|
DefaultSubscriberFactory(com.google.api.gax.rpc.TransportChannelProvider transportChannelProvider,
com.google.api.gax.core.CredentialsProvider credentialsProvider,
io.micronaut.context.BeanContext beanContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
com.google.cloud.pubsub.v1.Subscriber |
createSubscriber(SubscriberFactoryConfig config)
Creates an
SubscriberInterface implementation and register the receiver to it. |
public DefaultSubscriberFactory(com.google.api.gax.rpc.TransportChannelProvider transportChannelProvider,
com.google.api.gax.core.CredentialsProvider credentialsProvider,
io.micronaut.context.BeanContext beanContext)
public com.google.cloud.pubsub.v1.Subscriber createSubscriber(SubscriberFactoryConfig config)
SubscriberFactorySubscriberInterface implementation and register the receiver to it. Implementations should also
handle start/stop life cycle events.createSubscriber in interface SubscriberFactoryconfig - Configuration to create Subscriber instances.@PreDestroy
public void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exception