Class FixServer
Generic FIXServer implementation.
Inheritance
Inherited Members
Namespace: FixAntenna.FixEngine
Assembly: FixAntenna.Core.dll
Syntax
public class FixServer
Constructors
FixServer()
Creates the fix server.
Declaration
public FixServer()
FixServer(Config)
Creates the fix server.
Declaration
public FixServer(Config conf)
Parameters
Type | Name | Description |
---|---|---|
Config | conf |
Fields
ConfigAdapter
Declaration
protected readonly ConfigurationAdaptor ConfigAdapter
Field Value
Type | Description |
---|---|
ConfigurationAdaptor |
ConfiguredSessionRegister
Declaration
protected IConfiguredSessionRegister ConfiguredSessionRegister
Field Value
Type | Description |
---|---|
IConfiguredSessionRegister |
Servers
Servers bound to ports
Declaration
protected Dictionary<int, IServer> Servers
Field Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Int32, IServer> |
Properties
Nic
Gets or sets the NIC (address) to listen to.
Declaration
public virtual string Nic { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Ports
Gets or sets the set of ports to listen to.
Declaration
public int[] Ports { get; set; }
Property Value
Type | Description |
---|---|
System.Int32[] |
SslPorts
Gets or sets the set of secured ports to listen to.
Declaration
public int[] SslPorts { get; set; }
Property Value
Type | Description |
---|---|
System.Int32[] |
Methods
AddServerStatusListener(IFixServerStatusListener)
Declaration
public virtual void AddServerStatusListener(IFixServerStatusListener statusListener)
Parameters
Type | Name | Description |
---|---|---|
IFixServerStatusListener | statusListener |
GetAcceptorStrategy(Config)
Declaration
public virtual SessionAcceptorStrategyHandler GetAcceptorStrategy(Config configuration)
Parameters
Type | Name | Description |
---|---|---|
Config | configuration |
Returns
Type | Description |
---|---|
SessionAcceptorStrategyHandler |
GetConfigPath()
Path to config file
Declaration
public virtual string GetConfigPath()
Returns
Type | Description |
---|---|
System.String | path to config file |
GetRegisterAcceptorSession()
Declaration
public virtual IList<SessionParameters> GetRegisterAcceptorSession()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<SessionParameters> |
GetTransportFactory(Config)
Declaration
public virtual ISessionTransportFactory GetTransportFactory(Config configuration)
Parameters
Type | Name | Description |
---|---|---|
Config | configuration |
Returns
Type | Description |
---|---|
ISessionTransportFactory |
IsStarted()
Declaration
public virtual bool IsStarted()
Returns
Type | Description |
---|---|
System.Boolean |
RegisterAcceptorSession(SessionParameters)
Register the session parameters of acceptor.
Declaration
public virtual void RegisterAcceptorSession(SessionParameters sessionParameters)
Parameters
Type | Name | Description |
---|---|---|
SessionParameters | sessionParameters | the sessionParameters |
RegisterConfiguredSessions()
Declaration
public virtual void RegisterConfiguredSessions()
RemoveServerStatusListener(IFixServerStatusListener)
Declaration
public virtual void RemoveServerStatusListener(IFixServerStatusListener statusListener)
Parameters
Type | Name | Description |
---|---|---|
IFixServerStatusListener | statusListener |
SetConfigPath(String)
Set path to config file
Declaration
public virtual void SetConfigPath(string configPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | configPath | path to config file |
SetConnectionValidator(IConnectionValidator)
Declaration
public virtual void SetConnectionValidator(IConnectionValidator connectionValidator)
Parameters
Type | Name | Description |
---|---|---|
IConnectionValidator | connectionValidator |
SetListener(IFixServerListener)
Sets listener.
Declaration
public virtual void SetListener(IFixServerListener listener)
Parameters
Type | Name | Description |
---|---|---|
IFixServerListener | listener |
|
SetLoginWaitTimeout(Int32)
Sets login timeout.
Declaration
public virtual void SetLoginWaitTimeout(int loginWaitTimeout)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | loginWaitTimeout | the login timeout in mils |
SetPort(Int32)
Sets the only port to listen on.
Declaration
public virtual void SetPort(int port)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | port | port to listen on |
SetServer(IServer)
Replaces default TCPServer implementation with custom Server implementation.
Declaration
public virtual void SetServer(IServer server)
Parameters
Type | Name | Description |
---|---|---|
IServer | server | implementation specified by user |
See Also
Start()
Actually starts the servers.
Declaration
public virtual bool Start()
Returns
Type | Description |
---|---|
System.Boolean | true if all servers started successfully false - otherwise (server will add WARN messages with description of each problem to log) |
Exceptions
Type | Condition |
---|---|
System.IO.IOException | if unable to start the server at least on one port. In this case the first received exception will be thrown. |
System.InvalidOperationException | if server port(s) were not set by configuration or one of those methods:
|
Stop()
Stops the server.
Declaration
public virtual void Stop()
Exceptions
Type | Condition |
---|---|
System.IO.IOException | if stop was unsuccessful |
System.InvalidOperationException | if servers were not set by one of those methods: |
UnregisterAcceptorSession(SessionParameters)
Remove registered acceptor session. Note: To remove registered acceptor session it's enough to pass SessionParameters with right SenderComId and TargetCompId for a moment.
Declaration
public virtual void UnregisterAcceptorSession(SessionParameters sessionParameters)
Parameters
Type | Name | Description |
---|---|---|
SessionParameters | sessionParameters |