com.quotemedia.streamer.client.CorpEventSubscription 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.messages.market.CorpEventType;
/**
* Subscription request for Corporate Event Data.
*
* Instances of this class can be created using {@link CorpEventSubscription.Builder}.
*
*/
public class CorpEventSubscription {
private String[] symbols;
private CorpEventType[] types;
private Boolean allCorpEvents;
public CorpEventSubscription() {
}
/**
* Returns the symbols to subscribe to
*
* @return the symbols to subscribe to
*/
public final String[] getSymbols() {
return this.symbols;
}
/**
* Returns the type of Corporate Events to subscribe to
* {@link com.quotemedia.streamer.messages.market.CorpEventType}
*
* @return the type of Corporate Events to subscribe to
*/
public final CorpEventType[] getTypes() {
return this.types;
}
public boolean isAllCorpEvents() {
return allCorpEvents != null && allCorpEvents;
}
public static final class Builder {
private String[] symbols;
private CorpEventType[] types;
private Boolean allCorpEvents;
/**
* Sets the ticker symbols to subscribe for.
*
* @param value the ticker symbols
* @return a reference to this object
*/
public CorpEventSubscription.Builder symbols(final String... value) {
this.symbols = value;
return this;
}
/**
* Sets the Corporate Event Type to subscribe for.
*
* @param value the market data types
* @return a reference to this object
*/
public CorpEventSubscription.Builder types(final CorpEventType... value) {
this.types = value;
return this;
}
/**
* Sets if this request is for all symbols
*
* @param value whether to subscribe corporate events for all symbols.
* @return a reference to this object
*/
public CorpEventSubscription.Builder allCorporateEvents(final boolean value) {
this.allCorpEvents = value;
return this;
}
/**
* Creates a {@code CorpEventSubscription} instance from set values.
*
* @return the created instance
*/
public CorpEventSubscription build() {
final CorpEventSubscription obj = new CorpEventSubscription();
obj.symbols = this.symbols;
obj.types = this.types;
obj.allCorpEvents = this.allCorpEvents;
return obj;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy