http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java new file mode 100644 index 0000000..90e022a --- /dev/null +++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java @@ -0,0 +1,100 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.netty.http.springboot; + +import org.apache.camel.component.netty.NettyConfiguration; +import org.apache.camel.component.netty.http.NettyHttpBinding; +import org.apache.camel.component.netty.http.NettyHttpSecurityConfiguration; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Netty HTTP server and client using the Netty 3.x library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.netty-http") +public class NettyHttpComponentConfiguration { + + /** + * To use a custom org.apache.camel.component.netty.http.NettyHttpBinding + * for binding to/from Netty and Camel Message API. + */ + private NettyHttpBinding nettyHttpBinding; + /** + * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter + * headers. + */ + private HeaderFilterStrategy headerFilterStrategy; + /** + * Refers to a + * org.apache.camel.component.netty.http.NettyHttpSecurityConfiguration for + * configuring secure web resources. + */ + private NettyHttpSecurityConfiguration securityConfiguration; + /** + * To use the NettyConfiguration as configuration when creating endpoints. + */ + private NettyConfiguration configuration; + /** + * The core pool size for the ordered thread pool if its in use. The default + * value is 16. + */ + private int maximumPoolSize; + + public NettyHttpBinding getNettyHttpBinding() { + return nettyHttpBinding; + } + + public void setNettyHttpBinding(NettyHttpBinding nettyHttpBinding) { + this.nettyHttpBinding = nettyHttpBinding; + } + + public HeaderFilterStrategy getHeaderFilterStrategy() { + return headerFilterStrategy; + } + + public void setHeaderFilterStrategy( + HeaderFilterStrategy headerFilterStrategy) { + this.headerFilterStrategy = headerFilterStrategy; + } + + public NettyHttpSecurityConfiguration getSecurityConfiguration() { + return securityConfiguration; + } + + public void setSecurityConfiguration( + NettyHttpSecurityConfiguration securityConfiguration) { + this.securityConfiguration = securityConfiguration; + } + + public NettyConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(NettyConfiguration configuration) { + this.configuration = configuration; + } + + public int getMaximumPoolSize() { + return maximumPoolSize; + } + + public void setMaximumPoolSize(int maximumPoolSize) { + this.maximumPoolSize = maximumPoolSize; + } +} \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-netty-http/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-netty-http/src/main/resources/META-INF/spring.factories b/components/camel-netty-http/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..a2295b2 --- /dev/null +++ b/components/camel-netty-http/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.netty.http.springboot.NettyHttpComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java new file mode 100644 index 0000000..04c4633 --- /dev/null +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.netty.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.netty.NettyComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(NettyComponentConfiguration.class) +public class NettyComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(NettyComponent.class) + public NettyComponent configureComponent(CamelContext camelContext, + NettyComponentConfiguration configuration) throws Exception { + NettyComponent component = new NettyComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java new file mode 100644 index 0000000..f958387 --- /dev/null +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java @@ -0,0 +1,55 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.netty.springboot; + +import org.apache.camel.component.netty.NettyConfiguration; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Socket level networking using TCP or UDP with the Netty 3.x library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.netty") +public class NettyComponentConfiguration { + + /** + * To use the NettyConfiguration as configuration when creating endpoints. + */ + private NettyConfiguration configuration; + /** + * The core pool size for the ordered thread pool if its in use. The default + * value is 16. + */ + private int maximumPoolSize; + + public NettyConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(NettyConfiguration configuration) { + this.configuration = configuration; + } + + public int getMaximumPoolSize() { + return maximumPoolSize; + } + + public void setMaximumPoolSize(int maximumPoolSize) { + this.maximumPoolSize = maximumPoolSize; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-netty/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-netty/src/main/resources/META-INF/spring.factories b/components/camel-netty/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..7d37fe1 --- /dev/null +++ b/components/camel-netty/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.netty.springboot.NettyComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java new file mode 100644 index 0000000..e954a36 --- /dev/null +++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.netty4.http.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.netty4.http.NettyHttpComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(NettyHttpComponentConfiguration.class) +public class NettyHttpComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(NettyHttpComponent.class) + public NettyHttpComponent configureComponent(CamelContext camelContext, + NettyHttpComponentConfiguration configuration) throws Exception { + NettyHttpComponent component = new NettyHttpComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java new file mode 100644 index 0000000..31c80d0 --- /dev/null +++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java @@ -0,0 +1,113 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.netty4.http.springboot; + +import io.netty.util.concurrent.EventExecutorGroup; +import org.apache.camel.component.netty4.NettyConfiguration; +import org.apache.camel.component.netty4.http.NettyHttpBinding; +import org.apache.camel.component.netty4.http.NettyHttpSecurityConfiguration; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Netty HTTP server and client using the Netty 4.x library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.netty4-http") +public class NettyHttpComponentConfiguration { + + /** + * To use a custom org.apache.camel.component.netty4.http.NettyHttpBinding + * for binding to/from Netty and Camel Message API. + */ + private NettyHttpBinding nettyHttpBinding; + /** + * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter + * headers. + */ + private HeaderFilterStrategy headerFilterStrategy; + /** + * Refers to a + * org.apache.camel.component.netty4.http.NettyHttpSecurityConfiguration for + * configuring secure web resources. + */ + private NettyHttpSecurityConfiguration securityConfiguration; + /** + * The thread pool size for the EventExecutorGroup if its in use. The + * default value is 16. + */ + private int maximumPoolSize; + /** + * To use the NettyConfiguration as configuration when creating endpoints. + */ + private NettyConfiguration configuration; + /** + * To use the given EventExecutorGroup + */ + private EventExecutorGroup executorService; + + public NettyHttpBinding getNettyHttpBinding() { + return nettyHttpBinding; + } + + public void setNettyHttpBinding(NettyHttpBinding nettyHttpBinding) { + this.nettyHttpBinding = nettyHttpBinding; + } + + public HeaderFilterStrategy getHeaderFilterStrategy() { + return headerFilterStrategy; + } + + public void setHeaderFilterStrategy( + HeaderFilterStrategy headerFilterStrategy) { + this.headerFilterStrategy = headerFilterStrategy; + } + + public NettyHttpSecurityConfiguration getSecurityConfiguration() { + return securityConfiguration; + } + + public void setSecurityConfiguration( + NettyHttpSecurityConfiguration securityConfiguration) { + this.securityConfiguration = securityConfiguration; + } + + public int getMaximumPoolSize() { + return maximumPoolSize; + } + + public void setMaximumPoolSize(int maximumPoolSize) { + this.maximumPoolSize = maximumPoolSize; + } + + public NettyConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(NettyConfiguration configuration) { + this.configuration = configuration; + } + + public EventExecutorGroup getExecutorService() { + return executorService; + } + + public void setExecutorService(EventExecutorGroup executorService) { + this.executorService = executorService; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-netty4-http/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-netty4-http/src/main/resources/META-INF/spring.factories b/components/camel-netty4-http/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..912a3c3 --- /dev/null +++ b/components/camel-netty4-http/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.netty4.http.springboot.NettyHttpComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java new file mode 100644 index 0000000..eda99a2 --- /dev/null +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.netty4.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.netty4.NettyComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(NettyComponentConfiguration.class) +public class NettyComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(NettyComponent.class) + public NettyComponent configureComponent(CamelContext camelContext, + NettyComponentConfiguration configuration) throws Exception { + NettyComponent component = new NettyComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java new file mode 100644 index 0000000..e29ea13 --- /dev/null +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java @@ -0,0 +1,68 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.netty4.springboot; + +import io.netty.util.concurrent.EventExecutorGroup; +import org.apache.camel.component.netty4.NettyConfiguration; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Socket level networking using TCP or UDP with the Netty 4.x library. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.netty4") +public class NettyComponentConfiguration { + + /** + * The thread pool size for the EventExecutorGroup if its in use. The + * default value is 16. + */ + private int maximumPoolSize; + /** + * To use the NettyConfiguration as configuration when creating endpoints. + */ + private NettyConfiguration configuration; + /** + * To use the given EventExecutorGroup + */ + private EventExecutorGroup executorService; + + public int getMaximumPoolSize() { + return maximumPoolSize; + } + + public void setMaximumPoolSize(int maximumPoolSize) { + this.maximumPoolSize = maximumPoolSize; + } + + public NettyConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(NettyConfiguration configuration) { + this.configuration = configuration; + } + + public EventExecutorGroup getExecutorService() { + return executorService; + } + + public void setExecutorService(EventExecutorGroup executorService) { + this.executorService = executorService; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-netty4/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/main/resources/META-INF/spring.factories b/components/camel-netty4/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..25df3f1 --- /dev/null +++ b/components/camel-netty4/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.netty4.springboot.NettyComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java new file mode 100644 index 0000000..1685ac5 --- /dev/null +++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.olingo2.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.olingo2.Olingo2Component; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(Olingo2ComponentConfiguration.class) +public class Olingo2ComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(Olingo2Component.class) + public Olingo2Component configureComponent(CamelContext camelContext, + Olingo2ComponentConfiguration configuration) throws Exception { + Olingo2Component component = new Olingo2Component(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentConfiguration.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentConfiguration.java new file mode 100644 index 0000000..037baa4 --- /dev/null +++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/springboot/Olingo2ComponentConfiguration.java @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.olingo2.springboot; + +import org.apache.camel.component.olingo2.Olingo2Configuration; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Communicates with OData 2.0 and 3.0 services using Apache Olingo. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.olingo2") +public class Olingo2ComponentConfiguration { + + /** + * To use the shared configuration + */ + private Olingo2Configuration configuration; + + public Olingo2Configuration getConfiguration() { + return configuration; + } + + public void setConfiguration(Olingo2Configuration configuration) { + this.configuration = configuration; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-olingo2/camel-olingo2-component/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/resources/META-INF/spring.factories b/components/camel-olingo2/camel-olingo2-component/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..9a1c863 --- /dev/null +++ b/components/camel-olingo2/camel-olingo2-component/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.olingo2.springboot.Olingo2ComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java new file mode 100644 index 0000000..8152776 --- /dev/null +++ b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.openshift.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.openshift.OpenShiftComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(OpenShiftComponentConfiguration.class) +public class OpenShiftComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(OpenShiftComponent.class) + public OpenShiftComponent configureComponent(CamelContext camelContext, + OpenShiftComponentConfiguration configuration) throws Exception { + OpenShiftComponent component = new OpenShiftComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentConfiguration.java b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentConfiguration.java new file mode 100644 index 0000000..e2dc6ed --- /dev/null +++ b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/springboot/OpenShiftComponentConfiguration.java @@ -0,0 +1,79 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.openshift.springboot; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * To manage your Openshift 2.x applications. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.openshift") +public class OpenShiftComponentConfiguration { + + /** + * The username to login to openshift server. + */ + private String username; + /** + * The password for login to openshift server. + */ + private String password; + /** + * Domain name. If not specified then the default domain is used. + */ + private String domain; + /** + * Url to the openshift server. If not specified then the default value from + * the local openshift configuration file /.openshift/express.conf is used. + * And if that fails as well then openshift.redhat.com is used. + */ + private String server; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public String getServer() { + return server; + } + + public void setServer(String server) { + this.server = server; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-openshift/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-openshift/src/main/resources/META-INF/spring.factories b/components/camel-openshift/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..a555e2c --- /dev/null +++ b/components/camel-openshift/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.openshift.springboot.OpenShiftComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java b/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java new file mode 100644 index 0000000..165b843 --- /dev/null +++ b/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.paho.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.paho.PahoComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(PahoComponentConfiguration.class) +public class PahoComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(PahoComponent.class) + public PahoComponent configureComponent(CamelContext camelContext, + PahoComponentConfiguration configuration) throws Exception { + PahoComponent component = new PahoComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentConfiguration.java b/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentConfiguration.java new file mode 100644 index 0000000..26d2cbb --- /dev/null +++ b/components/camel-paho/src/main/java/org/apache/camel/component/paho/springboot/PahoComponentConfiguration.java @@ -0,0 +1,67 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.paho.springboot; + +import org.eclipse.paho.client.mqttv3.MqttConnectOptions; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Component for communicating with MQTT M2M message brokers using Eclipse Paho + * MQTT Client. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.paho") +public class PahoComponentConfiguration { + + /** + * The URL of the MQTT broker. + */ + private String brokerUrl; + /** + * MQTT client identifier. + */ + private String clientId; + /** + * Client connection options + */ + private MqttConnectOptions connectOptions; + + public String getBrokerUrl() { + return brokerUrl; + } + + public void setBrokerUrl(String brokerUrl) { + this.brokerUrl = brokerUrl; + } + + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public MqttConnectOptions getConnectOptions() { + return connectOptions; + } + + public void setConnectOptions(MqttConnectOptions connectOptions) { + this.connectOptions = connectOptions; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-paho/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-paho/src/main/resources/META-INF/spring.factories b/components/camel-paho/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..5901896 --- /dev/null +++ b/components/camel-paho/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.paho.springboot.PahoComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentAutoConfiguration.java b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentAutoConfiguration.java new file mode 100644 index 0000000..4a82268 --- /dev/null +++ b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.paxlogging.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.paxlogging.PaxLoggingComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(PaxLoggingComponentConfiguration.class) +public class PaxLoggingComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(PaxLoggingComponent.class) + public PaxLoggingComponent configureComponent(CamelContext camelContext, + PaxLoggingComponentConfiguration configuration) throws Exception { + PaxLoggingComponent component = new PaxLoggingComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentConfiguration.java b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentConfiguration.java new file mode 100644 index 0000000..d26ef84 --- /dev/null +++ b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/springboot/PaxLoggingComponentConfiguration.java @@ -0,0 +1,43 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.paxlogging.springboot; + +import org.osgi.framework.BundleContext; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * The paxlogging component can be used in an OSGi environment to receive + * PaxLogging events and process them. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.paxlogging") +public class PaxLoggingComponentConfiguration { + + /** + * The OSGi BundleContext is automatic injected by Camel + */ + private BundleContext bundleContext; + + public BundleContext getBundleContext() { + return bundleContext; + } + + public void setBundleContext(BundleContext bundleContext) { + this.bundleContext = bundleContext; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-paxlogging/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-paxlogging/src/main/resources/META-INF/spring.factories b/components/camel-paxlogging/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..68a4e38 --- /dev/null +++ b/components/camel-paxlogging/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.paxlogging.springboot.PaxLoggingComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentAutoConfiguration.java b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentAutoConfiguration.java new file mode 100644 index 0000000..fad69ec --- /dev/null +++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.quartz.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.quartz.QuartzComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(QuartzComponentConfiguration.class) +public class QuartzComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(QuartzComponent.class) + public QuartzComponent configureComponent(CamelContext camelContext, + QuartzComponentConfiguration configuration) throws Exception { + QuartzComponent component = new QuartzComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java new file mode 100644 index 0000000..ad2828d --- /dev/null +++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java @@ -0,0 +1,119 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.quartz.springboot; + +import java.util.Properties; +import org.quartz.Scheduler; +import org.quartz.SchedulerFactory; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Provides a scheduled delivery of messages using the Quartz 1.x scheduler. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.quartz") +public class QuartzComponentConfiguration { + + /** + * To use the custom SchedulerFactory which is used to create the Scheduler. + */ + private SchedulerFactory factory; + /** + * To use the custom configured Quartz scheduler instead of creating a new + * Scheduler. + */ + private Scheduler scheduler; + /** + * Properties to configure the Quartz scheduler. + */ + private Properties properties; + /** + * File name of the properties to load from the classpath + */ + private String propertiesFile; + /** + * Seconds to wait before starting the quartz scheduler. + */ + private int startDelayedSeconds; + /** + * Whether or not the scheduler should be auto started. This options is + * default true + */ + private boolean autoStartScheduler; + /** + * Whether to enable Quartz JMX which allows to manage the Quartz scheduler + * from JMX. This options is default true + */ + private boolean enableJmx; + + public SchedulerFactory getFactory() { + return factory; + } + + public void setFactory(SchedulerFactory factory) { + this.factory = factory; + } + + public Scheduler getScheduler() { + return scheduler; + } + + public void setScheduler(Scheduler scheduler) { + this.scheduler = scheduler; + } + + public Properties getProperties() { + return properties; + } + + public void setProperties(Properties properties) { + this.properties = properties; + } + + public String getPropertiesFile() { + return propertiesFile; + } + + public void setPropertiesFile(String propertiesFile) { + this.propertiesFile = propertiesFile; + } + + public int getStartDelayedSeconds() { + return startDelayedSeconds; + } + + public void setStartDelayedSeconds(int startDelayedSeconds) { + this.startDelayedSeconds = startDelayedSeconds; + } + + public boolean isAutoStartScheduler() { + return autoStartScheduler; + } + + public void setAutoStartScheduler(boolean autoStartScheduler) { + this.autoStartScheduler = autoStartScheduler; + } + + public boolean isEnableJmx() { + return enableJmx; + } + + public void setEnableJmx(boolean enableJmx) { + this.enableJmx = enableJmx; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-quartz/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-quartz/src/main/resources/META-INF/spring.factories b/components/camel-quartz/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..d33d8b8 --- /dev/null +++ b/components/camel-quartz/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.quartz.springboot.QuartzComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java new file mode 100644 index 0000000..86a458e --- /dev/null +++ b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.quartz2.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.quartz2.QuartzComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(QuartzComponentConfiguration.class) +public class QuartzComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(QuartzComponent.class) + public QuartzComponent configureComponent(CamelContext camelContext, + QuartzComponentConfiguration configuration) throws Exception { + QuartzComponent component = new QuartzComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentConfiguration.java b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentConfiguration.java new file mode 100644 index 0000000..bf1836b --- /dev/null +++ b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentConfiguration.java @@ -0,0 +1,149 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.quartz2.springboot; + +import java.util.Properties; +import org.quartz.Scheduler; +import org.quartz.SchedulerFactory; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Provides a scheduled delivery of messages using the Quartz 2.x scheduler. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.quartz2") +public class QuartzComponentConfiguration { + + /** + * Whether or not the scheduler should be auto started. This options is + * default true + */ + private boolean autoStartScheduler; + /** + * Seconds to wait before starting the quartz scheduler. + */ + private int startDelayedSeconds; + /** + * Whether to prefix the quartz job with the endpoint id. This option is + * default false. + */ + private boolean prefixJobNameWithEndpointId; + /** + * Whether to enable Quartz JMX which allows to manage the Quartz scheduler + * from JMX. This options is default true + */ + private boolean enableJmx; + /** + * Properties to configure the Quartz scheduler. + */ + private Properties properties; + /** + * File name of the properties to load from the classpath + */ + private String propertiesFile; + /** + * Whether to prefix the Quartz Scheduler instance name with the + * CamelContext name. This is enabled by default to let each CamelContext + * use its own Quartz scheduler instance by default. You can set this option + * to false to reuse Quartz scheduler instances between multiple + * CamelContext's. + */ + private boolean prefixInstanceName; + /** + * To use the custom SchedulerFactory which is used to create the Scheduler. + */ + private SchedulerFactory schedulerFactory; + /** + * To use the custom configured Quartz scheduler instead of creating a new + * Scheduler. + */ + private Scheduler scheduler; + + public boolean isAutoStartScheduler() { + return autoStartScheduler; + } + + public void setAutoStartScheduler(boolean autoStartScheduler) { + this.autoStartScheduler = autoStartScheduler; + } + + public int getStartDelayedSeconds() { + return startDelayedSeconds; + } + + public void setStartDelayedSeconds(int startDelayedSeconds) { + this.startDelayedSeconds = startDelayedSeconds; + } + + public boolean isPrefixJobNameWithEndpointId() { + return prefixJobNameWithEndpointId; + } + + public void setPrefixJobNameWithEndpointId( + boolean prefixJobNameWithEndpointId) { + this.prefixJobNameWithEndpointId = prefixJobNameWithEndpointId; + } + + public boolean isEnableJmx() { + return enableJmx; + } + + public void setEnableJmx(boolean enableJmx) { + this.enableJmx = enableJmx; + } + + public Properties getProperties() { + return properties; + } + + public void setProperties(Properties properties) { + this.properties = properties; + } + + public String getPropertiesFile() { + return propertiesFile; + } + + public void setPropertiesFile(String propertiesFile) { + this.propertiesFile = propertiesFile; + } + + public boolean isPrefixInstanceName() { + return prefixInstanceName; + } + + public void setPrefixInstanceName(boolean prefixInstanceName) { + this.prefixInstanceName = prefixInstanceName; + } + + public SchedulerFactory getSchedulerFactory() { + return schedulerFactory; + } + + public void setSchedulerFactory(SchedulerFactory schedulerFactory) { + this.schedulerFactory = schedulerFactory; + } + + public Scheduler getScheduler() { + return scheduler; + } + + public void setScheduler(Scheduler scheduler) { + this.scheduler = scheduler; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-quartz2/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-quartz2/src/main/resources/META-INF/spring.factories b/components/camel-quartz2/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..c8a464a --- /dev/null +++ b/components/camel-quartz2/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.quartz2.springboot.QuartzComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java new file mode 100644 index 0000000..8fc62e5 --- /dev/null +++ b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.quickfixj.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.quickfixj.QuickfixjComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(QuickfixjComponentConfiguration.class) +public class QuickfixjComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(QuickfixjComponent.class) + public QuickfixjComponent configureComponent(CamelContext camelContext, + QuickfixjComponentConfiguration configuration) throws Exception { + QuickfixjComponent component = new QuickfixjComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentConfiguration.java b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentConfiguration.java new file mode 100644 index 0000000..e05070f --- /dev/null +++ b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentConfiguration.java @@ -0,0 +1,98 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.quickfixj.springboot; + +import java.util.Map; +import org.apache.camel.component.quickfixj.QuickfixjConfiguration; +import org.springframework.boot.context.properties.ConfigurationProperties; +import quickfix.LogFactory; +import quickfix.MessageFactory; +import quickfix.MessageStoreFactory; + +/** + * The quickfix component allows to send Financial Interchange (FIX) messages to + * the QuickFix engine. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@ConfigurationProperties(prefix = "camel.component.quickfix") +public class QuickfixjComponentConfiguration { + + /** + * To use the given MessageFactory + */ + private MessageFactory messageFactory; + /** + * To use the given LogFactory + */ + private LogFactory logFactory; + /** + * To use the given MessageStoreFactory + */ + private MessageStoreFactory messageStoreFactory; + /** + * To use the given map of pre configured QuickFix configurations mapped to + * the key + */ + private Map<java.lang.String, org.apache.camel.component.quickfixj.QuickfixjConfiguration> configurations; + /** + * If set to true the engines will be created and started when needed (when + * first message is send) + */ + private boolean lazyCreateEngines; + + public MessageFactory getMessageFactory() { + return messageFactory; + } + + public void setMessageFactory(MessageFactory messageFactory) { + this.messageFactory = messageFactory; + } + + public LogFactory getLogFactory() { + return logFactory; + } + + public void setLogFactory(LogFactory logFactory) { + this.logFactory = logFactory; + } + + public MessageStoreFactory getMessageStoreFactory() { + return messageStoreFactory; + } + + public void setMessageStoreFactory(MessageStoreFactory messageStoreFactory) { + this.messageStoreFactory = messageStoreFactory; + } + + public Map<String, QuickfixjConfiguration> getConfigurations() { + return configurations; + } + + public void setConfigurations( + Map<String, QuickfixjConfiguration> configurations) { + this.configurations = configurations; + } + + public boolean isLazyCreateEngines() { + return lazyCreateEngines; + } + + public void setLazyCreateEngines(boolean lazyCreateEngines) { + this.lazyCreateEngines = lazyCreateEngines; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-quickfix/src/main/resources/META-INF/spring.factories ---------------------------------------------------------------------- diff --git a/components/camel-quickfix/src/main/resources/META-INF/spring.factories b/components/camel-quickfix/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..c3f0a79 --- /dev/null +++ b/components/camel-quickfix/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.quickfixj.springboot.QuickfixjComponentAutoConfiguration http://git-wip-us.apache.org/repos/asf/camel/blob/75251730/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java new file mode 100644 index 0000000..e80993d --- /dev/null +++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentAutoConfiguration.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.restlet.springboot; + +import java.util.HashMap; +import java.util.Map; +import org.apache.camel.CamelContext; +import org.apache.camel.component.restlet.RestletComponent; +import org.apache.camel.util.IntrospectionSupport; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Configuration +@EnableConfigurationProperties(RestletComponentConfiguration.class) +public class RestletComponentAutoConfiguration { + + @Bean + @ConditionalOnClass(CamelContext.class) + @ConditionalOnMissingBean(RestletComponent.class) + public RestletComponent configureComponent(CamelContext camelContext, + RestletComponentConfiguration configuration) throws Exception { + RestletComponent component = new RestletComponent(); + component.setCamelContext(camelContext); + Map<String, Object> parameters = new HashMap<>(); + IntrospectionSupport.getProperties(configuration, parameters, null); + IntrospectionSupport.setProperties(camelContext, + camelContext.getTypeConverter(), component, parameters); + return component; + } +} \ No newline at end of file