com.quotemedia.streamer.client.StreamStompFactory 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;
import com.quotemedia.streamer.client.cfg.Config;
import com.quotemedia.streamer.client.factory.StompStreamFactory;
/**
* Factory to create streams that utilizes the STOMP protocol.
*/
public class StreamStompFactory implements StreamFactory {
private final StompStreamFactory impl;
/**
* Creates a new factory producing streams based off configuration.
*
* @param cfg the configuration to use
*/
public StreamStompFactory(final Config cfg) {
this.impl = new StompStreamFactory(cfg);
}
/**
* Creates a new stream pre-configured with this factories configuration.
*
* @return a new stream
* @throws Exception if stream cannot be created due to invalid configuration
*/
public final Stream create() throws Exception {
return impl.create();
}
/**
* Closes all resources held by this factory. Held resources include resources shared by streams created by this
* factory, but not the streams them self.
* Note: streams created by this factory should be closed before calling this method.
* After calling this method any unclosed stream created by this factory is in an undefined possibly broken state.
*/
public final void close() {
this.impl.close();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy