Class SnsConnector
- java.lang.Object
-
- io.smallrye.reactive.messaging.aws.sns.SnsConnector
-
- All Implemented Interfaces:
ConnectorFactory
,IncomingConnectorFactory
,OutgoingConnectorFactory
@ApplicationScoped public class SnsConnector extends Object implements IncomingConnectorFactory, OutgoingConnectorFactory
Implement incoming/outgoing connection factories for Amazon Simple Notification Service reactive messaging.- Author:
- iabughosh
-
-
Field Summary
-
Fields inherited from interface org.eclipse.microprofile.reactive.messaging.spi.ConnectorFactory
CHANNEL_NAME_ATTRIBUTE, CONNECTOR_ATTRIBUTE, CONNECTOR_PREFIX, INCOMING_PREFIX, OUTGOING_PREFIX
-
-
Constructor Summary
Constructors Constructor Description SnsConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<? extends Message<?>>
getPublisherBuilder(org.eclipse.microprofile.config.Config config)
Creates a channel for the given configuration.org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder<? extends Message<?>,Void>
getSubscriberBuilder(org.eclipse.microprofile.config.Config config)
Creates a channel for the given configuration.void
initConnector()
void
preDestroy()
Its being invoked before bean being destroyed.
-
-
-
Method Detail
-
initConnector
@PostConstruct public void initConnector()
-
preDestroy
@PreDestroy public void preDestroy()
Its being invoked before bean being destroyed.
-
getSubscriberBuilder
public org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder<? extends Message<?>,Void> getSubscriberBuilder(org.eclipse.microprofile.config.Config config)
Description copied from interface:OutgoingConnectorFactory
Creates a channel for the given configuration. The channel's configuration is associated with a specificconnector
, using theConnector
qualifier's parameter indicating a key to whichOutgoing
to use.Note that the connection to the transport or broker is generally postponed until the subscription.
- Specified by:
getSubscriberBuilder
in interfaceOutgoingConnectorFactory
- Parameters:
config
- the configuration, nevernull
, must contain theConnectorFactory.CHANNEL_NAME_ATTRIBUTE
attribute.- Returns:
- the created
SubscriberBuilder
, must not benull
.
-
getPublisherBuilder
public org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<? extends Message<?>> getPublisherBuilder(org.eclipse.microprofile.config.Config config)
Description copied from interface:IncomingConnectorFactory
Creates a channel for the given configuration. The channel's configuration is associated with a specificconnector
, using theConnector
qualifier's parameter indicating a key to whichIncomingConnectorFactory
to use.Note that the connection to the transport or broker is generally postponed until the subscription occurs.
- Specified by:
getPublisherBuilder
in interfaceIncomingConnectorFactory
- Parameters:
config
- the configuration, must not benull
, must contain theConnectorFactory.CHANNEL_NAME_ATTRIBUTE
attribute.- Returns:
- the created
PublisherBuilder
, will not benull
.
-
-