@@ -0,0 +1,2542 @@
+/*%0A * Copyright (c) 2016, WSO2 Inc. (http://wso2.com) All Rights Reserved.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.wso2.msf4j.spring;%0A%0Aimport org.springframework.beans.BeansException;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.beans.factory.config.BeanDefinition;%0Aimport org.springframework.beans.factory.config.ConfigurableListableBeanFactory;%0Aimport org.springframework.beans.factory.support.BeanDefinitionRegistry;%0Aimport org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;%0Aimport org.springframework.beans.factory.support.RootBeanDefinition;%0Aimport org.springframework.core.env.Environment;%0Aimport org.wso2.msf4j.spring.transport.HTTPSTransportConfig;%0Aimport org.wso2.msf4j.spring.transport.HTTPTransportConfig;%0A%0A/**%0A * MSF4JBeanDefinitionRegistryPostProcessor is used by Spring to add default HTTP and/or HTTPS transports.%0A *%0A */%0Apublic class MSF4JBeanDefinitionRegistryPostProcessor implements BeanDefinitionRegistryPostProcessor %7B%0A%0A    @Autowired%0A    private Environment environment;%0A%0A    @Override%0A    public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException %7B%0A%0A        if(!registry.containsBeanDefinition(%22http%22))%7B%0A            registerBeanDefinition(registry, %22http%22, HTTPTransportConfig.class);%0A        %7D%0A%0A        if(!registry.containsBeanDefinition(%22https%22))%7B%0A            registerBeanDefinition(registry, %22https%22, HTTPSTransportConfig.class);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException %7B%0A%0A    %7D%0A%0A    private void registerBeanDefinition(BeanDefinitionRegistry registry, String beanName, Class beanClass)%7B%0A        RootBeanDefinition beanDefinition =%0A                new RootBeanDefinition(beanClass);%0A        beanDefinition.setTargetType(beanClass);%0A        beanDefinition.setRole(BeanDefinition.ROLE_APPLICATION);%0A        registry.registerBeanDefinition(beanName, beanDefinition);%0A    %7D%0A%7D%0A

add new file