Search in sources :

Example 1 with ProtocolConfigBean

use of com.weibo.api.motan.config.springsupport.ProtocolConfigBean in project motan by weibocom.

the class AnnotationRpcClientDemo method demoMotanProtocolConfig.

@Bean(name = "demoMotan")
public ProtocolConfigBean demoMotanProtocolConfig() {
    ProtocolConfigBean config = new ProtocolConfigBean();
    //Id无需设置
    //        config.setId("demoMotan");
    config.setName("motan");
    config.setDefault(true);
    config.setMaxContentLength(1048576);
    config.setHaStrategy("failover");
    config.setLoadbalance("roundrobin");
    return config;
}
Also used : ProtocolConfigBean(com.weibo.api.motan.config.springsupport.ProtocolConfigBean) ProtocolConfigBean(com.weibo.api.motan.config.springsupport.ProtocolConfigBean) BasicRefererConfigBean(com.weibo.api.motan.config.springsupport.BasicRefererConfigBean) AnnotationBean(com.weibo.api.motan.config.springsupport.AnnotationBean) Bean(org.springframework.context.annotation.Bean) RegistryConfigBean(com.weibo.api.motan.config.springsupport.RegistryConfigBean)

Example 2 with ProtocolConfigBean

use of com.weibo.api.motan.config.springsupport.ProtocolConfigBean in project motan by weibocom.

the class AnnotationRpcClientDemo method protocolConfig2.

@Bean(name = "demoMotan2")
public ProtocolConfigBean protocolConfig2() {
    ProtocolConfigBean config = new ProtocolConfigBean();
    config.setName("motan");
    config.setMaxContentLength(1048576);
    config.setHaStrategy("failover");
    config.setLoadbalance("roundrobin");
    return config;
}
Also used : ProtocolConfigBean(com.weibo.api.motan.config.springsupport.ProtocolConfigBean) ProtocolConfigBean(com.weibo.api.motan.config.springsupport.ProtocolConfigBean) BasicRefererConfigBean(com.weibo.api.motan.config.springsupport.BasicRefererConfigBean) AnnotationBean(com.weibo.api.motan.config.springsupport.AnnotationBean) Bean(org.springframework.context.annotation.Bean) RegistryConfigBean(com.weibo.api.motan.config.springsupport.RegistryConfigBean)

Example 3 with ProtocolConfigBean

use of com.weibo.api.motan.config.springsupport.ProtocolConfigBean in project motan by weibocom.

the class AnnotationRpcServerDemo method protocolConfig1.

@Bean(name = "demoMotan")
public ProtocolConfigBean protocolConfig1() {
    ProtocolConfigBean config = new ProtocolConfigBean();
    config.setDefault(true);
    config.setName("motan");
    config.setMaxContentLength(1048576);
    return config;
}
Also used : ProtocolConfigBean(com.weibo.api.motan.config.springsupport.ProtocolConfigBean) ProtocolConfigBean(com.weibo.api.motan.config.springsupport.ProtocolConfigBean) AnnotationBean(com.weibo.api.motan.config.springsupport.AnnotationBean) BasicServiceConfigBean(com.weibo.api.motan.config.springsupport.BasicServiceConfigBean) Bean(org.springframework.context.annotation.Bean) RegistryConfigBean(com.weibo.api.motan.config.springsupport.RegistryConfigBean)

Example 4 with ProtocolConfigBean

use of com.weibo.api.motan.config.springsupport.ProtocolConfigBean in project motan by weibocom.

the class AnnotationRpcServerDemo method protocolConfig2.

@Bean(name = "motan")
public ProtocolConfigBean protocolConfig2() {
    ProtocolConfigBean config = new ProtocolConfigBean();
    //        config.setId("demoMotan2");
    config.setName("motan");
    config.setMaxContentLength(1048576);
    return config;
}
Also used : ProtocolConfigBean(com.weibo.api.motan.config.springsupport.ProtocolConfigBean) ProtocolConfigBean(com.weibo.api.motan.config.springsupport.ProtocolConfigBean) AnnotationBean(com.weibo.api.motan.config.springsupport.AnnotationBean) BasicServiceConfigBean(com.weibo.api.motan.config.springsupport.BasicServiceConfigBean) Bean(org.springframework.context.annotation.Bean) RegistryConfigBean(com.weibo.api.motan.config.springsupport.RegistryConfigBean)

Example 5 with ProtocolConfigBean

use of com.weibo.api.motan.config.springsupport.ProtocolConfigBean in project motan by weibocom.

the class SpringBootRpcServerDemo method protocolConfig1.

@Bean(name = "demoMotan")
public ProtocolConfigBean protocolConfig1() {
    ProtocolConfigBean config = new ProtocolConfigBean();
    config.setDefault(true);
    config.setName("motan");
    config.setMaxContentLength(1048576);
    return config;
}
Also used : ProtocolConfigBean(com.weibo.api.motan.config.springsupport.ProtocolConfigBean) ProtocolConfigBean(com.weibo.api.motan.config.springsupport.ProtocolConfigBean) AnnotationBean(com.weibo.api.motan.config.springsupport.AnnotationBean) BasicServiceConfigBean(com.weibo.api.motan.config.springsupport.BasicServiceConfigBean) Bean(org.springframework.context.annotation.Bean) RegistryConfigBean(com.weibo.api.motan.config.springsupport.RegistryConfigBean)

Aggregations

AnnotationBean (com.weibo.api.motan.config.springsupport.AnnotationBean)6 ProtocolConfigBean (com.weibo.api.motan.config.springsupport.ProtocolConfigBean)6 RegistryConfigBean (com.weibo.api.motan.config.springsupport.RegistryConfigBean)6 Bean (org.springframework.context.annotation.Bean)6 BasicRefererConfigBean (com.weibo.api.motan.config.springsupport.BasicRefererConfigBean)3 BasicServiceConfigBean (com.weibo.api.motan.config.springsupport.BasicServiceConfigBean)3