com.epam.fix
Class FIXVersion

java.lang.Object
  extended by com.epam.fix.FIXVersion
All Implemented Interfaces:
Comparable

public final class FIXVersion
extends Object
implements Comparable

FIXVersion type safe enum


Field Summary
static FIXVersion FIX40
           
static FIXVersion FIX41
           
static FIXVersion FIX42
           
static FIXVersion FIX43
           
static FIXVersion FIX44
           
static FIXVersion FIX50
           
static FIXVersion FIX50SP1
           
static FIXVersion FIX50SP2
           
static FIXVersion FIXT11
           
 
Method Summary
 int compareTo(FIXVersion fixVersion)
          Compares this object with the specified object for order.
 int compareTo(Object o)
           
static FIXVersion createInstanceByMessageVersion(String messageVersion, int fixtVersion)
          Returns the FIXVersion by messageVersion string (e.g.: FIX.4.0, FIX.4.1)
 int getFIXTVersion()
          Gets the fix version number code.
static Enumeration<FIXVersion> getFIXVersionEnum()
          Gets supported fix versions.
static FIXVersion getInstanceByFIXTVersion(int fixNumber)
          Gets fix version by number.
static FIXVersion getInstanceByMessageVersion(String messageVersion)
          Gets FIXVersion instance be string representation of fix session, FIX.4.0 - FIXT.1.1.
 String getMessageVersion()
          Returns the message version representation e.g.: FIX.4.0, FIX.4.1
 boolean isFIXT()
          Checks if this version is FIXT.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FIX40

public static final FIXVersion FIX40

FIX41

public static final FIXVersion FIX41

FIX42

public static final FIXVersion FIX42

FIX43

public static final FIXVersion FIX43

FIX44

public static final FIXVersion FIX44

FIX50

public static final FIXVersion FIX50

FIX50SP1

public static final FIXVersion FIX50SP1

FIX50SP2

public static final FIXVersion FIX50SP2

FIXT11

public static final FIXVersion FIXT11
Method Detail

getMessageVersion

public String getMessageVersion()
Returns the message version representation e.g.: FIX.4.0, FIX.4.1

Returns:
messageVersion

createInstanceByMessageVersion

public static FIXVersion createInstanceByMessageVersion(String messageVersion,
                                                        int fixtVersion)
Returns the FIXVersion by messageVersion string (e.g.: FIX.4.0, FIX.4.1)

Parameters:
messageVersion - message version
Returns:
FIXVersion

getInstanceByMessageVersion

public static FIXVersion getInstanceByMessageVersion(String messageVersion)
Gets FIXVersion instance be string representation of fix session, FIX.4.0 - FIXT.1.1.

Parameters:
messageVersion - the message version

getInstanceByFIXTVersion

public static FIXVersion getInstanceByFIXTVersion(int fixNumber)
Gets fix version by number.

Parameters:
fixNumber - the ranges value for this parameter should be from 2 to 9(FIX.4.0 ... FIX.5.0 sp2), the value for FIXT.1.1 should be -1.
Throws:
IllegalArgumentException - if fix session not exists.

getFIXVersionEnum

public static Enumeration<FIXVersion> getFIXVersionEnum()
Gets supported fix versions.

Returns:
Enumeration - supported fix version

toString

public String toString()
Overrides:
toString in class Object

isFIXT

public boolean isFIXT()
Checks if this version is FIXT.

Returns:
true if is, otherwise false

getFIXTVersion

public int getFIXTVersion()
Gets the fix version number code.

Returns:
code of fix version

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable
See Also:
Comparable.compareTo(Object)

compareTo

public int compareTo(FIXVersion fixVersion)
Compares this object with the specified object for order.

Parameters:
fixVersion - the fix version to compare
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.


Copyright © 2000-2014 EPAM Systems. All Rights Reserved.