Java 类org.springframework.core.serializer.Deserializer 实例源码

项目:spring    文件:SerializationDelegate.java   
/**
 * Create a {@code SerializationDelegate} with the given serializer/deserializer.
 * @param serializer the {@link Serializer} to use (never {@code null)}
 * @param deserializer the {@link Deserializer} to use (never {@code null)}
 */
public SerializationDelegate(Serializer<Object> serializer, Deserializer<Object> deserializer) {
    Assert.notNull(serializer, "Serializer must not be null");
    Assert.notNull(deserializer, "Deserializer must not be null");
    this.serializer = serializer;
    this.deserializer = deserializer;
}
项目:spring-cloud-stream-app-starters    文件:SyslogSourceConfiguration.java   
@Bean
public AbstractServerConnectionFactory syslogSourceConnectionFactory(
        @Qualifier("syslogSourceDecoder") Deserializer<?> decoder) throws Exception {
    AbstractServerConnectionFactory factory;
    if (this.properties.isNio()) {
        factory = new TcpNioServerConnectionFactory(this.properties.getPort());
    }
    else {
        factory = new TcpNetServerConnectionFactory(this.properties.getPort());
    }
    factory.setLookupHost(this.properties.isReverseLookup());
    factory.setDeserializer(decoder);
    factory.setSoTimeout(this.properties.getSocketTimeout());
    return factory;
}
项目:spring-cloud-stream-app-starters    文件:SyslogSourceConfiguration.java   
@Bean
public Deserializer<?> syslogSourceDecoder() {
    ByteArrayLfSerializer decoder = new ByteArrayLfSerializer();
    decoder.setMaxMessageSize(this.properties.getBufferSize());
    if (this.properties.getRfc().equals("5424")) {
        return new RFC6587SyslogDeserializer(decoder);
    }
    else {
        return decoder;
    }
}
项目:samza-spring-boot-starter    文件:SpringSerde.java   
public SpringSerde(Serializer<T> serializer, Deserializer<T> deserializer) {
    Assert.notNull(serializer, "Serializer cannot be null.");
    Assert.notNull(deserializer, "Deserializer cannot be null.");
    this.serializer = serializer;
    this.deserializer = deserializer;
}
项目:spring4-understanding    文件:DeserializingConverter.java   
/**
 * Create a {@code DeserializingConverter} that delegates to the provided {@link Deserializer}.
 */
public DeserializingConverter(Deserializer<Object> deserializer) {
    Assert.notNull(deserializer, "Deserializer must not be null");
    this.deserializer = deserializer;
}
项目:spring    文件:DeserializingConverter.java   
/**
 * Create a {@code DeserializingConverter} that delegates to the provided {@link Deserializer}.
 */
public DeserializingConverter(Deserializer<Object> deserializer) {
    Assert.notNull(deserializer, "Deserializer must not be null");
    this.deserializer = deserializer;
}
项目:class-guard    文件:DeserializingConverter.java   
/**
 * Create a DeserializingConverter that delegates to the provided {@link Deserializer}.
 */
public DeserializingConverter(Deserializer<Object> deserializer) {
    Assert.notNull(deserializer, "Deserializer must not be null");
    this.deserializer = deserializer;
}