java.lang.Object
io.quarkus.smallrye.reactivemessaging.deployment.WiringHelper

public class WiringHelper extends Object
  • Method Details

    • getConnectorName

      static String getConnectorName(io.quarkus.arc.processor.BeanInfo bi)
      Retrieves the connector name from the given bean. Throws a NoSuchElementException if the given bean does not have the @Connector qualifier
      Parameters:
      bi - the bean
      Returns:
      the connector name
      Throws:
      NoSuchElementException - if the bean does not have the @Connector qualifier
    • 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:
      true if the channel is enabled, false otherwise
    • isInboundConnector

      static boolean isInboundConnector(org.jboss.jandex.ClassInfo ci)
      Checks if the given class is an inbound (incoming) connector.
      Parameters:
      ci - the class
      Returns:
      true if 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:
      true if 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 interfaces
      index - the index
      directions - 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 connectors
      name - the name
      direction - the direction
      Returns:
      the found connector, null otherwise
    • 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)