Package io.micronaut.gcp.pubsub.bind
Class DefaultSubscriberFactory
- java.lang.Object
 - 
- io.micronaut.gcp.pubsub.bind.DefaultSubscriberFactory
 
 
- 
- All Implemented Interfaces:
 SubscriberFactory,java.lang.AutoCloseable
@Singleton public class DefaultSubscriberFactory extends java.lang.Object implements SubscriberFactory, java.lang.AutoCloseable
Default implementation ofSubscriberFactory.- Since:
 - 2.0.0
 - Author:
 - Vinicius Carvalho
 
 
- 
- 
Constructor Summary
Constructors Constructor Description DefaultSubscriberFactory(com.google.api.gax.rpc.TransportChannelProvider transportChannelProvider, com.google.api.gax.core.CredentialsProvider credentialsProvider, io.micronaut.context.BeanContext beanContext) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()com.google.cloud.pubsub.v1.SubscribercreateSubscriber(SubscriberFactoryConfig config)Creates anSubscriberInterfaceimplementation and register the receiver to it. 
 - 
 
- 
- 
Method Detail
- 
createSubscriber
public com.google.cloud.pubsub.v1.Subscriber createSubscriber(SubscriberFactoryConfig config)
Description copied from interface:SubscriberFactoryCreates anSubscriberInterfaceimplementation and register the receiver to it. Implementations should also handle start/stop life cycle events.- Specified by:
 createSubscriberin interfaceSubscriberFactory- Parameters:
 config- Configuration to createSubscriberinstances.- Returns:
 - An implementation of SubscriberInterface
 
 
- 
close
@PreDestroy public void close() throws java.lang.Exception- Specified by:
 closein interfacejava.lang.AutoCloseable- Throws:
 java.lang.Exception
 
 - 
 
 -