Class WiringHelper
- java.lang.Object
-
- io.quarkus.smallrye.reactivemessaging.deployment.WiringHelper
-
public class WiringHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static ConnectorBuildItemfind(List<ConnectorBuildItem> connectors, String name, ChannelDirection direction)Finds a connector by name and direction in the given list.(package private) static Optional<org.jboss.jandex.AnnotationInstance>getAnnotation(TransformedAnnotationsBuildItem transformedAnnotations, io.quarkus.arc.processor.InjectionPointInfo injectionPoint, org.jboss.jandex.DotName annotationName)(package private) static List<io.smallrye.reactive.messaging.annotations.ConnectorAttribute>getConnectorAttributes(io.quarkus.arc.processor.BeanInfo bi, CombinedIndexBuildItem index, io.smallrye.reactive.messaging.annotations.ConnectorAttribute.Direction... directions)Collects connector attributes from the given connector implementation.(package private) static StringgetConnectorName(io.quarkus.arc.processor.BeanInfo bi)Retrieves the connector name from the given bean.(package private) static Optional<String>getManagingConnector(ChannelDirection direction, String channel)Gets the name of the connector managing the channel if any.(package private) static booleanhasConnector(List<ConnectorBuildItem> connectors, ChannelDirection direction, String name)(package private) static booleanisChannelEnabled(ChannelDirection direction, String channel)Checks if the given channel is enabled / disabled in the configuration(package private) static booleanisInboundConnector(org.jboss.jandex.ClassInfo ci)Checks if the given class is an inbound (incoming) connector.(package private) static booleanisOutboundConnector(org.jboss.jandex.ClassInfo ci)Checks if the given class is an outbound (outgoing) connector.(package private) static booleanisSynthetic(org.jboss.jandex.MethodInfo method)(package private) static voidproduceIncomingChannel(BuildProducer<ChannelBuildItem> producer, String name)(package private) static voidproduceOutgoingChannel(BuildProducer<ChannelBuildItem> producer, String name)(package private) static Class<?>toType(String type)
-
-
-
Method Detail
-
getConnectorName
static String getConnectorName(io.quarkus.arc.processor.BeanInfo bi)
Retrieves the connector name from the given bean. Throws aNoSuchElementExceptionif the given bean does not have the@Connectorqualifier- Parameters:
bi- the bean- Returns:
- the connector name
- Throws:
NoSuchElementException- if the bean does not have the@Connectorqualifier
-
produceIncomingChannel
static void produceIncomingChannel(BuildProducer<ChannelBuildItem> producer, String name)
-
produceOutgoingChannel
static void produceOutgoingChannel(BuildProducer<ChannelBuildItem> producer, String name)
-
getManagingConnector
static Optional<String> getManagingConnector(ChannelDirection direction, String channel)
Gets the name of the connector managing the channel if any. This method looks inside the application configuration.- Parameters:
direction- the direction (incoming or outgoing)channel- the channel name- Returns:
- an optional with the connector name if the channel is managed, empty otherwise
-
isChannelEnabled
static boolean isChannelEnabled(ChannelDirection direction, String channel)
Checks if the given channel is enabled / disabled in the configuration- Parameters:
direction- the direction (incoming or outgoing)channel- the channel name- Returns:
trueif the channel is enabled,falseotherwise
-
isInboundConnector
static boolean isInboundConnector(org.jboss.jandex.ClassInfo ci)
Checks if the given class is an inbound (incoming) connector.- Parameters:
ci- the class- Returns:
trueif the class implements the inbound connector interface
-
isOutboundConnector
static boolean isOutboundConnector(org.jboss.jandex.ClassInfo ci)
Checks if the given class is an outbound (outgoing) connector.- Parameters:
ci- the class- Returns:
trueif the class implements the outbound connector interface
-
getConnectorAttributes
static List<io.smallrye.reactive.messaging.annotations.ConnectorAttribute> getConnectorAttributes(io.quarkus.arc.processor.BeanInfo bi, CombinedIndexBuildItem index, io.smallrye.reactive.messaging.annotations.ConnectorAttribute.Direction... directions)
Collects connector attributes from the given connector implementation.- Parameters:
bi- the bean implementing the connector interfacesindex- the indexdirections- the attribute direction to includes in the result- Returns:
- the list of connector attributes, empty if none
-
find
static ConnectorBuildItem find(List<ConnectorBuildItem> connectors, String name, ChannelDirection direction)
Finds a connector by name and direction in the given list.- Parameters:
connectors- the list of connectorsname- the namedirection- the direction- Returns:
- the found connector,
nullotherwise
-
hasConnector
static boolean hasConnector(List<ConnectorBuildItem> connectors, ChannelDirection direction, String name)
-
toType
static Class<?> toType(String type) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
isSynthetic
static boolean isSynthetic(org.jboss.jandex.MethodInfo method)
-
getAnnotation
static Optional<org.jboss.jandex.AnnotationInstance> getAnnotation(TransformedAnnotationsBuildItem transformedAnnotations, io.quarkus.arc.processor.InjectionPointInfo injectionPoint, org.jboss.jandex.DotName annotationName)
-
-