com.dxfeed.schedule
Enum SessionType

java.lang.Object
  extended by java.lang.Enum<SessionType>
      extended by com.dxfeed.schedule.SessionType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SessionType>

public enum SessionType
extends java.lang.Enum<SessionType>

Defines type of a session - what kind of trading activity is allowed (if any), what rules are used, what impact on daily trading statistics it has, etc.. The NO_TRADING session type is used for non-trading sessions.

Some exchanges support all session types defined here, others do not.

Some sessions may have zero duration - e.g. indices that post value once a day. Such sessions can be of any appropriate type, trading or non-trading.


Enum Constant Summary
AFTER_MARKET
          After-market session type marks extended trading session after regular trading hours; after-market sessions can be non-trading if they actually do not exist.
NO_TRADING
          Non-trading session type is used to mark periods of time during which trading is not allowed.
PRE_MARKET
          Pre-market session type marks extended trading session before regular trading hours; pre-market sessions can be non-trading if they actually do not exist.
REGULAR
          Regular session type marks regular trading hours session; regular sessions can be non-trading (e.g. on weekends).
 
Method Summary
 boolean isTrading()
          Returns true if trading activity is allowed for this type of session.
static SessionType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SessionType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NO_TRADING

public static final SessionType NO_TRADING
Non-trading session type is used to mark periods of time during which trading is not allowed.


PRE_MARKET

public static final SessionType PRE_MARKET
Pre-market session type marks extended trading session before regular trading hours; pre-market sessions can be non-trading if they actually do not exist.


REGULAR

public static final SessionType REGULAR
Regular session type marks regular trading hours session; regular sessions can be non-trading (e.g. on weekends).


AFTER_MARKET

public static final SessionType AFTER_MARKET
After-market session type marks extended trading session after regular trading hours; after-market sessions can be non-trading if they actually do not exist.

Method Detail

values

public static SessionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SessionType c : SessionType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SessionType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isTrading

public boolean isTrading()
Returns true if trading activity is allowed for this type of session.

Some sessions may have zero duration - e.g. indices that post value once a day. Such sessions can be of any appropriate type, trading or non-trading.