com.quotemedia.streamer.client.impl.PayloadEncoderProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of streamerclient-java-core Show documentation
Show all versions of streamerclient-java-core Show documentation
Java streaming client that provides easy-to-use client APIs to connect and subscribe to QuoteMedia's market data streaming services. https://quotemedia.com/
The newest version!
package com.quotemedia.streamer.client.impl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.quotemedia.streamer.messages.MimeTypes;
import static com.quotemedia.qitch.Preconditions.checkNotNull;
public class PayloadEncoderProvider {
private final ObjectMapper json;
public PayloadEncoderProvider(final ObjectMapper json) {
this.json = checkNotNull(json);
}
public PayloadEncoder get(final String format) {
if (MimeTypes.QITCH.equals(format)) {
return new DecodedPayloadEncoder();
} else {
return new TextPayloadEncoder(this.json);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy