public class SessionParameters extends Object implements Cloneable, com.epam.fixengine.session.TradingSessionParameters
for more precise customization
Constructor and Description |
---|
SessionParameters() |
SessionParameters(com.epam.fixengine.configuration.Configuration config) |
Modifier and Type | Method and Description |
---|---|
void |
addAllDestinations(Collection<InetSocketAddress> destinations)
Add alternative(backup) destinations for initiator.
|
void |
addDestination(InetSocketAddress destination)
Add alternative(backup) destination for initiator.
|
void |
addDestination(String host,
int port)
Add alternative(backup) destination for initiator.
|
void |
addHeaderField(FIXField field)
Add user defined field.
|
void |
addOutgoingLoginField(FIXField field)
Deprecated.
|
void |
addOutgoingLoginField(int tag,
byte value)
Add field to outgoing login fields list.
|
void |
addOutgoingLoginField(int tag,
byte[] value)
Add field to outgoing login fields list.
|
void |
addOutgoingLoginField(int tag,
byte[] value,
int offset,
int length)
Add field to outgoing login fields list.
|
void |
addOutgoingLoginField(int tag,
Calendar value,
FIXDateFormatterFactory.FIX_DATE_TYPE type)
Add field to outgoing login fields list.
|
void |
addOutgoingLoginField(int tag,
CharSequence value)
Add field to outgoing login fields list.
|
void |
addOutgoingLoginField(int tag,
double value,
int precision)
Add field to outgoing login fields list.
|
void |
addOutgoingLoginField(int tag,
long value)
Add field to outgoing login fields list.
|
Object |
clone()
Creates and returns a copy of this object.
|
FIXSession |
createAcceptorSession()
Creates acceptor session in disconnected state
|
FIXSession |
createInitiatorSession()
Creates initiator session
|
FIXSession |
createNewFIXSession()
Deprecated.
use
createAcceptorSession() or createInitiatorSession() instead |
void |
disableInSeqNumsOnNextConnect() |
void |
disableOutSeqNumsOnNextConnect() |
boolean |
equals(Object o) |
void |
fromConfiguration(com.epam.fixengine.configuration.Configuration configuration) |
void |
fromProperties(Properties properties)
Creates the SessionParameters from properties.
|
FIXVersion |
getAppVersion()
Gets App version.
|
com.epam.fixengine.configuration.FIXVersionContainer |
getAppVersionContainer() |
String |
getBackupHost()
Deprecated.
use
getDestinations method. |
int |
getBackupPort()
Deprecated.
use
getDestinations method. |
com.epam.fixengine.configuration.Configuration |
getConfiguration() |
Map<String,Object> |
getConnectivityParams()
Get additional configuration properties for transport.
|
Function<String,Object> |
getCustomLoader()
The loader is used for loading configurable classes.
|
List<InetSocketAddress> |
getDestinations()
Gets alternative(backup) destinations for initiator.
|
com.epam.fixengine.encryption.EncryptionType |
getEncryptionType()
Gets encryption type.
|
FIXFieldList |
getFixFieldList()
Gets user defined fields.
|
FIXVersion |
getFixVersion()
Gets fix version.
|
com.epam.fixengine.configuration.FIXVersionContainer |
getFixVersionContainer() |
ForceSeqNumReset |
getForceSeqNumReset()
Gets force sequence reset.
|
int |
getHeartbeatInterval()
Gets heartbeat interval.
|
String |
getHost()
Gets host.
|
FIXFieldList |
getIncomingLoginFixFieldList()
Gets incoming login fields.
|
String |
getIncomingPassword() |
long |
getIncomingSequenceNumber() |
String |
getIncomingUserName() |
long |
getLastSeqNumResetTimestamp()
Gets last seq num reset timestamp.
|
FIXFieldList |
getOutgoingLoginFixFieldList()
Gets outgoing login fields.
|
long |
getOutgoingSequenceNumber() |
String |
getPassword() |
int |
getPort()
Gets port.
|
String |
getSenderCompId()
Gets sender comp id.
|
String |
getSenderLocationId()
Gets sender location id.
|
String |
getSenderSubId()
Gets sender sub id.
|
SessionID |
getSessionId() |
String |
getSessionID() |
String |
getSessionQualifier() |
String |
getSessionSSLCipherSuite() |
Certificate[] |
getSessionSSLPeerCertificates() |
String |
getSessionSSLProtocol() |
String |
getTargetCompId()
Gets target comp id.
|
String |
getTargetLocationId()
Gets target location id.
|
String |
getTargetSubId()
Gets target sub id.
|
TimeZone |
getTimeZone() |
CronExpression |
getTradePeriodBegin() |
CronExpression |
getTradePeriodEnd() |
String |
getUserName() |
int |
hashCode() |
boolean |
hasPort() |
boolean |
isCustomSessionID() |
boolean |
isNeedToIncludeLastProcessed() |
boolean |
isSetInSeqNumsOnNextConnect() |
boolean |
isSetOutSeqNumsOnNextConnect() |
boolean |
isSetSeqNumsOnNextConnect() |
boolean |
isSimilar(SessionParameters other)
Return true if parameter object describe the same FIX session.
|
boolean |
isSimilar(SessionParameters other,
List<String> errors)
Return true if parameter object describe the same FIX session.
|
protected boolean |
isUseBlockingSocket() |
boolean |
isUseJavaNIO() |
static boolean |
isUseJavaNIOByDefault() |
protected boolean |
isUseSpinningRead() |
void |
printConfiguration() |
void |
removeAllDestinations(Collection<InetSocketAddress> destinations)
Remove alternative(backup) destinations from connections list.
|
void |
removeDestination(InetSocketAddress destination)
Remove alternative(backup) destination from connections list.
|
void |
removeDestination(String host,
int port)
Remove alternative(backup) destination from connections list.
|
void |
setAppVersion(FIXVersion appVersion)
Sets App version.
|
void |
setAppVersion(com.epam.fixengine.configuration.FIXVersionContainer appVersionContainer) |
void |
setAppVersion(String appVersion)
Sets App version.
|
void |
setBackupHost(String backupHost)
Deprecated.
use
addDestination method. |
void |
setBackupPort(int backupPort)
Deprecated.
use
addDestination method. |
void |
setConfiguration(com.epam.fixengine.configuration.Configuration configuration)
Setter for Configuration.
|
void |
setCustomLoader(Function<String,Object> handlersLoader)
The loader is used for loading configurable classes.
|
void |
setEncryptionType(com.epam.fixengine.encryption.EncryptionType encryptionType)
Sets encryption type.
|
void |
setFixFieldList(FIXFieldList fixFieldList)
Sets user defined fields.
|
void |
setFixVersion(FIXVersion fixVersion)
Sets fix version.
|
void |
setFixVersion(com.epam.fixengine.configuration.FIXVersionContainer fixVersionContainer) |
void |
setFixVersion(String fixVersion)
Sets fix version.
|
void |
setForceSeqNumReset(ForceSeqNumReset forceSeqNumReset)
Sets force sequence reset.
|
void |
setHeartbeatInterval(int heartbeatInterval)
Sets heartbeat interval.
|
void |
setHost(String host)
Sets host.
|
void |
setIncomingLoginFixFieldList(FIXFieldList incomingLoginFixFieldList)
Sets incoming login fields.
|
void |
setIncomingSequenceNumber(long incomingSequenceNumber) |
void |
setLastSeqNumResetTimestamp(long lastSeqNumResetTimestamp)
Sets last seq num reset timestamp.
|
void |
setOutgoingLoginFixFieldList(FIXFieldList outgoingLoginFixFieldList)
Sets outgoing login fields.
|
void |
setOutgoingSequenceNumber(long outgoingSequenceNumber) |
void |
setPassword(String password) |
void |
setPort(Integer port)
Sets port.
|
void |
setSenderCompId(String senderCompId)
Sets sender comp id.
|
void |
setSenderLocationId(String senderLocationId)
Sets sender location id.
|
void |
setSenderSubId(String senderSubId)
Sets sender sub id.
|
void |
setSessionID(String sessionId)
Change session identifier
|
void |
setSessionQualifier(String qualifier) |
void |
setSessionSSLCipherSuite(String sessionSSLCipherSuite) |
void |
setSessionSSLPeerCertificates(Certificate[] sessionSSLPeerCertificates) |
void |
setSessionSSLProtocol(String sessionSSLProtocol) |
void |
setTargetCompId(String targetCompId)
Sets target comp id.
|
void |
setTargetLocationId(String targetLocationId)
Sets target location id.
|
void |
setTargetSubId(String targetSubId)
Sets target sub id.
|
void |
setTimeZone(TimeZone timeZone) |
void |
setTradePeriodBegin(CronExpression cronExpression) |
void |
setTradePeriodEnd(CronExpression cronExpression) |
void |
setUserName(String username) |
Properties |
toProperties()
Creates and returns a copy of this object.
|
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
clearTradePeriod, clearTradePeriodBegin, clearTradePeriodEnd, isOnlyPeriodBeginDefined, isTimestampAfterTradingPeriodBegin, isTimestampAfterTradingPeriodBegin, isTimestampAfterTradingPeriodEnd, isTimestampInTradingPeriod, isTradingPeriodDefined
public static final int DEFAULT_SEQUENCE_NUM
public static final String SESSION_ID_PROPERTY
public static final String SENDER_COMP_ID_PROPERTY
public static final String TARGET_COMP_ID_PROPERTY
public static final String SESSION_QUALIFIER_PROPERTY
public static final String SENDER_SUB_ID_PROPERTY
public static final String SENDER_LOCATION_ID_PROPERTY
public static final String TARGET_SUB_ID_PROPERTY
public static final String TARGET_LOCATION_ID_PROPERTY
public static final String HOST_PROPERTY
public static final String PORT_PROPERTY
public static final String APP_VERSION_PROPERTY
public static final String FIX_VERSION_PROPERTY
public static final String HEARTBEAT_INTERVAL_PROPERTY
public static final String LAST_SEQ_NUM_RESET_TIMESTAMP_PROPERTY
public static final String FIX_FIELD_LIST_PROPERTY
public static final String INCOMING_LOGIN_FIX_FIELD_LIST_PROPERTY
public static final String OUTGOING_LOGIN_FIX_FIELD_LIST_PROPERTY
public static final String USERNAME_PROPERTY
public static final String PASSWORD_PROPERTY
public static final String IN_SEQ_NUMS_FOR_NEXT_CONNECT_PROPERTY
public static final String INCOMING_SEQUENCE_NUMBER_PROPERTY
public static final String OUT_SEQ_NUMS_FOR_NEXT_CONNECT_PROPERTY
public static final String OUTGOING_SEQUENCE_NUMBER_PROPERTY
public static final String SOCKET_CONNECT_ADDRESS_PREFIX_PROPERTY
public static final String BACKUP_HOST_PROPERTY
public static final String BACKUP_PORT_PROPERTY
protected static boolean defUseSpinningRead
protected static boolean defUseBlockingSockets
protected static boolean defUseJavaNIO
protected String senderSubId
protected String targetSubId
protected String senderLocationId
protected String targetLocationId
protected SessionID sessionID
protected int heartbeatInterval
protected com.epam.fixengine.configuration.FIXVersionContainer fixVersionContainer
protected com.epam.fixengine.configuration.FIXVersionContainer appVersionContainer
protected String host
protected Integer port
protected FIXFieldList fixFieldList
protected FIXFieldList incomingLoginFixFieldList
protected FIXFieldList outgoingLoginFixFieldList
protected com.epam.fixengine.configuration.Configuration configuration
protected List<InetSocketAddress> destinations
protected long lastSeqNumResetTimestamp
protected long incomingSequenceNumber
protected long outgoingSequenceNumber
protected CronExpression tradePeriodBegin
protected CronExpression tradePeriodEnd
protected TimeZone timeZone
protected String sessionSSLProtocol
protected String sessionSSLCipherSuite
protected Certificate[] sessionSSLPeerCertificates
public SessionParameters(com.epam.fixengine.configuration.Configuration config)
public SessionParameters()
public Map<String,Object> getConnectivityParams()
protected boolean isUseBlockingSocket()
protected boolean isUseSpinningRead()
public com.epam.fixengine.configuration.Configuration getConfiguration()
public void setConfiguration(com.epam.fixengine.configuration.Configuration configuration)
configuration
- the configurationpublic FIXVersion getFixVersion()
public void setFixVersion(FIXVersion fixVersion)
fixVersion
- the fix versionpublic void setFixVersion(String fixVersion)
fixVersion
- the fix versionpublic FIXVersion getAppVersion()
public void setAppVersion(FIXVersion appVersion)
appVersion
- the app versionpublic void setAppVersion(String appVersion)
appVersion
- the app versionpublic com.epam.fixengine.configuration.FIXVersionContainer getFixVersionContainer()
public void setFixVersion(com.epam.fixengine.configuration.FIXVersionContainer fixVersionContainer)
public com.epam.fixengine.configuration.FIXVersionContainer getAppVersionContainer()
public void setAppVersion(com.epam.fixengine.configuration.FIXVersionContainer appVersionContainer)
public FIXFieldList getFixFieldList()
public void setFixFieldList(FIXFieldList fixFieldList)
fixFieldList
- the user defined fieldspublic void addHeaderField(FIXField field)
field
- the fieldpublic String getSenderCompId()
public void setSenderCompId(String senderCompId)
senderCompId
- the sender comp idpublic String getTargetCompId()
public void setTargetCompId(String targetCompId)
targetCompId
- the target comp idpublic String getSenderSubId()
public void setSenderSubId(String senderSubId)
senderSubId
- the sender sub idpublic String getTargetSubId()
public void setTargetSubId(String targetSubId)
targetSubId
- the target sub idpublic String getSenderLocationId()
public void setSenderLocationId(String senderLocationId)
senderLocationId
- the sender location idpublic String getTargetLocationId()
public void setTargetLocationId(String targetLocationId)
targetLocationId
- the target location idpublic String getSessionID()
public SessionID getSessionId()
public void setSessionID(String sessionId)
sessionId
- unique string value. maximum 200 characters length. Allowed characters: a-z, A-Z, 0-9, '.',
'-', '_', ' '(space) and '!'public void setSessionQualifier(String qualifier)
public String getSessionQualifier()
public boolean isCustomSessionID()
public int getHeartbeatInterval()
public void setHeartbeatInterval(int heartbeatInterval)
heartbeatInterval
- the HBI, default value is 30.public String getHost()
public void setHost(String host)
host
- the hostpublic boolean hasPort()
public int getPort()
public void setPort(Integer port)
port
- the portpublic String getSessionSSLProtocol()
public void setSessionSSLProtocol(String sessionSSLProtocol)
public String getSessionSSLCipherSuite()
public void setSessionSSLCipherSuite(String sessionSSLCipherSuite)
public Certificate[] getSessionSSLPeerCertificates()
public void setSessionSSLPeerCertificates(Certificate[] sessionSSLPeerCertificates)
public ForceSeqNumReset getForceSeqNumReset()
public void setForceSeqNumReset(ForceSeqNumReset forceSeqNumReset)
forceSeqNumReset
- the forceSeqNumResetpublic void setUserName(String username)
public String getUserName()
public void setPassword(String password)
public String getPassword()
public String getIncomingUserName()
public String getIncomingPassword()
public FIXFieldList getIncomingLoginFixFieldList()
public void setIncomingLoginFixFieldList(FIXFieldList incomingLoginFixFieldList)
incomingLoginFixFieldList
- the incoming login fix field listpublic FIXFieldList getOutgoingLoginFixFieldList()
public void setOutgoingLoginFixFieldList(FIXFieldList outgoingLoginFixFieldList)
outgoingLoginFixFieldList
- the list of outgoing fields@Deprecated public void addOutgoingLoginField(FIXField field)
field
- login fieldpublic void addOutgoingLoginField(int tag, CharSequence value)
tag
- value
- public void addOutgoingLoginField(int tag, byte value)
tag
- value
- public void addOutgoingLoginField(int tag, byte[] value)
tag
- value
- public void addOutgoingLoginField(int tag, byte[] value, int offset, int length)
tag
- value
- public void addOutgoingLoginField(int tag, long value)
tag
- value
- public void addOutgoingLoginField(int tag, double value, int precision)
tag
- value
- public void addOutgoingLoginField(int tag, Calendar value, FIXDateFormatterFactory.FIX_DATE_TYPE type)
tag
- value
- public com.epam.fixengine.encryption.EncryptionType getEncryptionType()
public void setEncryptionType(com.epam.fixengine.encryption.EncryptionType encryptionType)
encryptionType
- the encryption typepublic Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public Properties toProperties()
public void fromProperties(Properties properties)
properties
- the propertiespublic void fromConfiguration(com.epam.fixengine.configuration.Configuration configuration)
public long getLastSeqNumResetTimestamp()
public void setLastSeqNumResetTimestamp(long lastSeqNumResetTimestamp)
lastSeqNumResetTimestamp
- the timestamppublic boolean isSetSeqNumsOnNextConnect()
public boolean isSetInSeqNumsOnNextConnect()
public boolean isSetOutSeqNumsOnNextConnect()
public void setIncomingSequenceNumber(long incomingSequenceNumber)
public void setOutgoingSequenceNumber(long outgoingSequenceNumber)
public long getIncomingSequenceNumber()
public long getOutgoingSequenceNumber()
public void disableInSeqNumsOnNextConnect()
public void disableOutSeqNumsOnNextConnect()
@Deprecated public String getBackupHost()
getDestinations
method.@Deprecated public int getBackupPort()
getDestinations
method.@Deprecated public void setBackupHost(String backupHost)
addDestination
method.backupHost
- the backup port@Deprecated public void setBackupPort(int backupPort)
addDestination
method.backupPort
- the backup portpublic List<InetSocketAddress> getDestinations()
public void addDestination(String host, int port)
host
- backup hostport
- backup portpublic void addDestination(InetSocketAddress destination)
destination
- backup addresspublic void addAllDestinations(Collection<InetSocketAddress> destinations)
destinations
- backup addressespublic void removeDestination(String host, int port)
host
- backup hostport
- backup portpublic void removeDestination(InetSocketAddress destination)
destination
- backup addresspublic void removeAllDestinations(Collection<InetSocketAddress> destinations)
destinations
- backup addressespublic FIXSession createNewFIXSession() throws IOException
createAcceptorSession()
or createInitiatorSession()
insteadIOException
public FIXSession createAcceptorSession() throws IOException
IOException
public FIXSession createInitiatorSession() throws IOException
IOException
public void printConfiguration()
public boolean isNeedToIncludeLastProcessed()
public void setCustomLoader(Function<String,Object> handlersLoader)
handlersLoader
- public Function<String,Object> getCustomLoader()
public boolean isUseJavaNIO()
public static boolean isUseJavaNIOByDefault()
public boolean isSimilar(SessionParameters other)
other
- public boolean isSimilar(SessionParameters other, List<String> errors)
other
- public CronExpression getTradePeriodBegin()
getTradePeriodBegin
in interface com.epam.fixengine.session.TradingSessionParameters
public void setTradePeriodBegin(CronExpression cronExpression)
setTradePeriodBegin
in interface com.epam.fixengine.session.TradingSessionParameters
public CronExpression getTradePeriodEnd()
getTradePeriodEnd
in interface com.epam.fixengine.session.TradingSessionParameters
public void setTradePeriodEnd(CronExpression cronExpression)
setTradePeriodEnd
in interface com.epam.fixengine.session.TradingSessionParameters
public TimeZone getTimeZone()
getTimeZone
in interface com.epam.fixengine.session.TradingSessionParameters
public void setTimeZone(TimeZone timeZone)
setTimeZone
in interface com.epam.fixengine.session.TradingSessionParameters
Copyright © 2000–2022 EPAM Systems. All rights reserved.