public class NewsEvent extends Object implements Serializable, Comparable<NewsEvent>
Modifier and Type | Class and Description |
---|---|
static class |
NewsEvent.Builder
Builder class for
NewsEvent . |
Modifier and Type | Field and Description |
---|---|
static String |
MESSAGE_SYMBOL
Symbol used for QD Stream Subscription.
|
Modifier | Constructor and Description |
---|---|
protected |
NewsEvent(NewsEvent.Builder builder) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(NewsEvent o)
Events are naturally ordered by their arrival time to the news storage.
|
boolean |
equals(Object o) |
String |
getAction()
Returns news action, or
null . |
String |
getActionReason()
Returns news action reason, or
null . |
String |
getBody()
Returns news body, or
null . |
NewsKey |
getChainKey() |
String |
getExtraAttributes()
Returns news extra attributes, or
null . |
String |
getFeed()
Returns news feed ID.
|
NewsKey |
getKey()
Returns news key for identifying news.
|
String |
getNewsContent() |
NewsOrigin |
getOrigin()
Return news origin (feed and source provider)
|
NewsKey |
getOriginalKey() |
NewsKey |
getOriginalKeyOrSelf()
Returns original news key if event is correction or else news id (originalKey for non-corrected news is null) .
|
String |
getSource()
Returns news source provider.
|
String |
getSourceId()
Returns external ID assigned by news provider.
|
String |
getSourcePrefix() |
String |
getSourceUrl()
Returns news source url.
|
List<String> |
getSymbols()
Returns set of instrument symbols for this news, or
null if not present. |
Map<String,List<String>> |
getTags()
Returns set of custom tags available for the news.
|
long |
getTime()
Returns news time.
|
String |
getTitle()
Returns news title.
|
int |
hashCode() |
static NewsEvent.Builder |
newBuilder() |
String |
toString() |
public static final String MESSAGE_SYMBOL
protected NewsEvent(NewsEvent.Builder builder)
public static NewsEvent.Builder newBuilder()
public NewsKey getKey()
public NewsKey getOriginalKey()
public NewsKey getChainKey()
public NewsKey getOriginalKeyOrSelf()
public String getFeed()
public String getSourceId()
public String getSource()
public String getSourceUrl()
public String getSourcePrefix()
public NewsOrigin getOrigin()
public long getTime()
public String getTitle()
public String getBody()
null
.public String getExtraAttributes()
null
.public String getAction()
null
.public String getActionReason()
null
.public String getNewsContent()
public List<String> getSymbols()
null
if not present.public Map<String,List<String>> getTags()
null
but can be empty.public int compareTo(NewsEvent o)
compareTo
in interface Comparable<NewsEvent>
Copyright © 2024 Devexperts. All rights reserved.