Example usage for org.springframework.integration.ip.tcp.connection TcpNioClientConnectionFactory afterPropertiesSet

List of usage examples for org.springframework.integration.ip.tcp.connection TcpNioClientConnectionFactory afterPropertiesSet

Introduction

In this page you can find the example usage for org.springframework.integration.ip.tcp.connection TcpNioClientConnectionFactory afterPropertiesSet.

Prototype

@Override
    public final void afterPropertiesSet() 

Source Link

Usage

From source file:com.acmemotors.Main.java

@Bean
public TcpNioClientConnectionFactory connectionFactory(@Value("${dongleHost:192.168.0.10}") String dongleHost,
        @Value("${donglePort:35000}") int donglePort) {
    TcpNioClientConnectionFactory factory;

    factory = new TcpNioClientConnectionFactory(dongleHost, donglePort);

    OBD2Serializer odb2Serializer = new OBD2Serializer();
    factory.setSerializer(odb2Serializer);
    factory.setDeserializer(odb2Serializer);
    factory.setSingleUse(false);//from   www. j  ava 2  s. c om
    factory.afterPropertiesSet();

    return factory;
}