/// <summary>
        /// This is the default constructor.
        /// </summary>
        /// <param name="fabric">This is the connection fabric. If null, then a new fabric will be created.</param>
        /// <param name="mode">The desired communication mode.</param>
        /// <param name="payloadHistoryEnabled">This property specifies whether the message history should be maintained.</param>
        /// <param name="retryAttempts">This is the number of retry delivery attempts that should be attempted. Leave this null if not required.</param>
        public ManualCommunicationBridgeAgent(ManualFabricBridge fabric, CommunicationBridgeMode mode
                                              , bool payloadHistoryEnabled = false
                                              , int?retryAttempts          = null
                                              ) : base(mode)
        {
            Fabric         = fabric ?? throw new ArgumentNullException("fabric");
            mRetryAttempts = retryAttempts;

            PayloadHistoryEnabled = payloadHistoryEnabled;
            if (payloadHistoryEnabled)
            {
                mPayloadsHistory = new ConcurrentDictionary <Guid, TransmissionPayload>();
            }
        }
 /// <summary>
 /// This is the default constructor that specifies the broadcast mode.
 /// </summary>
 /// <param name="mode">This property specifies how the bridge communicates to the senders from the listeners.</param>
 /// <param name="agent">This is the communication agent. When not set this defaults to the manual agent.</param>
 public CommunicationBridge(CommunicationBridgeMode mode, CommunicationBridgeAgent agent = null)
 {
     mAgent = agent ?? new ManualCommunicationBridgeAgent();
     mAgent.SetMode(mode);
     Mode = mode;
 }
Beispiel #3
0
 /// <summary>
 /// This method sets the operating mode. Override this if you wish to restict the modes that are supported.
 /// </summary>
 /// <param name="mode">The communication bridge mode.</param>
 public virtual void SetMode(CommunicationBridgeMode mode)
 {
     mMode = mode;
 }
 /// <summary>
 /// This is the default constructor.
 /// </summary>
 /// <param name="mode">The desired communication mode.</param>
 /// <param name="payloadHistoryEnabled">This property specifies whether the message history should be maintained.</param>
 /// <param name="retryAttempts">This is the number of retry delivery attempts that should be attempted. Leave this null if not required.</param>
 public ManualCommunicationBridgeAgent(CommunicationBridgeMode mode
                                       , bool payloadHistoryEnabled = false
                                       , int?retryAttempts          = null
                                       ) : this(new ManualFabricBridge(), mode, payloadHistoryEnabled, retryAttempts)
 {
 }
Beispiel #5
0
 /// <summary>
 /// This is the default constructor.
 /// </summary>
 /// <param name="mode">The operational mode.</param>
 protected CommunicationBridgeAgent(CommunicationBridgeMode mode = CommunicationBridgeMode.NotSet)
 {
     Mode = mode;
 }