org.springframework.core.serializer.Deserializer Java Examples

The following examples show how to use org.springframework.core.serializer.Deserializer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SerializationDelegate.java    From spring-analysis-note with MIT License 5 votes vote down vote up
/**
 * 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;
}
 
Example #2
Source File: SerializationDelegate.java    From java-technology-stack with MIT License 5 votes vote down vote up
/**
 * 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;
}
 
Example #3
Source File: SerializationDelegate.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #4
Source File: SyslogSourceConfiguration.java    From spring-cloud-stream-app-starters with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example #5
Source File: SyslogSourceConfiguration.java    From spring-cloud-stream-app-starters with Apache License 2.0 5 votes vote down vote up
@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;
	}
}
 
Example #6
Source File: DeserializingConverter.java    From spring-analysis-note with MIT License 4 votes vote down vote up
/**
 * 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;
}
 
Example #7
Source File: DeserializingConverter.java    From java-technology-stack with MIT License 4 votes vote down vote up
/**
 * 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;
}
 
Example #8
Source File: DeserializingConverter.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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;
}
 
Example #9
Source File: DeserializingConverter.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
/**
 * 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;
}