public abstract class MarketEvent extends Object implements EventType<String>
eventSymbol
property that is
defined by this class.
Event symbol for a market event is a market symbol String
.
See MarketEventSymbols
class for a description of market event symbology.
Modifier | Constructor and Description |
---|---|
protected |
MarketEvent()
Protected constructor for concrete implementation classes.
|
protected |
MarketEvent(String eventSymbol)
Protected constructor for concrete implementation classes that initializes
eventSymbol property. |
Modifier and Type | Method and Description |
---|---|
String |
getEventSymbol()
Returns symbol of this event.
|
long |
getEventTime()
Returns time when event was created or zero when time is not available.
|
void |
setEventSymbol(String eventSymbol)
Changes symbol of this event.
|
void |
setEventTime(long eventTime)
Changes event creation time.
|
protected MarketEvent()
protected MarketEvent(String eventSymbol)
eventSymbol
property.eventSymbol
- the event symbol.public String getEventSymbol()
getEventSymbol
in interface EventType<String>
public void setEventSymbol(String eventSymbol)
setEventSymbol
in interface EventType<String>
eventSymbol
- symbol of this event.public long getEventTime()
This event time is available only when the corresponding DXEndpoint
is created
with DXENDPOINT_EVENT_TIME_PROPERTY
and
the data source has embedded event times. This is typically true only for data events
that are read from historical tape files and from OnDemandService
.
Events that are coming from a network connections do not have an embedded event time information and
this method will return zero for them, meaning that event was received just now.
getEventTime
in interface EventType<String>
public void setEventTime(long eventTime)
setEventTime
in interface EventType<String>
eventTime
- the difference, measured in milliseconds,
between the event creation time and midnight, January 1, 1970 UTC.Copyright © 2002–2023 Devexperts LLC. All rights reserved.