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

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

Introduction

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

Prototype

public void setDeserializer(Deserializer<?> deserializer) 

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);/*w  w w.  ja  v  a  2s . c om*/
    factory.afterPropertiesSet();

    return factory;
}