public Object convert()

in components-starter/camel-sjms2-starter/src/main/java/org/apache/camel/component/sjms2/springboot/Sjms2ComponentConverter.java [51:72]


    public Object convert(
            Object source,
            TypeDescriptor sourceType,
            TypeDescriptor targetType) {
        if (source == null) {
            return null;
        }
        String ref = source.toString();
        if (!ref.startsWith("#")) {
            return null;
        }
        ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
        switch (targetType.getName()) {
            case "jakarta.jms.ConnectionFactory": return applicationContext.getBean(ref, jakarta.jms.ConnectionFactory.class);
            case "org.apache.camel.component.sjms.jms.DestinationCreationStrategy": return applicationContext.getBean(ref, org.apache.camel.component.sjms.jms.DestinationCreationStrategy.class);
            case "jakarta.jms.ExceptionListener": return applicationContext.getBean(ref, jakarta.jms.ExceptionListener.class);
            case "org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy": return applicationContext.getBean(ref, org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy.class);
            case "org.apache.camel.component.sjms.jms.MessageCreatedStrategy": return applicationContext.getBean(ref, org.apache.camel.component.sjms.jms.MessageCreatedStrategy.class);
            case "org.apache.camel.spi.HeaderFilterStrategy": return applicationContext.getBean(ref, org.apache.camel.spi.HeaderFilterStrategy.class);
        }
        return null;
    }