public class DynamicAcceptorSessionProvider extends Object implements AcceptorSessionProvider
Modifier and Type | Class and Description |
---|---|
static class |
DynamicAcceptorSessionProvider.TemplateMapping
Mapping from a sessionID pattern to a session template ID.
|
Modifier and Type | Field and Description |
---|---|
protected SessionFactory |
sessionFactory |
protected SessionSettings |
settings |
static String |
WILDCARD |
Constructor and Description |
---|
DynamicAcceptorSessionProvider(SessionSettings settings,
List<DynamicAcceptorSessionProvider.TemplateMapping> templateMappings,
Application application,
MessageStoreFactory messageStoreFactory,
LogFactory logFactory,
MessageFactory messageFactory) |
DynamicAcceptorSessionProvider(SessionSettings settings,
SessionID templateID,
Application application,
MessageStoreFactory messageStoreFactory,
LogFactory logFactory,
MessageFactory messageFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
copySettings(SessionSettings settings,
Properties properties) |
Session |
getSession(SessionID sessionID,
SessionConnector sessionConnector)
Return a session for this sessionID.
|
protected SessionID |
lookupTemplateID(SessionID sessionID) |
protected void |
optionallySetValue(SessionSettings dynamicSettings,
String key,
String value) |
public static final String WILDCARD
protected final SessionSettings settings
protected final SessionFactory sessionFactory
public DynamicAcceptorSessionProvider(SessionSettings settings, SessionID templateID, Application application, MessageStoreFactory messageStoreFactory, LogFactory logFactory, MessageFactory messageFactory)
settings
- session settingstemplateID
- this is a session ID for a session definition in the session
settings that will be used for default dynamic session values. The BeginString,
SenderCompID, and TargetCompID settings will be replaced with those in the
received logon message.application
- application for the dynamic sessionsmessageStoreFactory
- message store factory for the dynamic sessionslogFactory
- log factory for the dynamic sessionsmessageFactory
- message factory for the dynamic sessionspublic DynamicAcceptorSessionProvider(SessionSettings settings, List<DynamicAcceptorSessionProvider.TemplateMapping> templateMappings, Application application, MessageStoreFactory messageStoreFactory, LogFactory logFactory, MessageFactory messageFactory)
settings
- session settingstemplateMappings
- this is a list of session ID patterns mapped to session IDs in
the settings file. The session IDs represent the template for a specified session ID
pattern. The template is used to dynamically create acceptor sessions.
Use "*" to represent a wildcard for a pattern element. For example,
new SessionID("FIX.4.2", "*", "*") would match for any FIX 4.2 session ID.
This allows separate template session configurations for FIX versions (or
CompIDs) being accepted dynamically on a single TCP port.application
- application for the dynamic sessionsmessageStoreFactory
- message store factory for the dynamic sessionslogFactory
- log factory for the dynamic sessionsmessageFactory
- message factory for the dynamic sessionsDynamicAcceptorSessionProvider.TemplateMapping
public Session getSession(SessionID sessionID, SessionConnector sessionConnector)
AcceptorSessionProvider
getSession
in interface AcceptorSessionProvider
protected void optionallySetValue(SessionSettings dynamicSettings, String key, String value)
protected void copySettings(SessionSettings settings, Properties properties)
Copyright © 2021. All rights reserved.