Permalink
Browse files

Deprecate Acceptor (use IAcceptor instead); add some doc/TODO comment…

…s for not implemented functions
  • Loading branch information...
1 parent d402b38 commit edf1e2859f5c5258ab74deb36148923ef8f2b5bf @gbirchmeier gbirchmeier committed Jan 13, 2012
@@ -24,7 +24,7 @@ static void Main(string[] args)
Application app = new SimpleAcceptorApp();
MessageStoreFactory storeFactory = new FileStoreFactory(settings);
LogFactory logFactory = new FileLogFactory(settings);
- Acceptor acceptor = new ThreadedSocketAcceptor(app, storeFactory, settings, logFactory);
+ IAcceptor acceptor = new ThreadedSocketAcceptor(app, storeFactory, settings, logFactory);
acceptor.Start();
Console.WriteLine("press <enter> to quit");
View
@@ -1,51 +1,60 @@
-using System.Net;
-using System.Collections.Generic;
-
-namespace QuickFix
-{
- /// <summary>
- /// Accepts connections from FIX clients and manages the associated sessions.
- /// </summary>
- public interface Acceptor
- {
- /// <summary>
- /// Start accepting connections
- /// </summary>
- void Start();
-
- /// <summary>
- /// Close exising connections and stop accepting new ones
- /// </summary>
- void Stop();
-
- /// <summary>
- /// Close exising connections and stop accepting new ones
- /// </summary>
- /// <param name="force">If true, do not wait for existing Sessions to logout</param>
- void Stop(bool force);
-
- /// <summary>
- /// Check whether any sessions are logged on
- /// </summary>
- /// <returns>true if any session is logged on, else false</returns>
- bool IsLoggedOn();
-
- /// <summary>
- /// Get the SessionIDs managed by this Acceptor
- /// </summary>
- /// <returns>the SessionIDs managed by this Acceptor</returns>
- HashSet<SessionID> GetSessionIDs();
-
- /// <summary>
- /// Get the Sessions managed by this Acceptor
- /// </summary>
- /// <returns>the Sessions managed by this Acceptor</returns>
- HashSet<Session> GetSessions();
-
- /// <summary>
- /// Get accepted socket end points
- /// </summary>
- /// <returns>a map of SessionIDs to EndPoints</returns>
- Dictionary<SessionID,IPEndPoint> GetAcceptorAddresses();
- }
-}
+using System.Net;
+using System.Collections.Generic;
+
+namespace QuickFix
+{
+ /// <summary>
+ /// Accepts connections from FIX clients and manages the associated sessions.
+ /// </summary>
+ public interface IAcceptor
+ {
+ /// <summary>
+ /// Start accepting connections
+ /// </summary>
+ void Start();
+
+ /// <summary>
+ /// Close exising connections and stop accepting new ones
+ /// </summary>
+ void Stop();
+
+ /// <summary>
+ /// Close exising connections and stop accepting new ones
+ /// </summary>
+ /// <param name="force">If true, do not wait for existing Sessions to logout</param>
+ void Stop(bool force);
+
+ /// <summary>
+ /// Check whether any sessions are logged on
+ /// </summary>
+ /// <returns>true if any session is logged on, else false</returns>
+ bool IsLoggedOn();
+
+ /// <summary>
+ /// Get the SessionIDs managed by this Acceptor
+ /// </summary>
+ /// <returns>the SessionIDs managed by this Acceptor</returns>
+ HashSet<SessionID> GetSessionIDs();
+
+ /// <summary>
+ /// Get the Sessions managed by this Acceptor
+ /// </summary>
+ /// <returns>the Sessions managed by this Acceptor</returns>
+ HashSet<Session> GetSessions();
+
+ /// <summary>
+ /// Get accepted socket end points
+ /// </summary>
+ /// <returns>a map of SessionIDs to EndPoints</returns>
+ Dictionary<SessionID,IPEndPoint> GetAcceptorAddresses();
+ }
+
+ /// <summary>
+ /// Deprecated due to violation of naming convention; will be removed in next major release.
+ /// It is replaced by IAcceptor, from which it directly derives.
+ /// </summary>
+ [System.Obsolete("Use IAcceptor instead")]
+ public interface Acceptor : IAcceptor
+ {
+ }
+}
@@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D67079DA-6C49-48B2-93AB-1C3E879F5A0B}</ProjectGuid>
<OutputType>Library</OutputType>
@@ -45,7 +45,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
- <Compile Include="Acceptor.cs" />
+ <Compile Include="IAcceptor.cs" />
<Compile Include="Application.cs" />
<Compile Include="Applications\FIX4Application.cs" />
<Compile Include="Applications\FIX5Application.cs" />
Oops, something went wrong.

0 comments on commit edf1e28

Please sign in to comment.