com.epam.fixengine.configuration
Class Configuration

java.lang.Object
  extended by com.epam.fixengine.configuration.Configuration
All Implemented Interfaces:
Cloneable

public class Configuration
extends Object
implements Cloneable

Engine configuration class. Engine used Configuration#getGlobalConfiguration method to configure itself, user can change this properties in runtime only for initiator sessions, not for acceptors.


Field Summary
static String ACCURACY
          Measurement accuracy, default value is 1 ms.
static String ADVANCED_RESEND_REQUEST_PROCESSING
           
static String ALLOWED_FIELDS_VALIDATION
          Enable/disable allowedFields validator, default value is false.
static String AUTORECONNECT_ATTEMPTS
           
static String AUTORECONNECT_DELAY_IN_MS
          Specifies delay between autoreconnect attempts in milliseconds, default value is 1000ms.
static String AUTOSTART_ACCEPTOR_COMMAND_PACKAGE
          Name of the custom package for admin commands processing This property is using for the extending the count of admin-commands.
static String BACKUP_INCOMING_LOG_FILE
          Backup incoming log filename template. {0} will be replaced with actual SenderCompID {1} with actual TargetCompID
static String BACKUP_OUTGOING_LOG_FILE
          Backup outgoing log filename template. {0} will be replaced with actual SenderCompID {1} with actual TargetCompID
static String CHECK_SENDING_TIME_ACCURACY
          Enable/disable check time accuracy.
static String CONDITIONAL_VALIDATION
          enable/disable conditional validator, default value is false.
static String CONNECT_ADDRESS
           
static String CYCLIC_SWITCH_BACKUP_CONNECTION
           
static String DELAY
          Sending time accuracy, default value is 2 minutes (120000 ms).
static String DES_KEY_PREFIX
           
static String DUPLICATE_FIELDS_VALIDATION
          Enable/disable duplicateFields validator, default value is false.
static String ENABLE_AUTO_SWITCH_TO_BACKUP_CONNECTION
           
static String ENABLE_MESSAGE_REJECTING
          Enable/disable message rejecting, default value is false
static String ENABLE_NAGLE
          Enable/disable nagile algorithm, default value is false.
static String ENABLE_SSL
          Enable/disable ssl, default value is false.
static String ENCRYPTION_CFG_FILE
           
static String ENCRYPTION_MODE
           
static String FIELD_ORDER_VALIDATION
          enable/disable fieldOrder validator, default value is false.
static String FIELD_TYPE_VALIDATION
          Enable/disable fieldType validator, default value is false.
static String FORCE_SEQ_NUM_RESET
          Enable disable sequence reset.
static String FORCED_LOGOFF_TIMEOUT
          Sets disconnect timeout in seconds for forced logoff (e.g. incoming message sequence were too low), default value is 2
static String GROUP_VALIDATION
          Enable/disable group validator, default value is false.
static String HBT_REASONABLE_TRANSMISSION_TIME
          This parameter specifies "some reasonable transmission time" of FIX specification, measured in milliseconds.
static String IN_MEMORY_QUEUE
          Sets queue mode.
static String INCLUDE_LAST_PROCESSED
          Include last processed sequence 369 tag in every message for FIX versions>4.2
static String INCOMING_LOG_FILE
          Incoming log filename template. {0} will be replaced with actual SenderCompID {1} with actual TargetCompID.
static String INCOMING_STORAGE_INDEXED
          True will enables incoming storage index.
static String INTRA_DAY_SEQNUM_RESET
           
static String LOG_FILES_TIME_ZONE
          Time zone for prefix in out/in logs
static String LOGIN_WAIT_TIMEOUT
          Sets timeout interval after which connected acceptor session will be timed out and disposed if logon wasn't received for this session, default value is 5000
static String MAX_DELAY_TO_SEND_AFTER_LOGON
           
static String MAX_MESSAGE_SIZE
          Maximum message size supported by this FIX engine instance, default value is 2048
static String MAX_MESSAGES_TO_SEND_IN_BATCH
          The maximum number of messages in buffer before we write message to transport.
static String MAX_REQUEST_RESEND_IN_BLOCK
           
static String MAX_STORAGE_GROW_SIZE
           
static int MAX_TIMEOUT_VALUE
          Identifies a maximum HBI in seconds.
static String ORIG_SENDING_TIME_CHECKING
          This parameter specifies whether to check the OrigSendingTime(122) field value for incoming possible duplicated messages (PossDupFlag(43) = 'Y').
static String OUTGOING_LOG_FILE
          Outgoing log filename template. {0} will be replaced with actual SenderCompID {1} with actual TargetCompID.
static String OUTGOING_QUEUE_FILE
          Out queue file template.{0} will be replaced with actual SenderCompID {1} with actual TargetCompID.
static String OUTGOING_STORAGE_INDEXED
          True will enables outgoing storage index that is to be used in decision making in resend request handler.
static String PERFORM_RESET_SEQ_NUM_TIME
           
static String POSS_DUP_SMART_DELIVERY
           
static String PUB_KEY
           
static String PUB_KEY_FILE
           
static String QUEUE_THRESHOLD_SIZE
          The maximum number of messages in a queue before we pause pumper thread to let queued message to be sent out.
static String RAW_TAGS
          Raw tags.
static String REQUIRED_FIELDS_VALIDATION
          Enable/disable requiredFields validator, default value is false.
static String RESEND_REQUEST_NUMBER_OF_MESSAGES_LIMIT
          The maximum messages to resend, default value is 0 - all messages.
static String RESET_ON_SWITCH_TO_BACKUP
          Define names for default.properties and fixengine.properties configuration files.
static String RESET_ON_SWITCH_TO_PRIMARY
           
static String RESET_SEQUENCE_TIME
           
static String RESET_SEQUENCE_TIME_ZONE
           
static String SEC_KEY_FILE
           
static String SEND_REJECT_IF_APPLICATION_IS_NOT_AVAILABLE
          Send reject if application not available.
static String SESSION_INFO_FILE
          Info filename template. {0} will be replaced with actual SenderCompID {1} with actual TargetCompID.
static String STORAGE_BACKUP_DIR
           
static String STORAGE_CLEANUP_MODE
           
static String STORAGE_DIRECTORY
          Storage directory could be either absolute path (like /tmp/logs or c:\fixengine\logs) or relative path e.g. logs (this one is relative to the application start directory).
static String STORAGE_FACTORY
          Allows user to replace storage factory with user own implementation
static String STORAGE_GROW_SIZE
           
static String TEST_REQUESTS_NUMBER_UPON_DISCONNECTION
          This parameter specifies number of Test Request messages, which will be sent before connection loss is reported when no messages are received from the counterparty.
static String TIMESTAMPS_IN_LOGS
          On/off the timestamp prefix in in/out log files.
static String VALIDATION
          Toggle on/off validation of incoming messages according to base of custom dictionaries Following parameters with the Validation suffix works only if this property set to true.
static String WELFORMED_VALIDATOR
          Enable/disable welformed validator, default value is false.
 
Constructor Summary
Configuration(Map map)
          Create a Configuration based on Map properties.
Configuration(Properties map)
          Create a Configuration based on Map properties.
Configuration(String prop)
          Create a Configuration.
 
Method Summary
 void addAllProperties(Map newProps)
           
 Object clone()
           
static Configuration getGlobalConfiguration()
          Get global configuration.
 Properties getProperties()
          Get all properties.
 String getProperty(String propertyName)
          Getter for property.
 String getProperty(String propertyName, String defaultValue)
          Getter for property.
 boolean getPropertyAsBoolean(String propertyName)
          Get property value as boolean.
 boolean getPropertyAsBoolean(String propertyName, boolean defaultValue)
          Get property value as boolean.
 int getPropertyAsInt(String propertyName)
          Get property value as int.
 int getPropertyAsInt(String propertyName, int defaultValue)
          Get property value as int.
 void printConfiguration()
          Prints configuration to log.
 void setAllProperties(Map newProps)
           
 void setProperty(String propertyName, String propertyValue)
          Setter for properties.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESET_ON_SWITCH_TO_BACKUP

public static final String RESET_ON_SWITCH_TO_BACKUP
Define names for default.properties and fixengine.properties configuration files.

See Also:
Constant Field Values

RESET_ON_SWITCH_TO_PRIMARY

public static final String RESET_ON_SWITCH_TO_PRIMARY
See Also:
Constant Field Values

AUTORECONNECT_ATTEMPTS

public static final String AUTORECONNECT_ATTEMPTS
See Also:
Constant Field Values

STORAGE_FACTORY

public static final String STORAGE_FACTORY
Allows user to replace storage factory with user own implementation

See Also:
Constant Field Values

SEND_REJECT_IF_APPLICATION_IS_NOT_AVAILABLE

public static final String SEND_REJECT_IF_APPLICATION_IS_NOT_AVAILABLE
Send reject if application not available.

See Also:
Constant Field Values

ENABLE_AUTO_SWITCH_TO_BACKUP_CONNECTION

public static final String ENABLE_AUTO_SWITCH_TO_BACKUP_CONNECTION
See Also:
Constant Field Values

CYCLIC_SWITCH_BACKUP_CONNECTION

public static final String CYCLIC_SWITCH_BACKUP_CONNECTION
See Also:
Constant Field Values

AUTORECONNECT_DELAY_IN_MS

public static final String AUTORECONNECT_DELAY_IN_MS
Specifies delay between autoreconnect attempts in milliseconds, default value is 1000ms.

See Also:
Constant Field Values

AUTOSTART_ACCEPTOR_COMMAND_PACKAGE

public static final String AUTOSTART_ACCEPTOR_COMMAND_PACKAGE
Name of the custom package for admin commands processing This property is using for the extending the count of admin-commands. By default package is null, but if custom commands is present this property should be initialized, for example (autostart.acceptor.commands.package=com.admin.commands).

See Also:
Constant Field Values

ENABLE_NAGLE

public static final String ENABLE_NAGLE
Enable/disable nagile algorithm, default value is false.

See Also:
Constant Field Values

ENABLE_SSL

public static final String ENABLE_SSL
Enable/disable ssl, default value is false.

See Also:
Constant Field Values

RESEND_REQUEST_NUMBER_OF_MESSAGES_LIMIT

public static final String RESEND_REQUEST_NUMBER_OF_MESSAGES_LIMIT
The maximum messages to resend, default value is 0 - all messages.

See Also:
Constant Field Values

WELFORMED_VALIDATOR

public static final String WELFORMED_VALIDATOR
Enable/disable welformed validator, default value is false.

See Also:
Constant Field Values

ALLOWED_FIELDS_VALIDATION

public static final String ALLOWED_FIELDS_VALIDATION
Enable/disable allowedFields validator, default value is false.

See Also:
Constant Field Values

REQUIRED_FIELDS_VALIDATION

public static final String REQUIRED_FIELDS_VALIDATION
Enable/disable requiredFields validator, default value is false.

See Also:
Constant Field Values

FIELD_TYPE_VALIDATION

public static final String FIELD_TYPE_VALIDATION
Enable/disable fieldType validator, default value is false.

See Also:
Constant Field Values

CONDITIONAL_VALIDATION

public static final String CONDITIONAL_VALIDATION
enable/disable conditional validator, default value is false.

See Also:
Constant Field Values

GROUP_VALIDATION

public static final String GROUP_VALIDATION
Enable/disable group validator, default value is false.

See Also:
Constant Field Values

DUPLICATE_FIELDS_VALIDATION

public static final String DUPLICATE_FIELDS_VALIDATION
Enable/disable duplicateFields validator, default value is false.

See Also:
Constant Field Values

FIELD_ORDER_VALIDATION

public static final String FIELD_ORDER_VALIDATION
enable/disable fieldOrder validator, default value is false.

See Also:
Constant Field Values

DELAY

public static final String DELAY
Sending time accuracy, default value is 2 minutes (120000 ms).

See Also:
Constant Field Values

ACCURACY

public static final String ACCURACY
Measurement accuracy, default value is 1 ms.

See Also:
Constant Field Values

CHECK_SENDING_TIME_ACCURACY

public static final String CHECK_SENDING_TIME_ACCURACY
Enable/disable check time accuracy.

See Also:
Constant Field Values

ENABLE_MESSAGE_REJECTING

public static final String ENABLE_MESSAGE_REJECTING
Enable/disable message rejecting, default value is false

See Also:
Constant Field Values

QUEUE_THRESHOLD_SIZE

public static final String QUEUE_THRESHOLD_SIZE
The maximum number of messages in a queue before we pause pumper thread to let queued message to be sent out. Set rather high for max performance set 1 or pretty low for realtime experience 0 - disable queue control, do not pause pumper thread, default value is 0

See Also:
Constant Field Values

MAX_MESSAGES_TO_SEND_IN_BATCH

public static final String MAX_MESSAGES_TO_SEND_IN_BATCH
The maximum number of messages in buffer before we write message to transport. default value is 100

See Also:
Constant Field Values

MAX_MESSAGE_SIZE

public static final String MAX_MESSAGE_SIZE
Maximum message size supported by this FIX engine instance, default value is 2048

See Also:
Constant Field Values

INCLUDE_LAST_PROCESSED

public static final String INCLUDE_LAST_PROCESSED
Include last processed sequence 369 tag in every message for FIX versions>4.2

See Also:
Constant Field Values

FORCED_LOGOFF_TIMEOUT

public static final String FORCED_LOGOFF_TIMEOUT
Sets disconnect timeout in seconds for forced logoff (e.g. incoming message sequence were too low), default value is 2

See Also:
Constant Field Values

LOGIN_WAIT_TIMEOUT

public static final String LOGIN_WAIT_TIMEOUT
Sets timeout interval after which connected acceptor session will be timed out and disposed if logon wasn't received for this session, default value is 5000

See Also:
Constant Field Values

IN_MEMORY_QUEUE

public static final String IN_MEMORY_QUEUE
Sets queue mode. Set to "false" for persistent queue (slower but no messages will be lost), "true" for in memory queue (faster but less safe, some messages may be lost)

See Also:
Constant Field Values

INCOMING_STORAGE_INDEXED

public static final String INCOMING_STORAGE_INDEXED
True will enables incoming storage index. Enabled index - messages in incoming storage will be available via API

See Also:
Constant Field Values

OUTGOING_STORAGE_INDEXED

public static final String OUTGOING_STORAGE_INDEXED
True will enables outgoing storage index that is to be used in decision making in resend request handler. Enabled index - support resend request, disabled - never resend messages and always send gap fill

See Also:
Constant Field Values

STORAGE_DIRECTORY

public static final String STORAGE_DIRECTORY
Storage directory could be either absolute path (like /tmp/logs or c:\fixengine\logs) or relative path e.g. logs (this one is relative to the application start directory).

See Also:
Constant Field Values

RAW_TAGS

public static final String RAW_TAGS
Raw tags. List all tags here engine should treat as raw. Raw tag may contain SOH symbol inside it and it should be preceided by rawTagLength field.

See Also:
Constant Field Values

VALIDATION

public static final String VALIDATION
Toggle on/off validation of incoming messages according to base of custom dictionaries Following parameters with the Validation suffix works only if this property set to true.

See Also:
Constant Field Values

MAX_TIMEOUT_VALUE

public static int MAX_TIMEOUT_VALUE
Identifies a maximum HBI in seconds.


OUTGOING_LOG_FILE

public static final String OUTGOING_LOG_FILE
Outgoing log filename template. {0} will be replaced with actual SenderCompID {1} with actual TargetCompID.

See Also:
Constant Field Values

BACKUP_OUTGOING_LOG_FILE

public static final String BACKUP_OUTGOING_LOG_FILE
Backup outgoing log filename template. {0} will be replaced with actual SenderCompID {1} with actual TargetCompID

See Also:
Constant Field Values

INCOMING_LOG_FILE

public static final String INCOMING_LOG_FILE
Incoming log filename template. {0} will be replaced with actual SenderCompID {1} with actual TargetCompID.

See Also:
Constant Field Values

BACKUP_INCOMING_LOG_FILE

public static final String BACKUP_INCOMING_LOG_FILE
Backup incoming log filename template. {0} will be replaced with actual SenderCompID {1} with actual TargetCompID

See Also:
Constant Field Values

SESSION_INFO_FILE

public static final String SESSION_INFO_FILE
Info filename template. {0} will be replaced with actual SenderCompID {1} with actual TargetCompID.

See Also:
Constant Field Values

OUTGOING_QUEUE_FILE

public static final String OUTGOING_QUEUE_FILE
Out queue file template.{0} will be replaced with actual SenderCompID {1} with actual TargetCompID.

See Also:
Constant Field Values

FORCE_SEQ_NUM_RESET

public static final String FORCE_SEQ_NUM_RESET
Enable disable sequence reset.

See Also:
Constant Field Values

LOG_FILES_TIME_ZONE

public static final String LOG_FILES_TIME_ZONE
Time zone for prefix in out/in logs

See Also:
Constant Field Values

TIMESTAMPS_IN_LOGS

public static final String TIMESTAMPS_IN_LOGS
On/off the timestamp prefix in in/out log files. Default value true.

See Also:
Constant Field Values

MAX_STORAGE_GROW_SIZE

public static final String MAX_STORAGE_GROW_SIZE
See Also:
Constant Field Values

STORAGE_GROW_SIZE

public static final String STORAGE_GROW_SIZE
See Also:
Constant Field Values

CONNECT_ADDRESS

public static final String CONNECT_ADDRESS
See Also:
Constant Field Values

MAX_REQUEST_RESEND_IN_BLOCK

public static final String MAX_REQUEST_RESEND_IN_BLOCK
See Also:
Constant Field Values

MAX_DELAY_TO_SEND_AFTER_LOGON

public static final String MAX_DELAY_TO_SEND_AFTER_LOGON
See Also:
Constant Field Values

PERFORM_RESET_SEQ_NUM_TIME

public static final String PERFORM_RESET_SEQ_NUM_TIME
See Also:
Constant Field Values

RESET_SEQUENCE_TIME

public static final String RESET_SEQUENCE_TIME
See Also:
Constant Field Values

RESET_SEQUENCE_TIME_ZONE

public static final String RESET_SEQUENCE_TIME_ZONE
See Also:
Constant Field Values

STORAGE_CLEANUP_MODE

public static final String STORAGE_CLEANUP_MODE
See Also:
Constant Field Values

STORAGE_BACKUP_DIR

public static final String STORAGE_BACKUP_DIR
See Also:
Constant Field Values

INTRA_DAY_SEQNUM_RESET

public static final String INTRA_DAY_SEQNUM_RESET
See Also:
Constant Field Values

DES_KEY_PREFIX

public static final String DES_KEY_PREFIX
See Also:
Constant Field Values

PUB_KEY_FILE

public static final String PUB_KEY_FILE
See Also:
Constant Field Values

SEC_KEY_FILE

public static final String SEC_KEY_FILE
See Also:
Constant Field Values

PUB_KEY

public static final String PUB_KEY
See Also:
Constant Field Values

ENCRYPTION_CFG_FILE

public static final String ENCRYPTION_CFG_FILE
See Also:
Constant Field Values

ENCRYPTION_MODE

public static final String ENCRYPTION_MODE
See Also:
Constant Field Values

HBT_REASONABLE_TRANSMISSION_TIME

public static final String HBT_REASONABLE_TRANSMISSION_TIME
This parameter specifies "some reasonable transmission time" of FIX specification, measured in milliseconds. Valid values: positive integer Default value: 200

See Also:
Constant Field Values

ORIG_SENDING_TIME_CHECKING

public static final String ORIG_SENDING_TIME_CHECKING
This parameter specifies whether to check the OrigSendingTime(122) field value for incoming possible duplicated messages (PossDupFlag(43) = 'Y'). Valid values: true | false Default value: true

See Also:
Constant Field Values

TEST_REQUESTS_NUMBER_UPON_DISCONNECTION

public static final String TEST_REQUESTS_NUMBER_UPON_DISCONNECTION
This parameter specifies number of Test Request messages, which will be sent before connection loss is reported when no messages are received from the counterparty. Default value: 1

See Also:
Constant Field Values

ADVANCED_RESEND_REQUEST_PROCESSING

public static final String ADVANCED_RESEND_REQUEST_PROCESSING
See Also:
Constant Field Values

POSS_DUP_SMART_DELIVERY

public static final String POSS_DUP_SMART_DELIVERY
See Also:
Constant Field Values
Constructor Detail

Configuration

public Configuration(Properties map)
Create a Configuration based on Map properties.

Parameters:
map - the properties

Configuration

public Configuration(Map map)
Create a Configuration based on Map properties.

Parameters:
map - - properties

Configuration

public Configuration(String prop)
Create a Configuration. Load properties from prop file

Parameters:
prop - the properties file.
Throws:
IllegalArgumentException - if file not exists.
Method Detail

getGlobalConfiguration

public static Configuration getGlobalConfiguration()
Get global configuration. Method returned default configuration loaded on startup.

Returns:
instance of global configuration.

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

setProperty

public void setProperty(String propertyName,
                        String propertyValue)
Setter for properties.

Parameters:
propertyName - the name of property
propertyValue - the value for property

addAllProperties

public void addAllProperties(Map newProps)

setAllProperties

public void setAllProperties(Map newProps)

getProperty

public String getProperty(String propertyName)
Getter for property.

Parameters:
propertyName - the name of property
Returns:
value for property or null if property not exists

getProperty

public String getProperty(String propertyName,
                          String defaultValue)
Getter for property.

Parameters:
propertyName - the name of property
defaultValue - the default value for property
Returns:
value for property or defaultValue if property not exists

getPropertyAsBoolean

public boolean getPropertyAsBoolean(String propertyName,
                                    boolean defaultValue)
Get property value as boolean.

Parameters:
propertyName - the name of property
defaultValue - the default value for property
Returns:
value for property or defaultValue if property not exists

getPropertyAsBoolean

public boolean getPropertyAsBoolean(String propertyName)
Get property value as boolean.

Parameters:
propertyName - the name of property
Returns:
value for property or false if property not exists

getPropertyAsInt

public int getPropertyAsInt(String propertyName,
                            int defaultValue)
Get property value as int.

Parameters:
propertyName - the name of property
defaultValue - the default value for property
Returns:
value for property or defaultValue if property not exists

getPropertyAsInt

public int getPropertyAsInt(String propertyName)
Get property value as int.

Parameters:
propertyName - the name of property
Returns:
value for property or -1 if property not exists

getProperties

public Properties getProperties()
Get all properties.

Returns:
returned value is cloned.

printConfiguration

public void printConfiguration()
Prints configuration to log.



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