Search in sources :

Example 1 with RSocketRequesterSupportBuilderImpl

use of com.alibaba.spring.boot.rsocket.upstream.RSocketRequesterSupportBuilderImpl in project alibaba-rsocket-broker by alibaba.

the class RSocketAutoConfiguration method rsocketRequesterSupport.

@Bean
@ConditionalOnMissingBean(RSocketRequesterSupport.class)
public RSocketRequesterSupport rsocketRequesterSupport(@Autowired RSocketProperties properties, @Autowired Environment environment, @Autowired SocketAcceptor socketAcceptor, @Autowired ObjectProvider<RSocketRequesterSupportCustomizer> customizers) {
    RSocketRequesterSupportBuilderImpl builder = new RSocketRequesterSupportBuilderImpl(properties, new EnvironmentProperties(environment), socketAcceptor);
    customizers.orderedStream().forEach((customizer) -> customizer.customize(builder));
    return builder.build();
}
Also used : RSocketRequesterSupportBuilderImpl(com.alibaba.spring.boot.rsocket.upstream.RSocketRequesterSupportBuilderImpl) Bean(org.springframework.context.annotation.Bean)

Example 2 with RSocketRequesterSupportBuilderImpl

use of com.alibaba.spring.boot.rsocket.upstream.RSocketRequesterSupportBuilderImpl in project alibaba-rsocket-broker by alibaba.

the class CloudFunctionConfiguration method rsocketRequesterSupport.

@Bean
public RSocketRequesterSupport rsocketRequesterSupport(@Autowired RSocketProperties properties, @Autowired Environment environment, @Autowired SocketAcceptor socketAcceptor, @Autowired ObjectProvider<RSocketRequesterSupportCustomizer> customizers, @Autowired FunctionRegistry functionRegistry) {
    EnvironmentProperties env = new EnvironmentProperties(environment);
    RSocketRequesterSupportBuilderImpl builder = new RSocketRequesterSupportBuilderImpl(properties, env, socketAcceptor);
    builder.requesterSupport(new RSocketRequesterFunctionSupport(properties, env, socketAcceptor, functionRegistry));
    customizers.orderedStream().forEach((customizer) -> customizer.customize(builder));
    return builder.build();
}
Also used : EnvironmentProperties(com.alibaba.spring.boot.rsocket.EnvironmentProperties) RSocketRequesterSupportBuilderImpl(com.alibaba.spring.boot.rsocket.upstream.RSocketRequesterSupportBuilderImpl) Bean(org.springframework.context.annotation.Bean)

Aggregations

RSocketRequesterSupportBuilderImpl (com.alibaba.spring.boot.rsocket.upstream.RSocketRequesterSupportBuilderImpl)2 Bean (org.springframework.context.annotation.Bean)2 EnvironmentProperties (com.alibaba.spring.boot.rsocket.EnvironmentProperties)1