Class FixServer
- Namespace
- StockSharp.Server.Fix
- Assembly
- StockSharp.Server.Fix.dll
FIX server.
public class FixServer : BaseLogReceiver, IPersistable, ICloneable<FixServer>, IMessageListener, IMessageChannel, ICloneable, ICloneable<IMessageChannel>, ILogReceiver, ILogSource, IDisposable
- Inheritance
-
FixServer
- Implements
-
IPersistableICloneable<FixServer>ICloneable<IMessageChannel>
- Inherited Members
- Extension Methods
Constructors
FixServer(IAuthorization, ITransactionIdStorage, string, DateTime)
Initializes a new instance of the FixServer.
public FixServer(IAuthorization authorization, ITransactionIdStorage transactionIdStorage, string licenseFeatureId, DateTime componentTimestamp)
Parameters
authorization
IAuthorizationThe customer authentication.
transactionIdStorage
ITransactionIdStorageTransaction and request identifiers storage.
licenseFeatureId
stringcomponentTimestamp
DateTime
FixServer(IAuthorization, ITransactionIdStorage, string, Type)
Initializes a new instance of the FixServer.
public FixServer(IAuthorization authorization, ITransactionIdStorage transactionIdStorage, string licenseFeatureId, Type componentType)
Parameters
authorization
IAuthorizationThe customer authentication.
transactionIdStorage
ITransactionIdStorageTransaction and request identifiers storage.
licenseFeatureId
stringcomponentType
Type
Properties
Authorization
The customer authentication.
[Browsable(false)]
public IAuthorization Authorization { get; }
Property Value
- IAuthorization
ComponentTimestamp
Component timestamp.
public DateTime ComponentTimestamp { get; }
Property Value
IsDemo
Demo mode only.
public bool IsDemo { get; }
Property Value
LicenseFeatureId
License feature id to be sent as Logon response.
public string LicenseFeatureId { get; }
Property Value
SendOutHeartbeats
Send via NewOutMessage heartbeat.
public bool SendOutHeartbeats { get; set; }
Property Value
Sessions
Active sessions.
public IEnumerable<IMessageListenerSession> Sessions { get; }
Property Value
Settings
Settings.
public FixServerSettings Settings { get; }
Property Value
State
State.
[Browsable(false)]
public ChannelStates State { get; }
Property Value
TransactionIdStorage
Transaction and request identifiers storage.
[Browsable(false)]
public ITransactionIdStorage TransactionIdStorage { get; }
Property Value
Methods
AddSubscription(ServerSubscription)
Add subscription.
public void AddSubscription(ServerSubscription subscription)
Parameters
subscription
ServerSubscriptionSubscription.
Close()
Close channel.
public void Close()
CreateCondition()
To create the order condition.
protected virtual OrderCondition CreateCondition()
Returns
- OrderCondition
The order condition.
Disconnect(IMessageListenerSession)
Disconnect session.
public void Disconnect(IMessageListenerSession session)
Parameters
session
IMessageListenerSessionSession.
DisposeManaged()
Release resources.
protected override void DisposeManaged()
GetSubscriptions(IMessageListenerSession)
Get subscription for the specified session.
public IEnumerable<ServerSubscription> GetSubscriptions(IMessageListenerSession session)
Parameters
session
IMessageListenerSessionSession.
Returns
- IEnumerable<ServerSubscription>
Subscriptions.
HasSubscriptions(DataType, SecurityId)
Are there subscribers.
public bool HasSubscriptions(DataType dataType, SecurityId securityId)
Parameters
dataType
DataTypeMarket data type.
securityId
SecurityIdSecurity ID.
Returns
- bool
Are there subscribers.
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnProcess(FixSession, string, IFixReader)
The method is called when the received message is processing.
protected virtual bool? OnProcess(FixSession session, string msgType, IFixReader reader)
Parameters
session
FixSessionSession.
msgType
stringMessage type.
reader
IFixReaderData reader.
Returns
- bool?
Whether the data was successfully processed.
Open()
Open channel.
public void Open()
PostInitCondition(char, OrderCondition)
The final initialization of the order condition.
protected virtual void PostInitCondition(char ordType, OrderCondition condition)
Parameters
ordType
charOrder type.
condition
OrderConditionThe order condition.
RaiseNewOutMessage(IMessageListenerSession, Message)
To call the event NewOutMessage.
protected void RaiseNewOutMessage(IMessageListenerSession session, Message message)
Parameters
session
IMessageListenerSessionSession.
message
MessageMessage.
ReadOrderCondition(IFixReader, FixTags, Func<OrderCondition>)
To read the order condition OrderCondition.
protected virtual bool ReadOrderCondition(IFixReader reader, FixTags tag, Func<OrderCondition> getCondition)
Parameters
reader
IFixReaderData reader.
tag
FixTagsTag.
getCondition
Func<OrderCondition>The function returning the order condition.
Returns
- bool
Whether the data was successfully processed.
RemoveSubscription(ServerSubscription)
Remove subscription.
public bool RemoveSubscription(ServerSubscription subscription)
Parameters
subscription
ServerSubscriptionSubscription.
Returns
Resume(IMessageListenerSession)
Resume session.
public void Resume(IMessageListenerSession session)
Parameters
session
IMessageListenerSessionSession.
Resume(ServerSubscription)
Resume subscription.
public bool Resume(ServerSubscription subscription)
Parameters
subscription
ServerSubscriptionSubscription.
Returns
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
SendInMessage(Message)
Send message.
public bool SendInMessage(Message message)
Parameters
message
MessageMessage.
Returns
SendInMessage(IMessageListenerSession, long?, Message)
public bool SendInMessage(IMessageListenerSession session, long? subscriptionId, Message message)
Parameters
session
IMessageListenerSessionsubscriptionId
long?message
Message
Returns
Suspend(IMessageListenerSession)
Suspend session.
public void Suspend(IMessageListenerSession session)
Parameters
session
IMessageListenerSessionSession.
Suspend(ServerSubscription)
Suspend subscription.
public bool Suspend(ServerSubscription subscription)
Parameters
subscription
ServerSubscriptionSubscription.
Returns
WriterFixOrderCondition(IFixWriter, OrderCondition)
To record data by the order condition.
protected virtual void WriterFixOrderCondition(IFixWriter writer, OrderCondition condition)
Parameters
writer
IFixWriterFIX data writer.
condition
OrderConditionOrder condition (e.g., stop- and algo- orders parameters).
Events
NewOutMessage
New message event.
public event Action<IMessageListenerSession, Message> NewOutMessage
Event Type
SessionConnected
Session connected event.
public event Action<IMessageListenerSession> SessionConnected
Event Type
SessionDisconnected
Session disconnected event.
public event Action<IMessageListenerSession> SessionDisconnected
Event Type
StateChanged
State change event.
public event Action StateChanged
Event Type
SubscriptionChanged
Client subscription changed event.
public event Action<ServerSubscription> SubscriptionChanged